End of Term Review 2.8

End of Term Review 2.8 - Relaxing an edge Can we improve...

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: Relaxing an edge Can we improve shortest-path estimate for v by first going to u and then following edge (u,v)? RELAX(u, v, w) if d[v] > d[u] + w(u, v) then d[v] [v] CSE 2011 Prof. J. Elder d[u] + w(u, v) u - 86 - Last Updated: 4/1/10 2:37 PM General single-source shortest-path strategy 1. Start by calling INIT-SINGLE-SOURCE 2. Relax Edges Algorithms differ in the order in which edges are taken and how many times each edge is relaxed. CSE 2011 Prof. J. Elder - 87 - Last Updated: 4/1/10 2:37 PM Example: Single-source shortest paths in a directed acyclic graph (DAG) Since graph is a DAG, we are guaranteed no negative-weight cycles. Thus algorithm can handle negative edges CSE 2011 Prof. J. Elder - 88 - Last Updated: 4/1/10 2:37 PM Example CSE 2011 Prof. J. Elder - 89 - Last Updated: 4/1/10 2:37 PM Example CSE 2011 Prof. J. Elder - 90 - Last Updated: 4/1/10 2:37 PM ...
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

End of Term Review 2.8 - Relaxing an edge Can we improve...

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