

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


The following example shows how we can run Dijkstra’s algorithm over a graph. The start vertex is ST.
% → stands for infinity
| | v | --------->B---------->D---- 6 [%,-] 3 [%,-]
| | 5| | After selecting 1 st^ Node | | v | --------->B---------->D---- 6 [6,ST] 3 [%,-]
| | 5| | After selecting 2 nd^ Node | (2)| v | --------->B---------->D---- 6 [6,ST] 3 [9,B]
| | | | After selecting 3 rd^ Node | | 5| | | (2)| (3)v | --------->B---------->D---- 6 [6,ST] 3 [9,B]
| | 5| | After selecting 4 th^ Node | (2)| (3)v | --------->B---------->D---- 6 [6,ST] 3 [9,B]
| | 5| | After selecting 5 th^ Node | (2)| (3)v | --------->B---------->D---- 6 [6,ST] 3 [9,B]