slides
slides
slides
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
Dijkstra Algorithm<br />
• keep a cut (S : V - S) where S vertices are fixed<br />
• maintain a priority queue Q of V - S vertices<br />
• each iteration choose the best vertex v from Q<br />
•<br />
move v to S, and use d(v) to forward-update others<br />
...<br />
d(u) ⊕ = d(v) ⊗ w(v, u)<br />
S<br />
V - S<br />
time complexity:<br />
O((V+E) lgV) (binary heap)<br />
O(V lgV + E) (fib. heap)<br />
Liang Huang<br />
19<br />
Dynamic Programming