Presentation is loading. Please wait.

Presentation is loading. Please wait.

Shortest Path Solutions

Similar presentations


Presentation on theme: "Shortest Path Solutions"— Presentation transcript:

1 Shortest Path Solutions
ENGM 631 Shortest Path Solutions

2 Shortest Path 2 7 5 [1] 1 10 [-1] 3 8 6 4 9 (Cost) [External Flow]
(10) 2 7 (6) (4) (40) (1) 5 (4) (0) (20) (2) (8) (20) [1] 1 3 (2) 10 [-1] 8 (2) (4) (2) (12) 6 (10) (10) (1) (3) (6) 4 9

3 Dijkstra’s Algorithm Initial : let S={s}, s=0
Find an arc k(i,j) that passes from an unsolved node to a solved node such that Add node j and arc k(i,j) to tree Add j to solved set S. Let j=I + ck Go to step 2, repeat until S = set of all nodes

4 Shortest Path 2 7 5 1 10 3 8 6 4 9 [0] [8] (Cost) [s] (10) (6) (4)
(40) (1) 5 (4) (0) (20) (2) [0] [8] (8) (20) 1 3 (2) 10 8 (2) (4) (2) (12) 6 (10) (10) (1) (3) (6) 4 9

5 solved closest length to node length of
Iter nodes unsolved unsolved added shortest path

6 Shortest Path 2 7 5 1 10 3 8 6 4 9 [0] [8] (Cost) [s] (10) (6) (4)
(40) (1) 5 (4) (0) (20) (2) [0] [8] (8) (20) 1 3 (2) 10 8 (2) (4) (2) (12) 6 (10) (10) (1) (3) (6) 4 9

7 Shortest Path 2 7 5 1 10 3 8 6 4 9 [0] [8] [10] [10] (Cost) [s] (10)
(6) (4) (40) (1) 5 (4) (0) (20) (2) [0] [8] (8) (20) 1 3 (2) 10 8 (2) (4) [10] (2) (12) 6 (10) (10) (1) (3) (6) 4 9 [10]

8 Shortest Path 2 7 5 1 10 3 8 6 4 9 [0] [8] [10] (Cost) [s] (10) (6)
(4) (40) (1) 5 (4) (0) (20) (2) [0] [8] (8) (20) 1 3 (2) 10 8 (2) (4) (2) (12) 6 (10) (10) (1) (3) (6) 4 9 [10]

9 solved closest length to node length of
Iter nodes unsolved unsolved added shortest path

10 Shortest Path 2 7 5 1 10 3 8 6 4 9 [0] [8] [10] [10] (Cost) [s] (10)
(6) (4) (40) (1) 5 (4) (0) (20) (2) [0] [8] (8) (20) 1 3 (2) 10 8 (2) (4) [10] (2) (12) 6 (10) (10) (1) (3) (6) 4 9 [10]

11 solved closest length to node length of
Iter nodes unsolved unsolved added shortest path

12 Shortest Path 2 7 5 1 10 3 8 6 4 9 [12] [0] [8] [10] [10] (Cost) [s]
(10) 2 7 (6) (4) (40) (1) 5 (4) (0) (20) (2) [0] [8] (8) (20) 1 3 (2) 10 8 (2) (4) [10] (2) (12) 6 (10) (10) (1) (3) (6) 4 9 [10]

13 Shortest Path 2 7 5 1 10 3 8 6 4 9 [12] [0] [8] [10] [10] (Cost) [s]
(10) 2 7 (6) (4) (1) 5 (4) (0) (20) [0] [8] (8) (20) 1 3 10 8 (2) (4) [10] (2) 6 (10) (10) (3) 4 9 [10]

14 solved closest length to node length of
Iter nodes unsolved unsolved added shortest path

15 Shortest Path 2 7 5 1 10 3 8 6 4 9 [12] [0] [8] [10] [10] (Cost) [s]
(10) 2 7 (6) (4) (1) 5 (4) (0) (20) [0] [8] (8) (20) 1 3 10 8 (2) (4) [10] (2) 6 (10) (10) (3) 4 9 [10]

16 Shortest Path 2 7 5 1 10 3 8 6 4 9 [12] [0] [8] [10] [10] [13] (Cost)
(10) 2 7 (6) (4) (1) 5 (4) (0) (20) [0] [8] (8) (20) 1 3 10 8 (2) (4) [10] (2) 6 (10) (10) (3) 4 9 [10] [13]

17 solved closest length to node length of
Iter nodes unsolved unsolved added shortest path

18 Shortest Path 2 7 5 1 10 3 8 6 4 9 [12] [0] [8] [10] [10] [13] (Cost)
(10) 2 7 (6) (4) (1) 5 (4) (0) (20) [0] [8] (8) (20) 1 3 10 8 (2) (4) [10] (2) 6 (10) (10) (3) 4 9 [10] [13]

19 Shortest Path 2 7 5 1 10 3 8 6 4 9 [12] [0] [8] [14] [10] [10] [13]
(Cost) [s] (10) 2 7 (6) (4) (1) 5 (4) (0) (20) [0] [8] [14] (8) (20) 1 3 10 8 (2) (4) [10] (2) 6 (10) (10) (3) 4 9 [10] [13]

20 Shortest Path 2 7 5 1 10 3 8 6 4 9 [12] [0] [8] [14] [10] [10] [13]
(Cost) [s] (10) 2 7 (6) (4) (1) 5 (4) (0) [0] [8] [14] (8) (20) 1 3 10 8 (2) (4) [10] (2) 6 (10) (3) 4 9 [10] [13]

21 solved closest length to node length of
Iter nodes unsolved unsolved added shortest path

22 Shortest Path 2 7 5 1 10 3 8 6 4 9 [12] [0] [8] [14] [10] [10] [13]
(Cost) [s] (10) 2 7 (6) (4) (1) 5 (4) (0) [0] [8] [14] (8) (20) 1 3 10 8 (2) (4) [10] (2) 6 (10) (3) 4 9 [10] [13]

23 Shortest Path 2 7 5 1 10 3 8 6 4 9 [12] [14] [0] [8] [14] [10] [10]
(Cost) [s] (10) 2 7 (6) [14] (4) (1) 5 (4) (0) [0] [8] [14] (8) (20) 1 3 10 8 (2) (4) [10] (2) 6 (10) (3) 4 9 [10] [13]

24 Shortest Path 2 7 5 1 10 3 8 6 4 9 [12] [14] [0] [8] [14] [10] [10]
(Cost) [s] (10) 2 7 [14] (4) (1) 5 (4) (0) [0] [8] [14] (8) (20) 1 3 10 8 (2) (4) [10] (2) 6 (10) (3) 4 9 [10] [13]

25 solved closest length to node length of
Iter nodes unsolved unsolved added shortest path

26 Shortest Path 2 7 5 1 10 3 8 6 4 9 [12] [14] [0] [8] [14] [10] [10]
(Cost) [s] (10) 2 7 [14] (4) (1) 5 (4) (0) [0] [8] [14] (8) (20) 1 3 10 8 (2) (4) [10] (2) 6 (10) (3) 4 9 [10] [13]

27 Shortest Path 2 7 5 1 10 3 8 6 4 9 [12] [14] [0] [8] [14] [15] [10]
(Cost) [s] (10) 2 7 [14] (4) (1) 5 (4) (0) [0] [8] [14] (8) (20) 1 3 10 8 [15] (2) (4) [10] (2) 6 (10) (3) 4 9 [10] [13]

28 Shortest Path 2 7 5 1 10 3 8 6 4 9 [12] [14] [0] [8] [14] [15] [10]
(Cost) [s] (10) 2 7 [14] (4) 5 (4) (0) [0] [8] [14] (8) 1 3 10 8 [15] (2) (4) [10] (2) 6 (10) (3) 4 9 [10] [13]

29 solved closest length to node length of
Iter nodes unsolved unsolved added shortest path

30 Shortest Path 2 7 5 1 10 3 8 6 4 9 [12] [18] [14] [0] [8] [14] [15]
(Cost) [s] (10) [18] 2 7 [14] (4) 5 (4) (0) [0] [8] [14] (8) 1 3 10 8 [15] (2) (4) [10] (2) 6 (10) (3) 4 9 [10] [13]

31 Shortest Path 2 7 5 1 10 3 8 6 4 9 [12] [18] [14] [0] [8] [14] [15]
(Cost) [s] [18] 2 7 [14] (4) 5 (4) (0) [0] [8] [14] (8) 1 3 10 8 [15] (2) (4) [10] (2) 6 (10) (3) 4 9 [10] [13]

32 solved closest length to node length of
Iter nodes unsolved unsolved added shortest path


Download ppt "Shortest Path Solutions"

Similar presentations


Ads by Google