Lecture Overview. 2 Shortest s t path. 2.1 The LP. 2.2 The Algorithm. COMPSCI 530: Design and Analysis of Algorithms 11/14/2013

Similar documents
Lecture Overview. 2 The Steiner Tree Problem. 2.1 Steiner tree: a 2-approximation algorithm. COMPSCI 590.1: Graph Algorithms March 22, 2015

Repetition: Primal Dual for Set Cover

Lecture 7. s.t. e = (u,v) E x u + x v 1 (2) v V x v 0 (3)

Approximation Algorithms: The Primal-Dual Method. My T. Thai

CPSC 536N: Randomized Algorithms Term 2. Lecture 10

CS599: Convex and Combinatorial Optimization Fall 2013 Lecture 14: Combinatorial Problems as Linear Programs I. Instructor: Shaddin Dughmi

Steiner Trees and Forests

Solutions for the Exam 6 January 2014

In this lecture, we ll look at applications of duality to three problems:

Approximation Algorithms

Outline. 1 The matching problem. 2 The Chinese Postman Problem

CPS 102: Discrete Mathematics. Quiz 3 Date: Wednesday November 30, Instructor: Bruce Maggs NAME: Prob # Score. Total 60

4 Greedy Approximation for Set Cover

K 4 C 5. Figure 4.5: Some well known family of graphs

Approximation Algorithms

Adjacent: Two distinct vertices u, v are adjacent if there is an edge with ends u, v. In this case we let uv denote such an edge.

Notes 4 : Approximating Maximum Parsimony

8 Matroid Intersection

Duality. Primal program P: Maximize n. Dual program D: Minimize m. j=1 c jx j subject to n. j=1. i=1 b iy i subject to m. i=1

Mathematical and Algorithmic Foundations Linear Programming and Matchings

Lecture 10,11: General Matching Polytope, Maximum Flow. 1 Perfect Matching and Matching Polytope on General Graphs

1 Linear programming relaxation

LECTURES 3 and 4: Flows and Matchings

Approximation Algorithms

1. Suppose you are given a magic black box that somehow answers the following decision problem in polynomial time:

A List Heuristic for Vertex Cover

Lecture Notes 2: The Simplex Algorithm

Matching Algorithms. Proof. If a bipartite graph has a perfect matching, then it is easy to see that the right hand side is a necessary condition.

1 Variations of the Traveling Salesman Problem

The k-center problem Approximation Algorithms 2009 Petros Potikas

CS 473: Algorithms. Ruta Mehta. Spring University of Illinois, Urbana-Champaign. Ruta (UIUC) CS473 1 Spring / 36

Approximation slides 1. An optimal polynomial algorithm for the Vertex Cover and matching in Bipartite graphs

Linear Programming Duality and Algorithms

NP Completeness. Andreas Klappenecker [partially based on slides by Jennifer Welch]

Chapter 23. Minimum Spanning Trees

College of Computer & Information Science Fall 2007 Northeastern University 14 September 2007

Lecture 4: Primal Dual Matching Algorithm and Non-Bipartite Matching. 1 Primal/Dual Algorithm for weighted matchings in Bipartite Graphs

22 Elementary Graph Algorithms. There are two standard ways to represent a

1 Minimum Spanning Trees (MST) b 2 3 a. 10 e h. j m

Assignment 4 Solutions of graph problems

Lecture 2. 1 Introduction. 2 The Set Cover Problem. COMPSCI 632: Approximation Algorithms August 30, 2017

Notes for Lecture 20

ON THE EQUIVALENCE BETWEEN THE PRIMAL-DUAL SCHEMA AND THE LOCAL RATIO TECHNIQUE

Dual-fitting analysis of Greedy for Set Cover

Math 5490 Network Flows

Problem Set 2 Solutions

CSE 331: Introduction to Algorithm Analysis and Design Graphs

6.854J / J Advanced Algorithms Fall 2008

These are not polished as solutions, but ought to give a correct idea of solutions that work. Note that most problems have multiple good solutions.

6. Lecture notes on matroid intersection

11.1 Facility Location

CS473-Algorithms I. Lecture 13-A. Graphs. Cevdet Aykanat - Bilkent University Computer Engineering Department

CS 473: Algorithms. Ruta Mehta. Spring University of Illinois, Urbana-Champaign. Ruta (UIUC) CS473 1 Spring / 29

Fast and Simple Algorithms for Weighted Perfect Matching

Network flows and Menger s theorem

1. Lecture notes on bipartite matching

Shannon Switching Game

Linear Programming Motivation: The Diet Problem

Algorithm Design and Analysis

22 Elementary Graph Algorithms. There are two standard ways to represent a

The simplex method and the diameter of a 0-1 polytope

6.854 Advanced Algorithms. Scribes: Jay Kumar Sundararajan. Duality

1 Bipartite maximum matching

Lecture #7. 1 Introduction. 2 Dijkstra s Correctness. COMPSCI 330: Design and Analysis of Algorithms 9/16/2014

Primal-Dual Algorithms for Connected Facility Location Problems

Section Notes 4. Duality, Sensitivity, and the Dual Simplex Algorithm. Applied Math / Engineering Sciences 121. Week of October 8, 2018

Primal-Dual Methods for Approximation Algorithms

1 Matching in Non-Bipartite Graphs

val(y, I) α (9.0.2) α (9.0.3)

Outline. Combinatorial Optimization 2. Finite Systems of Linear Inequalities. Finite Systems of Linear Inequalities. Theorem (Weyl s theorem :)

Problem set 2. Problem 1. Problem 2. Problem 3. CS261, Winter Instructor: Ashish Goel.

Applied Mathematical Sciences, Vol. 5, 2011, no. 49, Július Czap

Solution for Homework set 3

CMSC 451: Lecture 22 Approximation Algorithms: Vertex Cover and TSP Tuesday, Dec 5, 2017

CSE 417 Network Flows (pt 4) Min Cost Flows

12.1 Formulation of General Perfect Matching

Math 5593 Linear Programming Lecture Notes

Copyright 2000, Kevin Wayne 1

8 Colouring Planar Graphs

Assignment # 4 Selected Solutions

Single Source Shortest Path

Solving problems on graph algorithms

11 Linear Programming

A 3 2-Approximation Algorithm for Some Minimum-Cost Graph Problems

Lecture 8: The Traveling Salesman Problem

princeton univ. F 15 cos 521: Advanced Algorithm Design Lecture 2: Karger s Min Cut Algorithm

5. Lecture notes on matroid intersection

Iterative Methods in Combinatorial Optimization. R. Ravi Carnegie Bosch Professor Tepper School of Business Carnegie Mellon University

Section Notes 5. Review of Linear Programming. Applied Math / Engineering Sciences 121. Week of October 15, 2017

Notes for Lecture 24

Linear programming and duality theory

CS261: A Second Course in Algorithms Lecture #16: The Traveling Salesman Problem

1. Lecture notes on bipartite matching February 4th,

ACO Comprehensive Exam October 12 and 13, Computability, Complexity and Algorithms

Minimum-Spanning-Tree problem. Minimum Spanning Trees (Forests) Minimum-Spanning-Tree problem

Discrete Optimization 2010 Lecture 5 Min-Cost Flows & Total Unimodularity

Solutions to In-Class Problems Week 4, Fri

Approximation Algorithms

A General Approach to Online Network Optimization Problems

Graphs and Network Flows IE411. Lecture 21. Dr. Ted Ralphs

Transcription:

COMPCI 530: Design and Analysis of Algorithms 11/14/2013 Lecturer: Debmalya Panigrahi Lecture 22 cribe: Abhinandan Nath 1 Overview In the last class, the primal-dual method was introduced through the metric facility location problem. This lecture discusses two more problems where the primal-dual schema is used to give exact and approximate algorithms respectively for the shortest path and the steiner forest problem. 2 hortest s t path Given an undirected graph with non-negative costs associated with the edges, we want to find a shortest path between two specified vertices s and t. In this section, we will develop a primal-dual algorithm for this problem, which will turn out to be Dijkstra s algorithm in a different guise. 2.1 The LP The LP for the problem and its dual are given below min c e x e e E e δ() 2.2 The Algorithm x e 1 : s,t / y c e :e δ() maxy e E x e 0 e E y 0 : s,t / The primal-dual method increases the dual variables gradually until some dual constraint becomes tight. Then, the primal variable corresponding to the tight dual constraint is bought (or selected), and the process continues till we get a feasible primal solution. Next, we compare the value of the primal solution to the value of the dual solution to get an appropriate approximation factor (or an exact algorithm). By weak duality, the ratio between the primal and the dual value is an upperbound on the approximation factor. In the current problem, at each step we have to choose what dual variables we increase. We increase the dual variable corresponding to the connected component containing s. Initially, it is the set {s}. Once a constraint becomes tight, the corresponding edge is selected and the component grows. This continues till the component contains t. However we might have included too many edges. o we do a clean up step at the end to retain only those edges necessary to ensure an s t path. The algorithm is stated below 22-1

Algorithm 1 Primal-Dual s-t path 1: y 0 2: A φ 3: i 0 4: while A is not feasible do 5: i i + 1 6: Let be the connected component containing s 7: Increase y until e i δ() : :ei δ() y s = c ei 8: A A {e i } 9: end while 10: for j i down to 1 do 11: if A {e j } is still feasible then 12: A A {e j } 13: end if 14: end for 15: return A A 2.3 Analysis We will argue that the cost of the edges included in A is exactly equal to the dual value, thereby giving an exact algorithm. We have c e = e A e A :e δ() y = y A δ() The following lemma will then imply that the value of the solution is exactly equal to the dual value. Lemma 1. For all such that y > 0, A δ() = 1. Proof. Consider the stage when we increase a particular y. Let A be the edges in at this stage. Letting B = A A, we see that in the clean up phase, all the edges in B were considered for deletion before all the edges in A and were retained because deleting them would make the solution infeasible. Now, A δ() will contain edges only from B. Consider an s t path P in A B. uppose it crosses the cut multiple times. Consider the last such edge (u,v). ince u is in the same connected component as s, there exists a path entirely in A from s to u, and this path along with the remaining part of P from v to t gives an s t path. Thus, all the remaining edges of P crossing are unnecessary, and would have been deleted in the clean up phase. Thus, all s t paths in A cross only once. Also, all these paths converge and cross at only one edge, because if we have multiple crossing edges, all but one would have been deleted in the clean up phase because deleting them still retains an s t path. Any other crossing edge not part of an s t path will also be deleted in the clean-up phase, thus implying that A δ() = 1. 3 teiner forest In the teiner forest problem, we are given an undirected graph G = (V,E) with costs c e 0 for each edge e. We are also given l pairs of vertices {(s i,t i ) : i = 1,...,l)}. Our goal is to choose a minimum cost subset of edges so that the for all i, s i and t i are are connected. 22-2

3.1 The LP Let i = { V : {s i,t i } = 1}. A linear program and its dual for the teiner forest problem are given below min c e x e max y e E : i for some i e δ() 3.2 The Algorithm x e 1 : i for some i y c e :e δ() e E x e 0 e E y 0 : i for some i We use an approach similar to the previous problem, but now we increase the values simultaneously and unifromly for all the connected components not having both s j and t j for any j. The algorithm is stated below Algorithm 2 Primal-Dual teiner forest 1: y 0 2: A φ 3: i 0 4: while A is not feasible do 5: i i + 1 6: C i { : is a connected component of (V,A) : {s j,t j } = 1 for some j} 7: Increase y for all C i until e i / A : :ei δ() y s = c ei 8: A A {e i } 9: end while 10: for j i down to 1 do 11: if A {e j } is still feasible then 12: A A {e j } 13: end if 14: end for 15: return A A 4 Analysis Lemma 2. For any i, C C i A δ(c) 2 C i Proof. Let A i denote the set of edges chosen till iteration i. Let B = A A i. Then A i B is a feasible solution, but removing any edges from it renders the set infeasible. 22-3

Consider the graph (V,B) obtained by contracting the connected components induced by A i. We call the vertices corresponding to components in C i red vertices, and the remaining are called blue vertices. The edges in B form a forest, because if not then removing an edge of a cycle in B still maintains feasibility, cotradicting the definition of B. Then, A δ(c) is same as the degree of the vertex corresponding to C C i in the graph (V,B). Thus we need to show that For this, we need the following claim Claim 3. If v Blue then deg(v) 1 deg(v) 2 Red v Red Proof. uppose there exists a blue vertex v such that deg(v) = 1. uppose we delete the edge e incident to v. ince v is a blue vertex, there does not exist any (s i,t i ) such that C {s i,t i } = 1, where C is the connected component corresponding to v. Thus, deleting e still keeps the set of edges feasible, contradicting the definition of B. Thus we have, v Red deg(v) = deg(v) deg(v) v Red Blue v Blue 2( Red + Blue ) 2 Blue = 2 Red The second step uses the fact that the sum of the degrees in a forest is at most twice the number of vertices. Using lemma 2 we prove the following, thereby showing a 2-approximation factor. Theorem 4. Proof. We have, c e = e A e A c e 2 e A :e δ() y y = y A δ() Thus we have to show y A δ() 2y We use induction on the number of iterations of the algorithm to prove the claim. Initially, A = φ and y = 0 and the inequality holds trivially. uppose the claim holds for the ith iteration. In the (i + 1)th iteration, suppose we increase the dual variables unifromly by ε. Then the LH of the inequality increases by ε Ci+1 A δ(). The RH increases by 2ε C i+1, which is at least the increase in the LH by lemma 2. Thus the inequality holds after the (i + 1)th iteration too. 22-4

5 ummary In this lecture, we have illustrated the primal-dual method by giving an exact algorithm for the single pair shortest path problem and a 2-approximation algorithm for the teiner forest problem. References [1] http://courses.csail.mit.edu/6.891-s00/lecture8.ps 22-5