Tables 2.8 - Example CSE 2011 Prof. J. Elder - 201 - Last...

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Example CSE 2011 Prof. J. Elder - 201 - Last Updated: 4/1/10 10:16 AM Example CSE 2011 Prof. J. Elder - 202 - Last Updated: 4/1/10 10:16 AM Example CSE 2011 Prof. J. Elder - 203 - Last Updated: 4/1/10 10:16 AM Djikstra’s Algorithm Cannot Handle Negative Edges 2 3 s CSE 2011 Prof. J. Elder -2 1 y x - 204 - z Last Updated: 4/1/10 10:16 AM Correctness of Dijkstra’s algorithm Loop invariant: d[v] = (s, v) for all v in S. Initialization: Initially, S is empty, so trivially true. Termination: At end, Q is empty S=V d[v] = (s, v) for all v in V. Maintenance: Need to show that d[u] = (s, u) when u is added to S in each iteration. d[u] does not change once u is added to S. CSE 2011 Prof. J. Elder - 205 - Last Updated: 4/1/10 10:16 AM ...
View Full Document

This note was uploaded on 02/14/2012 for the course CSE 2011Z taught by Professor Elder during the Fall '11 term at York University.

Page1 / 5

Tables 2.8 - Example CSE 2011 Prof. J. Elder - 201 - Last...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online