Vertex covers Definition A vertex cover of a graph G is a subset of vertices S ✓ V (G) such that every edge has an endpoint in S. (That is, for all e 2 E(G), e \ S 6= ;.) Example Vertices represent guard stations at an art gallery, while edges represent hallways. Find a vertex cover (so that all hallways are guarded). vertex cover of size 5 Definition The vertex covering number of G is the minimum cardinality of a vertex cover and is denoted (G). Example Petersen graph Remark NP-complete decision problem Instance: graph G, pos. integer k Question: Is there a vertex cover of G of size k? (G) = 6 A useful tool: for an induced subgraph H of graph G, (G) (H). Math 104 - Prof. Kindred - Lecture 7 Page 1 Question What is the relationship between vertex covers and matchings of a graph? Example Petersen graph has a vertex cover of size 6 and a matching of size 5 Proposition. For any graph G, ↵0(G) (G). Proof. Let M be a maximum matching of G, and let S be a minimum vertex cover. For every edge e in M , there exists an endpoint of e in S. Thus, because edges of M share no endpoints, ↵0(G) = |M | |S| = (G). ⌅ Corollary. If G = (V, E) is a graph, M ✓ E is a matching of G, and S ✓ V is a vertex cover of G such that |S| = |M |, then • M is maximum, • S is minimum, • and ↵0(G) = |M | = |S| = (G). Example ↵0(G) = (G) = 4 What kind of graph is G? Math 104 - Prof. Kindred - Lecture 7 Page 2 König-Egerváry theorem Are there certain kinds of graphs G for which ↵0(G) = (G)? Theorem (König-Egerváry theorem). If G is a bipartite graph, then ↵0(G) = (G). Proof. Let X, Y be a bipartition of bipartite graph G, and let S be a minimum vertex cover of G. Strategy: construct a matching of size |S|. Let A = X \ S, B = Y \ S, C = X A, D = Y B. A D C B X Y We focus on induced subgraphs G[A [ D] and G[B [ C]. Claim: For any subset T ✓ A, |NG[A[D](T )| |T |. Proof. Suppose, for sake of contradiction, that there exists a subset T of A such that |NG[A[D](T )| < |T |. Swapping T for NG[A[D](T ) in S, i.e., S T [ NG[A[D](T ), yields a smaller vertex cover of G than S. )( This contradicts the minimality of S. ⌅ Math 104 - Prof. Kindred - Lecture 7 Page 3 This claim verifies Hall’s condition for both G[A [ D] and G[B [ C]. Thus, by Hall’s theorem, 9 matching M 0 in G[A [ D] saturating A, and 9 matching M 00 in G[B [ C] saturating B. So M = M 0 [ M 00 is a matching with |M | = |M 0| + |M 00| = |A| + |B| = |S|, and therefore, |M | = |S|, so ↵0(G) = (G) by previous corollary. ⌅ We can prove Hall’s theorem using the König-Egerváry theorem and vice-versa. Math 104 - Prof. Kindred - Lecture 7 Page 4 Important invariants of a graph ↵(G) maximum independent set vtcs ↵0(G) maximum matching edges pairwise nonadjacent pairwise disjoint (G) minimum vertex cover vtcs that “cover” all edges 0 minimum edge cover edges that “cover” all vtcs (G) Definition An edge cover of a graph G is a subset of edges F ✓ E(G) such that for any v 2 V , there exists e 2 F such that v is an endpoint of e (so v 2 e). The edge covering number of G is the minimum cardinality of an edge cover and is denoted 0(G). Note that 0 (G) is undefined if G has isolated vertices. Lemma. In a graph G with S ⇢ V (G), S is an independent set () S is a vertex cover, and thus, ↵(G) + (G) = |V (G)|. Proof. ()) No edge has both endpoints in S (since it is an independent set), so every edge of G has at least one endpoint in S. Thus, S is a vertex cover. (() Every edge has at least one endpoint in S (since it is a vertex cover), so there can be no edge between two vertices of S. Hence, S is an independent set. ⌅ Math 104 - Prof. Kindred - Lecture 7 Page 5 Theorem (Gallai). If G is a graph with no isolated vertices, then ↵0(G) + 0(G) = |V (G)|. Proof sketch. Let n = |V (G)|. Given a maximum matching M , construct an edge covering of size n |M | by adding edges to M to cover unsaturated vertices. So 0(G) n ↵0(G). Given a minimum edge covering F , construct a matching of size n |F |. Use the idea that for any graph G = (V, E) with minimum edge covering F , the graph (V, F ) is a disjoint union of |V | |F | 0 nontrivial stars. So ↵0(G) n (G). ⌅ Corollary. If G has no isolated vertices and is bipartite, then ↵(G) = 0(G). Proof. We have ↵(G) |{z} = |V (G)| previous lemma (G) |{z} = |V (G)| K-E thm ↵0(G) |{z} = 0(G) Gallai thm where we use assumption that G is bipartite to apply the KönigEgerváry theorem and the assumption that G has no isolated vertices to apply Gallai’s theorem. ⌅ It should be easy to see that ↵(G) 0(G) — each vertex in an independent set must have its “own” edge to cover it. Math 104 - Prof. Kindred - Lecture 7 Page 6 Linear programming formulation ⇥ König-Egerváry theorem 1 min vertex cover problem Tuesday, February 12, 2013 Math 104, Graph Theory min vertex cover problem 1 ··· 1 n x 1 vector where i th entry is 1 if i th vertex is in S ⇤ T min 1 xS s.t. AT xS A is n x m incidence matrix ⇤ n x 1 vector where (variable) i th entry is 1 if i th vertex is in S A is n x m incidence matrix Linear programming formulation 1 1 min 1T xS s.t. AT xS 1 xS binary AT = ⇥ ··· 1 1 xS binary vertices 3 7 6 7 6 0 0 1 0 1 07 6 7 4 5 Linear programming formulation dual of primal linear program m x 1 vector where i th entry is 1 if i th edge is in M max 1T yM s.t. AyM 1 yM binary max matching problem Theorem (weak duality) Assume that the primal and dual linear programs are both feasible. Let x be a feasible solution to the primal problem and let y be feasible solution to the dual. Then objective value of primal ≥ objective value of dual. dual problem (maximization) 2 edges 6 primal problem (minimization) Question What is the relationship between vertex covers and is theand relationship vertex covers and matchings of primal a graph? Theorem (weak duality) Assume that What the dual linearbetween programs are both feasible. Question matchings ay graph? Let x be a feasible solution to the primal problem andoflet be feasible solution to the dual. Then objective value of primal ≥ objective value of dual. Example PetersenExample graph has a vertex cover of size 6 and a matching of size 5 primal problem (minimization) Petersen graph has a vertex cover of size 6 and a matching of size 5 Proposition. For any graph G, ↵0(G) (G). dual problem (maximization) Proposition. For any graph G, ↵0(G) (G). Proof. Let M be a maximum matching of G, and let S be a minimum vertex covering. For every edge e in M , there exists an endpoint of Proof. Let M be a maximum matching of G, and let S be a minimum It follows thateifinwe findbecause a feasible and feasible y such that the objective values of S.can Thus, edgesx of M ashare no endpoints, vertex covering. For every edge e in M , there exists an endpoint of the primal and dual are equal, then 0 those feasible solutions must both be optimal. ↵ (G) = |M edges | |S|of=M (G). e in S. Thus, because share no endpoints, (certificate of optimality) 0 ↵ (G) = |M | |S| = (G). ⌅ Corollary. If G = (V, E) is a graph, M ✓ E is a matching of ⌅ G, and S ✓ V is a vertex cover of G such that |S| = |M |, then Corollary. If G = (V, E) is a graph, M ✓ E is a matching of • M is maximum, G, and S ✓ V is a vertex cover of G such that |S| = |M |, then • S is minimum, • M is maximum, • and ↵0(G) = |M | = |S| = (G). • S is minimum, Example• and ↵0 (G) = |M | = |S| = (G). Example Idea behind proof of König-Egerváry Theorem Idea behind proof of König-Egerváry Theorem A A B C Idea behind proof of König-Egerváry theorem matching that saturates A A C B G[B C] B Idea behind proof of König-Egerváry theorem A D G[A D D matching that saturates A B D] C matching that saturates B A C D B B A C D B