Apply Dijkstra’s algorithm for the following graph:
Initially the set S contains the vertex A, i.e. S = {A}.
Finally, in which of the following order the vertices will be included in S, if array P holds the shortest distance from source to each vertex, then what will be P[A - E]?
1
S = {A,B,C,D,E}
P[A] = 0, P[B] = 8, P[C] = 13, P[D] = 5, P[E] = 72
S = {A,D,E,B,C}
P[A] = 0, P[B] = 8, P[C] = 9, P[D] = 5, P[E] = 73
S = {A,D,E,C,B}
P[A] = 0, P[B] = 8, P[C] = 9, P[D] = 5, P[E] = 7
4
S = {A,D,E,B,C}
P[A] = 0, P[B] = 8, P[C] = 13, P[D] = 5, P[E] = 7