initial state dequeued dequeued dequeued known dv pv known dv pv known dv pv known dv pv qv dequeued dequeued dequeued dequeued known dv pv known dv pv known dv pv known dv pv qv empty figure how the data change during the unweighted shortest-path algorithm casethen we should set dw dv cv, if this new value for dw would be an improvement put simplythe algorithm decides whether or not it is good idea to use on the path to the original costdw is the cost without using vthe cost calculated above is the cheapest path using (and only known verticesthe graph in figure is our example figure represents the initial configurationassuming that the start nodesis the first vertex selected is with path length this vertex is marked known now that is knownsome entries need to be adjusted the vertices adjacent to are and both these vertices get their entries adjustedas indicated in figure nextv is selected and marked known vertices and are adjacentand it turns out that all require adjustingas shown in figure nextv is selected is adjacent but already knownso no work is performed on it is adjacent but not adjustedbecause the cost of going through is and path of length is already known figure shows the table after these vertices are selected