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