Question
please help...confusing part is the horizontal being negative
8. Consider the graph below. Suppose cach vertical edge has weight cach borizontal edge has weight -1 and each diagonal edge has weight 2. On which iteration of the while loop in Dijkstra's algoritm, run with source vertex in position ( is the correct distance to the solid black distance first detemined? Note this question is different than asking when te hlack vertex is extracted. When executing the algorithm, break ties hy using lexicographic row major) cxrder. 10
Explanation / Answer
5th iteration In each iteration you reach to next column . In 4th iteration you reach the desired column but in netx iteration you fix the distance.