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

Similar documents
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

Number Theory and Graph Theory

Graph Theory Day Four

Ma/CS 6b Class 5: Graph Connectivity

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

Section 3.1: Nonseparable Graphs Cut vertex of a connected graph G: A vertex x G such that G x is not connected. Theorem 3.1, p. 57: Every connected

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.

Bipartite Roots of Graphs

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

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

1 Linear programming relaxation

CPCS Discrete Structures 1

CME 305: Discrete Mathematics and Algorithms Instructor: Reza Zadeh HW#3 Due at the beginning of class Thursday 02/26/15

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

1 Random Walks on Graphs

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

6 Randomized rounding of semidefinite programs

1 Matching in Non-Bipartite Graphs

Steiner Trees and Forests

Treewidth and graph minors

1 Bipartite maximum matching

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.

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

The Ordered Covering Problem

Repetition: Primal Dual for Set Cover

6. Lecture notes on matroid intersection

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

CHAPTER 2. Graphs. 1. Introduction to Graphs and Graph Isomorphism

Dual-fitting analysis of Greedy for Set Cover

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

1 Undirected Vertex Geography UVG

Modules. 6 Hamilton Graphs (4-8 lectures) Introduction Necessary conditions and sufficient conditions Exercises...

Discrete mathematics II. - Graphs

GRAPH THEORY and APPLICATIONS. Factorization Domination Indepence Clique

Small Survey on Perfect Graphs

Graphs: Introduction. Ali Shokoufandeh, Department of Computer Science, Drexel University

CS200: Graphs. Prichard Ch. 14 Rosen Ch. 10. CS200 - Graphs 1

Assignment 4 Solutions of graph problems

Theorem 3.1 (Berge) A matching M in G is maximum if and only if there is no M- augmenting path.

Computer Science 280 Fall 2002 Homework 10 Solutions

Basic Approximation algorithms

8 Matroid Intersection

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

The Structure of Bull-Free Perfect Graphs

Solution to Graded Problem Set 4

DO NOT RE-DISTRIBUTE THIS SOLUTION FILE

12.1 Formulation of General Perfect Matching

Slides on Approximation algorithms, part 2: Basic approximation algorithms

Fast-Mixed Searching and Related Problems on Graphs

Section 8.2 Graph Terminology. Undirected Graphs. Definition: Two vertices u, v in V are adjacent or neighbors if there is an edge e between u and v.

NP-Completeness. Algorithms

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

Introduction to Graph Theory

Assignment # 4 Selected Solutions

Math 776 Graph Theory Lecture Note 1 Basic concepts

A taste of perfect graphs (continued)

(67686) Mathematical Foundations of AI July 30, Lecture 11

Matching Theory. Figure 1: Is this graph bipartite?

Greedy Algorithms and Matroids. Andreas Klappenecker

Lecture 6: Faces, Facets

Elements of Graph Theory

CME 305: Discrete Mathematics and Algorithms Instructor: Reza Zadeh HW#3 Due at the beginning of class Thursday 03/02/17

1. Lecture notes on bipartite matching

Graphs (MTAT , 6 EAP) Lectures: Mon 14-16, hall 404 Exercises: Wed 14-16, hall 402

Graph Theory S 1 I 2 I 1 S 2 I 1 I 2

15-451/651: Design & Analysis of Algorithms October 11, 2018 Lecture #13: Linear Programming I last changed: October 9, 2018

Discrete Wiskunde II. Lecture 6: Planar Graphs

Chapter 10 Part 1: Reduction

Matchings in Graphs. Definition 1 Let G = (V, E) be a graph. M E is called as a matching of G if v V we have {e M : v is incident on e E} 1.

Testing Eulerianity and Connectivity in Directed Sparse Graphs

Greedy Algorithms and Matroids. Andreas Klappenecker

Algorithms: Graphs. Amotz Bar-Noy. Spring 2012 CUNY. Amotz Bar-Noy (CUNY) Graphs Spring / 95

/ Approximation Algorithms Lecturer: Michael Dinitz Topic: Linear Programming Date: 2/24/15 Scribe: Runze Tang

Problem Set 3. MATH 776, Fall 2009, Mohr. November 30, 2009

COT 6936: Topics in Algorithms! Giri Narasimhan. ECS 254A / EC 2443; Phone: x3748

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

(5.2) 151 Math Exercises. Graph Terminology and Special Types of Graphs. Malek Zein AL-Abidin

THE SEMIENTIRE DOMINATING GRAPH

Vertex Cover is Fixed-Parameter Tractable

Notes for Lecture 20

1. Lecture notes on bipartite matching February 4th,

2 The Fractional Chromatic Gap

P and NP (Millenium problem)

Graph Theory and Optimization Approximation Algorithms

Graph theory - solutions to problem set 1

Algorithms. Graphs. Algorithms

1 The Traveling Salesperson Problem (TSP)

Algorithm and Complexity of Disjointed Connected Dominating Set Problem on Trees

Advanced Algorithms Class Notes for Monday, October 23, 2012 Min Ye, Mingfu Shao, and Bernard Moret

arxiv: v1 [cs.dm] 30 Apr 2014

Math.3336: Discrete Mathematics. Chapter 10 Graph Theory

9 About Intersection Graphs

5. Lecture notes on matroid intersection

Linear Programming Duality and Algorithms

Combinatorial Optimization

Theorem 2.9: nearest addition algorithm

Approximation Algorithms

Math 778S Spectral Graph Theory Handout #2: Basic graph theory

Graph Theory: Matchings and Factors

Transcription:

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

Approximation slides 2 Linear independence A collection of row vectors {v T i } are independent if there are no constants {c i } so that i c iv T i = 0. For an n n matrix the rows are independent if and only if the determinant is not 0. The rank of a matrix the maximum subset of rows that are independent. The rank of the rows and the rank of the columns is the same.

Approximation slides 3 The rank of a matrix If we have Maximize c v such that Ax b and x 0, the rank of the rows equals the number of variables q. Its easy to see that x 0 are independent and can create any vector hence the rank is the number of variables. The rank of rows is q Say that that there are q variables. Recall the a BFS is obtained by taking q independent rows and put equality and solve this q q, system of equalities A x = b. This solution exists and is unique since A has an inverse matrix A 1 (because its determinant is not 0). Thus x = A 1 B. A unique solution exists.

Approximation slides 4 Main property For minimize c x under Ax b, x 0, The main property we use is: Theorem 1 The number of independent rows is the number of variables. Proof. The columns x i 0 are a collection of n independent vectors. In addition, any other vector is a linear combination of those columns vectors. Let I i be the vector with 1 in place i. Let v T = (x 1,x 2,...,x n ). Then v T = n i=1 x i I T i.

Approximation slides 5 The Vertex Cover problem Given a graph G(V,E), a subset U V is a Vertex Cover if for every edge e = (u,v), either u U, or v U or both of the above hold. The vertex Cover problem Input: An undirected weighted graph G(V, E) with a cost function c : V Q + c(v) for every v. Required: A minimum cost subgraph U that is a Vertex Cover.

Approximation slides 6 An example of a minimum Vertex Cover A B H C Z G D F E Figure 1: The squared vertices are a vertex cover. Every edge is touched by at least one squared vertex and some times EF by two of the chosen

Approximation slides 7 A fractional LP for VC Minimize opt f = c v x v subject to x v +x u 1 x v 0 for every e = (u,v) The x v vertices in a Linear program are 1 if the vertex that is in the solution. And its zero of its not in the solution. The main inequality x v +x u 1 indicates that either v or u (or both of them, and so we can not have equality) belongs to the vertex cover. We need to relax this to a fractional program.

Approximation slides 8 Bipartite graphs Definition 2 A bipartite graph G(V 1,V 2,E), is a graph so that V = V 1 V 2, and there are no edges inside V 1 and no edges inside V 2, thus all edges go from V 1 to V 2. Such graphs are also called 2-colorable and in an equivalent definition its the collection of graphs that do not contains simple odd cycles. V 2 A B C D E V 1 F G H Y Z Figure 2: An example of a bipartite graph

Approximation slides 9 The variables versus edges matrix of a bipartite graph A B C D E X AD AE BD BX CE CX A 1 1 0 0 0 0 B 0 0 1 1 0 0 C 0 0 0 0 1 1 D 1 0 1 0 0 0 E 0 1 0 0 1 0 X 0 0 0 1 0 1 Figure 3: The above LP uses the vertices versus edges matrix

Approximation slides 10 The rows of the matrix of edges versus vertices These rows are dependent. Note that if we add the rows of A,B,C this gives the same as adding the rows of D,EX. In fact they both give the all 1 vector since each edge touches exactly one vertex in V 1 and exactly one vertex in V 2. See the sum of the rows A,B,C and the sum of the rows of D,E,X.

Approximation slides 11 An corollary on cycles Corollary 3 In a bipartite graph, the (row) vectors of the edges of a cycle are dependent. Proof. Any cycle is of even length and induces a subgraph G (V 1,V 2,E ) with (only) the edges of the cycle. Thus Theorem is implied by the previous slide Thus a valid collection of rows (namely a collection of edges that induce a legal subgraph) is independent if and only if the edges induce a forest

Approximation slides 12 An optimal iterative rounding algorithm Theorem 4 Say that x v > 0 for every v. Then there exists a subset F E of the edges so that 1. x v +x u = 1 for e = vu. 2. The rows of the edges are linearly independent 3. F = V This follows from the characterization of a BFS.

Approximation slides 13 An optimum algorithm Let δ(v) be the edges touching v. 1. Set U 2. While V(G) do (a) Find an optimum solution for the above LP (b) If there is a vertex with x v = 0 and deg( E (v) = 0 remove this vertex (c) If there is a vertex with x v = 1, add v to u and set U U {v} and E E \δ(v) 3. Return U

Approximation slides 14 Correctness We need to show that in any iteration there is a vertex v so that x v = 1 or x v = 0. Then optimality follows like in the Assignment problem Claim 1 In every iteration either we find a vertex v with x v = 0 and deg E (v) = 0 (for the remaining edges), or we find a vertex v with x v = 1.

Approximation slides 15 Proof For the sake of contradiction, assume that Claim 1 is false. Thus for every vertex x v < 1 and if x v = 0, deg E (v) > 0. Note that for no vertex, x v = 0 since in this case all the neighbors if v have value 1 Let F be the set of edges whose rows are independent and F = V. This gives a contradiction as any cycle implies that the rows of F are not independent. See Corollary 3 that implies that F is a forest, and so has at most n 1 edges.

Approximation slides 16 A polynomial algorithm for maximum matching in Bipartite graphs The algorithm: 1. F 2. While E(G) do: (a) Compute a solution to the above LP. (b) Remove every edge e with y e = 0. (c) If there is an edge e = uv so that y e so that y e = 1 then set F F F {e} and E E \{uv} 3. Return F

Approximation slides 17 A cycle cover Claim 2 If deg(v) = 2 for every v, then there is a collection of vertex disjoint cycles that contains all of V Proof. Consider an edge = uv. Since both u,v have degree 2 we can make the path longer by two. We can continue like that each time getting mew vertices (else we get degree 2). This process must end. This means that the two endpoints of the paths have the same neighbor. This gives a cycle.

Approximation slides 18 Correctness Claim 3 In every iteration we either find an edge e so that y e = 0 or we find an edge e so that y e = 1

Approximation slides 19 Proof For the sake of contradiction assume that in some iteration 0 < y e < 1 for every e. Let W be a collection of edges whose rows are independent and W = E (as E is the number of vertices). Note that deg E (v) 2 as at least two edges are required to get a sum of 1. In addition y(δ(e)) = 1 for every edge whose row was selected. Thus 2 W = 2 E = v V deg E(v) v W deg E(v) 2 W. This implies that all inequalities hold with equality. In particular if there is an edge E \W with y e > 0 we do not get an equality.

Approximation slides 20 Proof continued Also if there is a vertex in W so that deg E (W) > 2 as otherwise the sum is more than E. This means that all degrees of vertices of W are 2. Thus E is a collection of cycles that contains all the vertices of W. This cant be as we saw that cycles imply linear dependance. This ends the proof

Approximation slides 21 Corollary Corollary 5 In an uniform weight bipartite graph, the size of the maximum matching is equal the size of the minimum VC This follows since both problems have an integral optimum, and by strong duality. Note that the complement of a vertex cover is an independent set. Namely a set of vertices, no two of which share an edge. Thus finding the maximum weight Independent set is polynomial time solvable