graph algorithms known dv pv figure initial configuration of table used in unweighted shortest-path computation guarantee that no cheaper path will ever be foundand so processing for that vertex is essentially complete the basic algorithm can be described in figure the algorithm in figure mimics the diagrams by declaring as known the vertices at distance then then and so onand setting all the adjacent vertices that still have dw to distance dw void graph::unweightedvertex for each vertex dist infinityv known falses dist forint currdist currdist num_verticescurrdist+for each vertex if! known & dist =currdist known truefor each vertex adjacent to ifw dist =infinity dist currdist path vfigure pseudocode for unweighted shortest-path algorithm