Dijkstra’s Algorithm is a method of finding a shortest path from a vertex to another by comparing multiple paths and finding the shortest value or sum of values.
First, start finding the shortest paths to the vertices one edge away from A, which are B, and J.
Always check for multiple paths and find the one with the lowest value.
B
:
8 or 5
J
:
2
Now start finding the shortest paths to the vertices two edges away from A, which are C and I.
Always check for multiple paths and find the one with the lowest value.
C
:
6
I
:
8 or 7
Then start finding the shortest paths to the vertices three edges away from A, which are H and D.
Always check for multiple paths and find the one with the lowest value.
H
:
11 or 8
D
:
12 or 10
Next, start finding the shortest paths to the vertices four edges away from A, which are G and E.
Always check for multiple paths and find the one with the lowest value.
G
:
16 or 9
E
:
15 or 11
Now start finding the shortest paths to the vertex F.
Always check for multiple paths and find the one with the lowest value.
F
:
14 or 12
Finally, mark the shortest path from A to F to find its sequence.
Therefore, the sequence of the shortest path is A−B−C−H−G−E−F.
A−B−C−H−G−E−F
Question 2 of 4
2. Question
The network shows the time table of a bus to travel to between bus stops. Find the sequence with the shortest time to travel from bus stop Q to W.
Dijkstra’s Algorithm is a method of finding a shortest path from a vertex to another by comparing multiple paths and finding the shortest value or sum of values.
First, start finding the shortest paths to the vertices one edge away from Q, which are R, U and X.
Always check for multiple paths and find the one with the lowest value.
R
:
25 or 13
U
:
15
X
:
14
Now start finding the shortest paths to the vertices two edges away from Q, which are Y, S and V.
Always check for multiple paths and find the one with the lowest value.
Y
:
23
S
:
27 or 24
V
:
34,30 or 28
Then start finding the shortest paths to the vertices three edges away from Q, which are T and Z.
Always check for multiple paths and find the one with the lowest value.
T
:
39 or 35
Z
:
32 or 29
Now start finding the shortest paths to the vertex W.
Always check for multiple paths and find the one with the lowest value.
F
:
46,45 or 44
Finally, mark the shortest path from Q to W to find its sequence.
Therefore, the sequence that will take the shortest time from Q to W is Q−U−V−T−W.
Q−U−V−T−W
Question 3 of 4
3. Question
Find the sequence of the shortest path from point A to point E.
Dijkstra’s Algorithm is a method of finding a shortest path from a vertex to another by comparing multiple paths and finding the shortest value or sum of values.
First, start finding the shortest paths to the vertices one edge away from A, which are B, I and H.
Always check for multiple paths and find the one with the lowest value.
B
:
12 or 11
I
:
5
H
:
7
Now start finding the shortest paths to the vertices two edges away from A, which are G, C and J.
Always check for multiple paths and find the one with the lowest value.
G
:
17 or 12
C
:
22 or 11
J
:
22,21 or 14
Then start finding the shortest paths to the vertices three edges away from A, which are F and D.
Always check for multiple paths and find the one with the lowest value.
F
:
26 or 20
D
:
24 or 22
Now start finding the shortest paths to the vertex E.
Always check for multiple paths and find the one with the lowest value.
E
:
25 or 24
Finally, mark the shortest path from A to E to find its sequence.
Therefore, the sequence that will take the shortest path from A to E is A−I−G−F−D−E.
A−I−G−F−D−E
Question 4 of 4
4. Question
The network shows the time in minutes for a car to travel to between points. Find the sequence with the shortest possible time to travel from E to J.
Dijkstra’s Algorithm is a method of finding a shortest path from a vertex to another by comparing multiple paths and finding the shortest value or sum of values.
First, start finding the shortest paths to the vertices one edge away from E, which are F, M and L.
Always check for multiple paths and find the one with the lowest value.
F
:
20
M
:
15
L
:
18
Now start finding the shortest paths to the vertices two edges away from E, which are N, G, O and P.
Always check for multiple paths and find the one with the lowest value.
N
:
29 or 22
G
:
36 or 32
O
:
29 or 25
P
:
32 or 28
Then start finding the shortest paths to the vertices three edges away from E, which are Q, K and H.
Always check for multiple paths and find the one with the lowest value.
Q
:
29
K
:
39,36 or 35
H
:
41 or 37
Now start finding the shortest paths to the vertices J and I.
Always check for multiple paths and find the one with the lowest value.
J
:
41 or 39
I
:
51 or 44
Finally, mark the shortest path from E to J to find its sequence.
Therefore, the sequence that will take the shortest time from E to J is E−M−N−O−Q−K−J.