- Use Dijkstra S Algorithm To Find The Shortest Path From U To W For The Following Graph Step 0 1 2 3 4 5 T 3 15 W 5 V T 1 (53.91 KiB) Viewed 57 times
Use Dijkstra's algorithm to find the shortest path from u to w for the following graph. Step 0 1 2 3 4 5 t 3/ 15 W 5 V(T
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
Use Dijkstra's algorithm to find the shortest path from u to w for the following graph. Step 0 1 2 3 4 5 t 3/ 15 W 5 V(T
Use Dijkstra's algorithm to find the shortest path from u to w for the following graph. Step 0 1 2 3 4 5 t 3/ 15 W 5 V(T) {u} 7 {u} i The table below is similar to Table 10.6.1. Fill in the missing entries to show the action of the algorithm. E(T) u 2 v X 2 {u, x} 1 {u, x, v} X 8 X y 10 5 7 z 0 0 {{u, x}} X X F {u} {t, v, x, u} X X X 7 7 7 L(t) 7 ✓ ✓ ✓ 0 0 0 L(u) 0 0 ✓ ✔ 2 ✓ 2 L(V) 00 2 2 6 6 6 L(W) 00 1 1 1 L(x) 1 ✓ 3 3 3 The table shows the lengths of the shortest paths from u to all the other vertices of the graph. In particular, it shows that the shortest path from u to w has length 6 L(y) 8 ✓ 9 8 L(Z) 00 00 In Step 2, D(x) = u; in Step 3, D(V) = u ✔ ; in Step 4, D(y) = ?X; and in Step 5, D(w) = ?X. Tracing backwards from w gives D(w) = ?X and D Tracing backwards from w gives D(w) = ? and D(? ✔] x ) = ✔ = ?X. So, the shortest path is ---Select--- X