Question
Consider the following modification of Dijkstras algorithm: h ... initialization ... i H := makequeue(V ) while H is not empty v := deletemin(H) for
Consider the following modification of Dijkstras algorithm: h ... initialization ... i H := makequeue(V ) while H is not empty v := deletemin(H) for each e = (v, z) E if dist(v) + w(v,z) < dist(z) then dist(z) = dist(v) + w(v,z)
if z is in the queue H then decreasekey(H,z) else insert(H,z)
The modified algorithm correctly computes the distances in graphs with no negative cycles (negative edges allowed). (Remember, original Dijkstras algorithm does not correctly compute distances if negative edges are allowed.) Say something interesting about the running time of the modified Dijkstras algorithm. Prove your statement.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started