void graph::dijkstravertex for each vertex dist infinityv known falses dist whilethere is an unknown distance vertex vertex smallest unknown distance vertexv known truefor each vertex adjacent to if! known disttype cvw cost of edge from to wifv dist cvw dist /update decreasew dist to dist cvw ) path vfigure pseudocode for dijkstra' algorithm it isit is simply ignored and another deletemin is performed although this method is superior from software point of viewand is certainly much easier to codethe size of the priority queue could get to be as large as |ethis does not affect the asymptotic time boundssince | <| | implies that log | < log |vthuswe still get an (|elog | |algorithm howeverthe space requirement does increaseand this could be important in some applications moreoverbecause this method requires |edeletemins instead of only | |it is likely to be slower in practice notice that for the typical problemssuch as computer mail and mass transit commutesthe graphs are typically very sparse because most vertices have only couple of edgesso it is important in many applications to use priority queue to solve this problem there are better time bounds possible using dijkstra' algorithm if different data structures are used in we will see another priority queue data structure called the