07_ Label_Correcting_Algorithm

07_ Label_Correcting_Algorithm - 15.082J / 6.855J February...

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

View Full Document Right Arrow Icon
15.082J / 6.855J February 27, 2003 The Label Correcting Algorithm
Background image of page 1

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

View Full DocumentRight Arrow Icon
2 Overview of the Lecture A generic algorithm for solving shortest path problems negative costs permitted but no negative cost cycle (at least for now) The use of reduced costs All pair shortest path problem INPUT G = (N, A) with costs c Node 1 is the source node There is no negative cost cycle We will relax that assumption later
Background image of page 2
3 Optimality Conditions Lemma. Let d*(j) be the shortest path length from node 1 to node j, for each j. Let d( ) be node labels with the following properties: d(j) d(i) + c ij for i N for j 1. (1) d(1) = 0. (2) Then d(j) d*(j) for each j. Proof . Let P be any path from node 1 to node j, with length c(P), and suppose P has k arcs. Claim : d(j) c(P). Note: if P is the shortest path from 1 to j, then d(j) c(P) = d*(j), which is what we want to prove.
Background image of page 3

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

View Full DocumentRight Arrow Icon
4 Completion of the proof. Claim : d(j) c(P). Assume the claim is true for all paths with fewer than k arcs. We will show it is also true for path P. Suppose P = P’, (i,j). 1 i j P’ d(i) c(P’) by inductive hypothesis. d(j) – d(i) c ij by assumption (1) So, d(j) c(P’) + c ij = c(P), completing the proof.
Background image of page 4
5 Optimality Conditions Theorem. Let d(1), . . . , d(n) satisfy the following properties for a directed graph G = (N,A): 1. d(1) = 0. 2. d(i) is the length of some path from node 1 to node i. 3. d(j) d(i) + c ij for all (i,j) A. Then d(j) = d*(j). Proof . d(j) d*(j). Also, d(j) d*(j) as d(j) is the length of some path from node 1 to node j. Thus d(j) = d*(j).
Background image of page 5

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

View Full DocumentRight Arrow Icon
6 A Generic Shortest Path Algorithm Notation . d(j) = “temporary distance labels”. At each iteration, it is the length of a path (or walk) from 1 to j. At the end of the algorithm d(j) is the minimum length of a path from node 1 to node j. Pred(j) = Predecessor of j in the path of length d(j) from node 1 to node j. c ij = length of arc (i,j).
Background image of page 6
7 A Generic Shortest Path Algorithm A lgorithm LABEL CORRECTING; begin d(1) : = 0 and Pred(1) := ø; d(j) : = for each j N – {1}; while some arc (i,j) satisfies d(j) > d(i) + c ij do begin d(j) : = d(i) + c ij ; Pred(j) : = i; end ; end ; Label correcting animation.
Background image of page 7

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

View Full DocumentRight Arrow Icon
8 Theorem . Suppose all data are integral, and that there are no negative cost cycles in the network. Then the label correcting algorithm ends after a finite number of steps with the optimal solution.
Background image of page 8
Image of page 9
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 29

07_ Label_Correcting_Algorithm - 15.082J / 6.855J February...

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

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