Dijkstra BellmanFord Johnson Floyd Warshall Data Science Engineering
Θεωρία & Αλγόριθμοι Γράφων Συντομότερα μονοπάτια Dijkstra, Bellman-Ford, Johnson, Floyd, Warshall Data Science & Engineering Lab
Edger Wybe Dijkstra n n n n 1930, Rotterdam – 2002, Nuenen Έλαβε το Turing Award το 1972 Schlumberger Centennial Chair of Computer Sciences στο University of Texas at Austin (1984 -2000) Δημοσίευσε εναντίον της χρήσης της εντολής GOTO στις γλώσσες προγραμματισμού και συντέλεσε στην απαξίωσή της Edsger Dijkstra: “Go To Statement Considered Harmful“, CACM, Vol. 11, No. 3, pp. 147– 148, 1968. Συνέγραψε πολλές εργασίες σχετικά με τον προγραμματισμό "Computer Science is no more about computers than astronomy is about telescopes" Data Science & Engineering Lab 3
Aλγόριθμος Dijkstra - ψευδοκώδικας Data Science & Engineering Lab 5
Aλγόριθμος Dijkstra - animation Data Science & Engineering Lab 8
Aλγόριθμος Dijkstra - animation Data Science & Engineering Lab 9
Aλγόριθμος Dijkstra - animation Data Science & Engineering Lab 10
Aλγόριθμος Dijkstra - animation Data Science & Engineering Lab 11
Aλγόριθμος Dijkstra - animation Data Science & Engineering Lab 12
Aλγόριθμος Dijkstra - animation Data Science & Engineering Lab 13
Aλγόριθμος Dijkstra - animation Data Science & Engineering Lab 14
Aλγόριθμος Dijkstra - animation Data Science & Engineering Lab 15
Aλγόριθμος Dijkstra - animation Data Science & Engineering Lab 16
Aλγόριθμος Dijkstra - animation Data Science & Engineering Lab 17
Bellman-Ford (wiki) n Richard Ernest Bellman (1920, NY -1984, LA). He was awarded the IEEE Medal of Honor "for contributions to decision processes and control system theory, particularly the creation and application of dynamic programming“ (1979). His key work is the Bellman equation. He coined the term “curse of dimensionality”. The Bellman Prize in Mathematical Biosciences was created in his honor (1985). n Lester Randolph Ford Jr. (1927, Houston). He specialized in network flow problems. Ford's paper with Fulkerson on the maximum flow problem and the Ford. Fulkerson algorithm, published as a technical report in 1954 and in a journal in 1956, established the max-flow min-cut theorem. Ford also developed the Bellman. Ford algorithm for finding shortest paths in graphs that have negatively weighted edges before Bellman. Data Science & Engineering Lab 19
Αλγόριθμος Bellman-Ford - animation vertex: s distance: 0 predecessor: null u 2 v v 4 x x 7 s t y -2 u 5 x 2 4 6 -2 -3 s 8 0 7 -4 2 7 7 9 y -2 Σε κάθε πέρασμα εξετάζονται οι ακμές με τη σειρά: (t, x), (t, y), (t, z), (x, t), (y, x), (y, z), (z, x), (z, s), (s, t), (s, y) Data Science & Engineering Lab 26 z
Παράδειγμα Bellman-Ford – αρνητικοί κύκλοι v 2 i=1 6 5 6 v 1 0 -2 8 7 v 6 6 2 v 7 9 11 v 3 1 7 9 16 12 v 4 v 5 2 5 -8 1 v 8 Με έντονο βέλος συμβολίζεται ο predecessor Data Science & Engineering Lab 28
Παράδειγμα Bellman-Ford – αρνητικοί κύκλοι v 2 i=2 6 5 6 v 1 0 -2 8 7 v 6 5 2 v 7 8 11 v 3 1 7 9 15 12 v 4 v 5 2 5 -8 0 v 8 Με έντονο βέλος συμβολίζεται ο predecessor Data Science & Engineering Lab 29
Παράδειγμα Bellman-Ford – αρνητικοί κύκλοι v 2 i=3 6 5 6 v 1 0 -2 8 7 v 6 4 2 v 7 7 11 v 3 1 7 9 14 12 v 4 v 5 2 5 -8 -1 v 8 Με έντονο βέλος συμβολίζεται ο predecessor Data Science & Engineering Lab 30
Παράδειγμα Bellman-Ford – αρνητικοί κύκλοι v 2 i=4 6 5 6 v 1 0 -2 8 7 v 6 3 2 v 7 6 11 v 3 1 7 9 13 12 v 4 v 5 2 5 -8 -2 v 8 Με έντονο βέλος συμβολίζεται ο predecessor Data Science & Engineering Lab 31
Παράδειγμα Bellman-Ford – αρνητικοί κύκλοι v 2 i=5 6 v 1 0 -2 8 7 v 6 2 2 v 7 5 11 v 3 1 7 9 12 12 v 4 v 5 2 5 -8 -3 v 8 Με έντονο βέλος συμβολίζεται ο predecessor Data Science & Engineering Lab 32
Παράδειγμα Bellman-Ford – αρνητικοί κύκλοι v 2 i=6 6 5 6 v 1 0 -2 8 7 v 6 1 2 v 7 4 11 v 3 1 7 9 11 12 v 4 v 5 2 5 -8 -4 v 8 Με έντονο βέλος συμβολίζεται ο predecessor Data Science & Engineering Lab 33
Donald Johnson (wiki) n n n Donald Bruce Johnson (1933 -1994) was a researcher in the design and analysis of algorithms. Johnson received his Ph. D. from Cornell University in 1973 under the supervision of David Gries. He took a faculty position in the CS department at Penn State University, and later moved to the department of mathematics at Dartmouth. When the Dartmouth CS department was founded in 1994, he became its first chair. Johnson invented the d-ary heap data structure, and is also known for Johnson's algorithm for the all-pairs shortest path problem. Data Science & Engineering Lab 39
Μονοπάτια σε DAG - animation 6 r 5 s 0 2 t 1 u 7 – 1 v – 2 w 4 3 2 Data Science & Engineering Lab 48
Μονοπάτια σε DAG - animation 6 r 5 s 0 2 t 2 1 u 7 6 – 1 v – 2 w 4 3 2 Data Science & Engineering Lab 49
Μονοπάτια σε DAG - animation 6 r 5 s 0 2 t 2 1 u 7 6 – 1 v 6 – 2 w 4 4 3 2 Data Science & Engineering Lab 50
Μονοπάτια σε DAG - animation 6 r 5 s 0 2 t 2 1 u 7 6 – 1 v 5 – 2 w 4 4 3 2 Data Science & Engineering Lab 51
Μονοπάτια σε DAG - animation 6 r 5 s 0 2 t 2 1 u 7 6 – 1 v 5 – 2 w 3 4 3 2 Data Science & Engineering Lab 52
Μονοπάτια σε DAG - animation 6 r 5 s 0 2 t 2 1 u 7 6 – 1 v 5 – 2 w 3 4 3 2 Ποιά είναι η πολυπλοκότητα ? Data Science & Engineering Lab 53
Robert Floyd (wiki) n n n Robert (Bob) Floyd (1936– 2001) Turing award 1978 His contributions include q Floyd-Warshal algorithm, which efficiently finds all shortest paths in a graph, q Floyd’s cycle-finding algorithm for detecting cycles in a sequence, and his work on parsing. q the important concept of error diffusion for rendering images, also called Floyd-Steinberg dithering (though he distinguished dithering from diffusion). q pioneering the field of program verification using logical assertions with the 1967 paper Assigning Meanings to Programs. This was an important contribution to what later became Hoare logic. Data Science & Engineering Lab 54
Αλγόριθμος Floyd – παράδειγμα (2) Data Science & Engineering Lab 58
Steven Warshall n n n Stephen Warshall (1935 NY – 2006, Gloucester/MA). He carried out research and development in operating systems, compiler design, language design and operations research. There is an interesting anecdote about his proof that the transitive closure algorithm is correct. He and a colleague at Technical Operations bet a bottle of rum on who first could determine whether this algorithm always works. Warshall came up with his proof overnight, winning the bet and the rum, which he shared with the loser of the bet. Because Warshall did not like sitting at a desk, he did much of his creative work in unconventional places such as on a sailboat in the Indian Ocean or in a Greek lemon orchard. Data Science & Engineering Lab 61
- Slides: 64