07_ Label_Correcting_Algorithm

07_ Label_Correcting_Algorithm - 15.082J 6.855J The Label...

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

15.082J / 6.855J February 27, 2003 The Label Correcting Algorithm

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

View Full Document
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
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.

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

View Full Document
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.
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).

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

View Full Document
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).
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.

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

View Full Document
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.
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Page1 / 29

07_ Label_Correcting_Algorithm - 15.082J 6.855J The Label...

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

View Full Document
Ask a homework question - tutors are online