Module 7. Independent sets, coverings. and matchings. Contents

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

1 Matchings in Graphs

5 Matchings in Bipartite Graphs and Their Applications

Matchings. Examples. K n,m, K n, Petersen graph, Q k ; graphs without perfect matching. A maximal matching cannot be enlarged by adding another edge.

Module 11. Directed Graphs. Contents

AMS /672: Graph Theory Homework Problems - Week V. Problems to be handed in on Wednesday, March 2: 6, 8, 9, 11, 12.

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

by conservation of flow, hence the cancelation. Similarly, we have

List of Theorems. Mat 416, Introduction to Graph Theory. Theorem 1 The numbers R(p, q) exist and for p, q 2,

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.

Definition For vertices u, v V (G), the distance from u to v, denoted d(u, v), in G is the length of a shortest u, v-path. 1

Matching Theory. Figure 1: Is this graph bipartite?

Exercise set 2 Solutions

On the Relationships between Zero Forcing Numbers and Certain Graph Coverings

Abstract. A graph G is perfect if for every induced subgraph H of G, the chromatic number of H is equal to the size of the largest clique of H.

Matching and Covering

Fundamental Properties of Graphs

Sources for this lecture. 3. Matching in bipartite and general graphs. Symmetric difference

Bipartite Roots of Graphs

Part II. Graph Theory. Year

Number Theory and Graph Theory

Graph Connectivity G G G

Graph Theory: Matchings and Factors

Characterizing Graphs (3) Characterizing Graphs (1) Characterizing Graphs (2) Characterizing Graphs (4)

Math 170- Graph Theory Notes

Definition: A graph G = (V, E) is called a tree if G is connected and acyclic. The following theorem captures many important facts about trees.

6. Lecture notes on matroid intersection

CLAW-FREE 3-CONNECTED P 11 -FREE GRAPHS ARE HAMILTONIAN

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

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

Mathematical and Algorithmic Foundations Linear Programming and Matchings

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.

Ma/CS 6b Class 4: Matchings in General Graphs

Assignment 4 Solutions of graph problems

MC 302 GRAPH THEORY 10/1/13 Solutions to HW #2 50 points + 6 XC points

Advanced Combinatorial Optimization September 17, Lecture 3. Sketch some results regarding ear-decompositions and factor-critical graphs.

1. Lecture notes on bipartite matching

Small Survey on Perfect Graphs

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

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.

Math 776 Graph Theory Lecture Note 1 Basic concepts

1 Matching in Non-Bipartite Graphs

Extremal Graph Theory: Turán s Theorem

Rainbow game domination subdivision number of a graph

Independence Number and Cut-Vertices

Lecture 5: Graphs. Rajat Mittal. IIT Kanpur

Module 1. Preliminaries. Contents

SANDRA SPIROFF AND CAMERON WICKHAM

VIZING S THEOREM AND EDGE-CHROMATIC GRAPH THEORY. Contents

MATH 682 Notes Combinatorics and Graph Theory II

Ma/CS 6b Class 5: Graph Connectivity

PACKING DIGRAPHS WITH DIRECTED CLOSED TRAILS

Problem Set 2 Solutions

Chapter 6 GRAPH COLORING

CMSC Honors Discrete Mathematics

Pebble Sets in Convex Polygons

Math 485, Graph Theory: Homework #3

Lecture 6: Graph Properties

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

Induction Review. Graphs. EECS 310: Discrete Math Lecture 5 Graph Theory, Matching. Common Graphs. a set of edges or collection of two-elt subsets

Discrete mathematics , Fall Instructor: prof. János Pach

Vertex coloring, chromatic number

Chapter 2. Splitting Operation and n-connected Matroids. 2.1 Introduction

and Heinz-Jürgen Voss

ON VERTEX b-critical TREES. Mostafa Blidia, Noureddine Ikhlef Eschouf, and Frédéric Maffray

9 Connectivity. Contents. 9.1 Vertex Connectivity

Vertex coloring, chromatic number

GRAPH DECOMPOSITION BASED ON DEGREE CONSTRAINTS. March 3, 2016

The Structure of Bull-Free Perfect Graphs

Introduction to Graph Theory

HW Graph Theory SOLUTIONS (hbovik) - Q

Some Upper Bounds for Signed Star Domination Number of Graphs. S. Akbari, A. Norouzi-Fard, A. Rezaei, R. Rotabi, S. Sabour.

Lecture Notes on Graph Theory

GEODETIC DOMINATION IN GRAPHS

Assignment 1 Introduction to Graph Theory CO342

Graph Theory Day Four

Two Characterizations of Hypercubes

Ma/CS 6b Class 26: Art Galleries and Politicians

THE RAINBOW DOMINATION SUBDIVISION NUMBERS OF GRAPHS. N. Dehgardi, S. M. Sheikholeslami and L. Volkmann. 1. Introduction

On vertex types of graphs

1 Matchings with Tutte s Theorem

Week 9-10: Connectivity

Characterizations of Trees

CONNECTIVITY AND NETWORKS

ON THE STRONGLY REGULAR GRAPH OF PARAMETERS

Matching and Planarity

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

1. Lecture notes on bipartite matching February 4th,

5. Lecture notes on matroid intersection

Graph Definitions. In a directed graph the edges have directions (ordered pairs). A weighted graph includes a weight function.

Topics on Computing and Mathematical Sciences I Graph Theory (13) Summary and Review

Solution to Graded Problem Set 4

Graph Theory II. Po-Shen Loh. June edges each. Solution: Spread the n vertices around a circle. Take parallel classes.

HW Graph Theory SOLUTIONS (hbovik)

A note on isolate domination

Generalized Pebbling Number

Winning Positions in Simplicial Nim

Some Elementary Lower Bounds on the Matching Number of Bipartite Graphs

Infinite locally random graphs

3 No-Wait Job Shops with Variable Processing Times

Transcription:

Module 7 Independent sets, coverings Contents and matchings 7.1 Introduction.......................... 152 7.2 Independent sets and coverings: basic equations..... 152 7.3 Matchings in bipartite graphs................ 159 Hall s Theorem......................... 160 König s Theorem........................ 163 7.4 Perfect matchings in graphs................. 166 7.5 Greedy and approximation algorithms (Optional).... 172 Exercises............................ 175 151

152 Module 7. Independent sets, coverings and matchings 7.1 Introduction The concepts of independent sets and coverings are used in modeling several real world problems. One of the real world problems called the Job Assignment Problem has motivated much research on matchings. Job-Assignment-Problem (JAP) There are s persons and t jobs. Each person is capable of handling certain jobs. Under what conditions we can employ each of the p persons with a job he/she is capable of handling? The rule of one-person-one-job is assumed. Notice that some jobs may be left undone. Model the problem using appropriate graph theoretic terminology. Another popular version of the JAP is known as The Marriage Problem. There are s girls and t boys. Each girl has a list of favorite boys. Under what conditions one can marry off each of the girls to a boy in her list? A pure set-theoretic version of JAP is known as The Problem of Set Representatives. Given a set X and a family F = (X 1, X 2,..., X s ) of subsets of X, find necessary and sufficient conditions for choosing s distinct elements (x 1, x 2,..., x s ), such that x i X i, i = 1, 2,..., s. The element x i is called the representative of X i. Choice. Notice that if X, F, X i and s are infinite, then it is a variation of Axiom of 7.2 Independent sets and coverings: basic equations We start with a series of definitions. Definitions. Let G be a graph. A set of vertices I is called an independent set if no two vertices in I are adjacent. An independent set is also called a stable set.

7.2. Independent sets and coverings: basic equations 153 Any singleton set is an independent set. largest independent set. So one is interested to find a The parameter α 0 (G) = max{ I : I is an independent set in G} is called the vertex-independence number of G. Any independent set I with I = α 0 (G) is called a maximum independent set. An independent set I is called a maximal independent set if there is no independent set which properly contains I. Clearly, any maximum independent set is a maximal independent set but a maximal independent set need not be a maximum independent set. An illustration is given below. If e(u, v) is an edge in G, then e is said to cover u and v and vice versa. A set of vertices K is called a vertex-cover of G if every edge in G is covered by a vertex in K. That is, if every edge in G has at least one of its end vertices in K. Clearly, V (G) is a vertex-cover of G. So one is interested to find a smallest vertex cover. The parameter β 0 (G) = min{ K : K is a vertex cover of G} is called the vertex-covering number of G. Any vertex-cover K with K = β 0 (G) is called a minimum vertex-cover. A vertex-cover K is called a minimal vertex-cover if there is no vertex-cover which is properly contained in K. Clearly, every minimum vertex-cover is a minimal vertex-cover but a minimal vertex-cover need not be a minimum vertex-cover. An illustration is given below. An illustration: In the graph shown in Figure 7.1, {1, 2, 4}, {3, 5, 6} are maximal independent sets, but they are not maximum independent sets; {1, 2, 5, 6} is the

154 Module 7. Independent sets, coverings and matchings 1 5 2 3 4 6 Figure 7.1: An example to illustrate the independent sets and vertex covers. maximum independent set. The vertex subset {1, 2, 4} is a minimal vertex-cover but it is not a minimum vertex-cover; {3,4} is a minimum vertex-cover. This example illustrates that a graph may contain many maximal and maximum independent sets. Similarly, it may contain many minimal and minimum vertexcovers. However, α 0 (G) and β 0 (G) are unique. The following table shows the independence number and vertex-covering number of some standard graphs. P n C n K n K c n K r,s α 0 n 2 n 1 n max{r, s} 2 β 0 n 2 n n 1 0 min{r, s} 2 Table 7.1: Table of independence numbers and covering numbers. The reader may notice that for every graph G shown in the above table, α 0 (G) + β 0 (G) = V (G). In fact, this equation holds for any arbitrary graph G. Before proving this claim, we observe a stronger statement. Theorem 7.1. I is an independent set in G iff V (G) I is a vertex-cover of G.

7.2. Independent sets and coverings: basic equations 155 Proof. I is an independent set no two vertices in I are adjacent no edge has both of its end vertices in I every edge in G has an end vertex in V (G) I V (G) I is a vertex-cover of G. Corollary. For any graph G, α 0 (G) + β 0 (G) = n(g). Proof. Let I be a maximum independent set. By the above theorem, V (G) I is a vertex cover of G. Hence, β 0 (G) V (G) I = n α 0 (G); that is α 0 (G)+β 0 (G) n. Let K be a minimum vertex-cover of G. By the above theorem, V (G) K is an independent set of vertices. Hence, α 0 (G) V (G) K = n(g) β 0 (G); that is α 0 (G) + β 0 (G) n(g). We now define the edge analogues of independent sets of vertices and vertexcovers. Definitions. The two inequalities imply the corollary. A subset of edges M in G is called an independent set of edges if no two edges in M are adjacent. An independent set of edges is more often called as a matching. Clearly, if M is a singleton, then it is a matching. So one is interested to find a largest matching. The parameter α 1 (G) = max{ M : M is a matching in G} is called the matching number of G. Any matching M with M = α 1 (G) is called a maximum matching. A matching M is called a maximal matching if there is no matching which properly contains M.

156 Module 7. Independent sets, coverings and matchings A set of edges F is called an edge-cover of G if every vertex in G is incident with an edge in G. A graph G need not have an edge cover; for example, K 2 K 1 has no edge-cover. In fact, a graph G has an edge cover iff δ(g) > 0. If δ(g) > 0, then E(G) is an edge-cover. So one is interested to find a smallest edge-cover. If δ(g) > 0, then the parameter β 1 (G) = min{ F : F is an edge cover of G} is called the edge covering number of G. Any edge-cover F with F = β 1 (G) is called a minimum edge cover. An edge-cover F is called a minimal edge-cover if there is no edge-cover which is properly contained in F. An illustration: In the graph of Figure 7.2, {a, d} and {b, c} are maximal matchings but they are not maximum matchings ; {a, e, f} is a maximum matching. {b, c, e, f} is a minimal edge-cover but it is not a minimum edge-cover. {a, e, f} is a minimum edge-cover. 1 a 2 b c 5 e 3 d 4 f 6 Figure 7.2: An example to illustrate matchings and edge covers. Again we observe that a graph G may contain many maximal and maximum matchings. It also may contain many minimal and minimum edge covers. But α 1 (G) and β 1 (G) are unique. The following table shows the matching-number and edge-covering number of some standard graphs.

7.2. Independent sets and coverings: basic equations 157 P n C n K n K r,s α 1 n 2 n 2 n min{r, s} 2 β 1 n 2 n 2 n max{r, s} 2 Table 7.2: Matching numbers and edge-covering numbers. Again notice that for every graph G shown in the above table α 1 (G)+β 1 (G) = n(g). However, the edge analogue of Theorem 7.1 does not hold. That is, if M is a matching in G, then E(G) M need not be an edge cover of G. And if F is an edge cover of G, then E(G) F need not be a matching. Reader is encouraged to construct graphs to justify these claims. However, α 1 (G) + β 1 (G) = n(g), for any graph G with δ(g) > 0. Before proving it we introduce a new concept. Definitions. Let M be a matching in G. A vertex v is said to be M-saturated if there exists an edge in M which is incident to v; else v is said to be M-unsaturated. A matching M is said to be a perfect matching if it saturates every vertex of G. In the following graph, M 1 = {(1, 2), (4, 5)} is a matching. The vertices 1, 2, 4 and 5 are M 1 -saturated but 3 and 6 are M 1 -unsaturated. So, it is not a perfect matching. However, M 2 = {(1, 2), (3, 4), (5, 6)} is a perfect matching. Remarks. Every perfect matching is a maximum matching. However, the converse is false. If G has perfect matching, then n(g) is even. However, the converse is false; for example, K 1,3 and K 2,4 do not have perfect matchings.

158 Module 7. Independent sets, coverings and matchings 1 4 2 3 5 6 Figure 7.3: A graph to illustrate perfect matching. Theorem 7.2. For any graph G with δ(g) > 0, α 1 (G) + β 1 (G) = n(g). Proof. It consists of two steps. (1) α 1 (G) + β 1 (G) n(g). Let M be a maximum matching and U be the set of all M-unsaturated vertices. Then U = n 2 M. Let U = {v 1, v 2,..., v p }, where p = n 2 M. Let e i be an edge incident to v i, i = 1,..., p; such an edge exists, since δ(g) > 0. Then M {e 1, e 2,..., e p } is an edge-cover. So, β 1 (G) M + p M + (n 2 M ) = n M = n α 1 (G). Hence, α 1 (G) + β 1 (G) n. (2) α 1 (G) + β 1 (G) n(g). Let F be a minimum edge cover. Let H be the spanning subgraph of G with edge set F. Let M H be a maximum matching in H and U be the set of M H - unsaturated vertices in H. As before, U = n 2 M H. Let U = {v 1, v 2,..., v p }, where p = n 2 M H. Since, F is an edge-cover, it contains an edge e i incident with v i, 1 i p. Since, M H is a maximum matching, U is an independent set in H. Therefore e i e j, if v i v j. Hence, e 1, e 2,..., e p are all distinct edges. It follows that F M H + p = M H + n 2 M H = n M H. Hence, β 1 (G) = F n M H n α 1 (G), since α 1 (G) M H. So, α 1 (G) + β 1 (G) n.

7.3. Matchings in bipartite graphs 159 The two inequalities imply the theorem. 7.3 Matchings in bipartite graphs: Hall s theorem and König s theorem We have now enough terminology to model the job-assignment-problem and solve it. Graph theoretic model: Let P 1, P 2,..., P s be the s persons and J 1, J 2,..., J t be the t jobs. Represent each P i by a vertex p i and each job J h by vertex j h. Join p i and j h by an edge if P i is capable of handling j h. This construction yields a bipartite graph G[X, Y ], where X = {p 1,..., p s } and Y = {j 1,..., j t }. The problem is to find necessary and sufficient conditions for G to contain a matching saturating every vertex in X. The following example illustrates the construction of G. p1 j 1 Persons Jobs P i can handle p j 2 2 P 1 J 1, J 3 p j 3 3 P 2 J 1, J 2, J 3 P 3 J 2, J 4, J 5 p j 4 4 P 4 J 3 j 5 Figure 7.4: A job assignment as required is possible in this example. One possible assignment is to assign P 1 to J 1, P 2 to J 2 P 3 to J 5 and P 4 to J 3. If G[X, Y ] contains a matching, say {(p 1, j 1 ),..., (p s, j s )} saturating every vertex in X, then p i can be assigned the job j i, 1 i s. A necessary condition for the existence of a solution for JAP is intuitively obvious: Every set of k persons (1 k s) must be able to handle at least k jobs together. That is, in graph theoretic terminology, if G has a matching saturating

160 Module 7. Independent sets, coverings and matchings every vertex in X, then every k vertices in X are adjacent to at least k vertices in Y (1 k s). Hall (1939) showed that the converse is also true. Notation: If G[X, Y ] is a bipartite graph and S X, let N G (S) = {y Y : y is adjacent to some vertex in S}. Hall s Theorem Theorem 7.3 (Hall, 1939). A bipartite graph G[X, Y ] has a matching saturating every vertex in X iff (Hall) N G (S) S, for every S X. Proof. Let X = {x 1, x 2,..., x s } and Y = {y 1, y 2,..., y t }. Necessity ( ): Suppose G has a matching M = {(x 1, y 1 ),..., (x s, y s )} saturating every vertex in X. Let S = {x 1, x 2,..., x r} X. Then y 1, y 2,..., y r N G (S) and they are all distinct, since M is a matching. So N G (S) r = S. Sufficiency ( ): There are many proofs of sufficiency. The following proof is due to Halmos and Vaughan (1950). It is by induction on s. If s = 1, then the result is obvious. So, let s 2 and proceed to the next step in the induction. We make two cases. Case 1: For every proper subset S of X, N G (S) S + 1. Since G satisfies (Hall), N({x 1 }) 1; and so there is a vertex, say y 1 Y such that (x 1, y 1 ) is an edge. Consider the subgraph L = G {x 1, y 1 } whose bipartition is [X 1, Y 1 ], where X 1 = {x 2,..., x s } and Y 1 = {y 2,..., y t }. We claim that L(X 1, Y 1 ) satisfies (Hall). So, let T X 1. Clearly, N G (T ) N L (T ) {y 1 }. Hence, N L (T ) N G (T ) 1, ( T + 1) 1, by our assumption, = T.

7.3. Matchings in bipartite graphs 161 Therefore, by induction hypothesis, L[X 1, Y 1 ] contains a matching M saturating every vertex in X 1. Then M {(x 1, y 1 )} is a required matching of G. Case 2: For some proper subset S of X, N G (S) = S. For notational convenience, let S = {x 1, x 2,..., x p } and N(S) = {y 1, y 2,..., y p }. S X S x 1 x p x p+1 x s y 1 y p y p+1 y t N(S) Y N(S) P Q X Y Figure 7.5: The bipartite graphs P [S, N(S)] and Q[X S, Y N(S)]. Consider the bipartite subgraphs P [S, N(S)] and Q[X S, Y N(S)]. We shall prove that both these graphs satisfy (Hall) and then complete the proof by appealing to the induction hypothesis. We consider first P [S, N(S)]. Let T S. Clearly, by our assumption of S, N P (T ) = N G (T ); so N P (T ) T. Thus P satisfies (Hall), and hence, by induction hypothesis, P has a matching, say M 1 saturating every vertex in S. Next, consider Q[X S, Y N(S)]. Let T X S. Clearly, N G (S T ) N G (S) N Q (T ). So, N Q (T ) N G (S T ) N G (S), S T S, since G satisfies (Hall), = S + T S, since S and T are disjoint, = T.

162 Module 7. Independent sets, coverings and matchings Thus Q[X S, Y N G (S)] satisfies (Hall). So by induction hypothesis, Q has a matching, say M 2 saturating every vertex in X S. Then M 1 M 2 is a required matching. Two interesting corollaries follow. Corollary. Let G be a bipartite graph with bipartition [X, Y ] and δ(g) > 0. If min x X deg(x) max deg(y), y Y then G contains a matching saturating every vertex in X. Proof. It is enough if we prove that G satisfies (Hall). So, let S X. Let δ(x) = min x X deg(x) and (Y ) = max y Y deg(y). If e is an edge incident with a vertex in X, then its other end vertex is in N(S). So, there are at least S δ(x) edges incident with the vertices of N(S). Hence, there is a vertex y N(S) which is incident with at least S δ(x) S δ(x) edges (: Use the pigeon-hole principle). So, (Y ) deg(y). N(S) N(S) Since, δ(x) (Y ), we obtain N(S) S. And thus, we have verified (Hall). Corollary. Let G[X, Y ] be a k-regular (k 1) bipartite graph. Then E(G) can be partitioned into k sets E 1, E 2,..., E k, where each E j is a perfect matching. Proof. We shall prove the theorem by induction on k. At the outset observe that X = Y, since k X = E(G) = k Y. If k = 1, then E(G) is a perfect matching and hence the assertion follows. So we proceed to the next step in the induction. Since, G[X, Y ] is a k-regular bipartite graph it satisfies the hypothesis of the above corollary. Hence, it contains a perfect matching, say E 1. Since, X = Y, G E 1 is a (k 1)-regular bipartite graph. Therefore, by induction hypothesis,

7.3. Matchings in bipartite graphs 163 E(G E 1 ) can be partitioned into k 1 sets, say E 2,..., E k, where each E i is a perfect matching. Then (E 1, E 2,..., E k ) is a required partition of E(G). König s Theorem There are several theorems in discrete mathematics which show that a minimum parameter is equal to a maximum parameter. The next result is one such theorem. Before stating it, we observe an important inequality. If M is a matching and K is a vertex-cover of G, then any vertex of K covers at most one edge of M. Hence: β 0 (G) α 1 (G), for any graph G. Remarks. β 0 (C 2k ) = α 1 (C 2k ) = k. β 0 (K 2p ) = α 1 (K 2p ) = p. β 0 (C 2k+1 ) = k + 1, α 1 (C 2k+1 ) = k. The above remarks lead to the following unsolved question. For which graphs G, β 0 (G) = α 1 (G)? The following result identifies one such class of graphs. Theorem 7.4 (König, 1931). For any bipartite graph G[X, Y ], β 0 (G) = α 1 (G).

164 Module 7. Independent sets, coverings and matchings Proof. In view of the above observation, we have to only show that α 1 (G) β 0 (G). Let K = A B be a minimum vertex-cover, where A X and B Y. So, A + B = K = β 0 (G). A B X A Y B X Y Figure 7.6: A bipartite graph with vertex-cover A B. We consider the bipartite subgraphs P [A, Y B] and Q[B, X A]. Claim 1: P [A, Y B] has a matching M 1 saturating every vertex in A. To prove this claim it is enough if we verify that P satisfies (Hall). On the contrary, suppose that there exists some S A such that N P (S) < S. Then it is easy to verify that the set (A S) N P (S) B is a vertex cover of G. So, (A S) N P (S) B = A S + N P (S) + B, < A + B, since by our assumption, N p (S) < S, = K. This is a contradiction to the minimality of K. Therefore, by Hall s theorem, there exists a matching M 1 in P saturating every vertex in A. Claim 2: Similarly, it follows that Q[B, X A] has a matching M 2 saturating every vertex in B.

7.3. Matchings in bipartite graphs 165 Clearly M 1 M 2 =. Hence, α 1 (G) M 1 + M 2, = A + B, = K = β 0 (G). An equivalent form of König s theorem, in matrix terminology, is due to Egerváry (1931). To state it we require new terminology. Definition. A line of a matrix is either a row or a column. Let A = [a ij ] be a m n matrix where each a ij is 0 or 1. A set I of 1 s in A is said to be independent if no two 1 s in I lie on a common line. A line h of A is said to cover a 1 if the 1 lies in h. An illustration: r 1 c 1 c 1 c 2 c 3 c 4 c 5 r 1 0 1 0 0 0 r2 1 0 1 1 1 r 3 0 1 0 0 0 r 4 0 1 0 1 0 A r 2 r 3 r 4 G[R, C] Figure 7.7: A matrix A with 3 independent 1 s and 3 lines covering all the 1 s in A. (b) A bipartite graph G[R, C] representing A, defined in the proof of Theorem 7.5. c 2 c 3 c 4 c 5 Theorem 7.5 (Egerváry, 1931). Let A = [a ij ] be a m n matrix, where a ij = 0 or 1. Then, the maximum number of independent 1 s in A is equal to the minimum number of lines which cover all the 1 s in A.

166 Module 7. Independent sets, coverings and matchings Proof. Associate a bipartite graph G[R, C] with A as follows; see Figure 7.7. Represent each row R i (1 i m) of A by a vertex r i. Represent each column C j (1 i n) of A by a vertex c j. Join r i and c j iff a ij = 1. The following assertions can be easily observed. There is a 1-1 and onto function between the set of all 1 s in A and the set of all edges in G, namely a ij = 1 iff (r i, c j ) E(G). Two 1 s, say a ij = 1 and a pq = 1 are independent in A iff the corresponding edges (r i, c j ) and (r p, c q ) are independent in G. Therefore, I is a set of independent 1 s in A iff the corresponding set M of edges in G is a matching in G. A set of lines covers all the 1 s in A iff the corresponding set of vertices in G covers all the edges in G. Hence the result follows. 7.4 Perfect matchings in graphs All the graphs in this section are simple graphs. If G has a perfect matching, then n(g) is even, obviously. However, the converse does not hold. For example, the two graphs G 1 and G 2 shown in Figure 7.8 have no perfect matchings; this follows since only one of the vertices v 2 or v 3 or v 4 can be matched with v 1. v 2 v 3 v 2 v 1 v 1 v 4 v 3 v 4 (a) G 1 (b) G 2 Figure 7.8: Graphs with no perfect matchings.

7.4. Perfect matchings in graphs 167 Definition. A component of G is called an odd component if it has odd number of vertices, and it is called an even component if it has an even number of vertices. The number of odd components in G is denoted by θ(g). Lemma 7.6. If n(g) is even and S V (G), then θ(g S) and S have the same parity. Proof. Exercise. We can now proceed to state and prove a theorem which characterizes the graphs with perfect matchings. Theorem 7.7 (Tutte, 1947). A graph G has a perfect matching iff (Tutte) θ(g S) S, for every S V (G). Proof. (1) G has a perfect matching G satisfies (Tutte). Let M be a perfect matching in G and let S = {v 1, v 2,..., v s } V (G). Let G 1,..., G t be the odd components of G S, where t = θ(g S). Since, G i (1 i t) has odd number of vertices, at least one vertex u i of G i is matched under M with a vertex v i of S; that is (u 1, v 1 ),..., (u t, v t ) M. Since M is a matching, v i s are all distinct. Hence, S t = θ(g S). (2) G satisfies (Tutte) G has a perfect matching. We give a proof that is due to Anderson (1971). It is by induction on n. We first observe that n is even: By taking S = in (Tutte) we deduce that θ(g) = θ(g ) = 0. That is, G has no odd components. Hence, n is even. We now proceed to prove the implication. Basic step n = 2: Since G satisfies (Tutte), G K 2 and it has a perfect matching. Induction step: We make two cases. Case 1: θ(g S) S 1, for every proper subset S V (G).

168 Module 7. Independent sets, coverings and matchings By Lemma 7.6, θ(g S) S 1, for any S. So, (P 1 ) θ(g S) S 2, for every proper subset S V (G). Let e = (u, v) be an edge in G, and let H = G {u, v}. Claim: H satisfies (Tutte). On the contrary, suppose that H contains a T V (H) such that θ(h T ) T + 1. Since, n(h) is even, using Lemma 7.6, we conclude that θ(h T ) T + 2. But then θ(g (T {u, v})) = θ(h T ) T + 2 = T {u, v}. Since G satisfies (Tutte), θ(g (T {u, v})) T {u, v}. Hence, θ(g (T {u, v})) = T {u, v}. This contradicts our assumption. Hence, the claim holds. Therefore, by induction hypothesis, H has a perfect matching, say M. But then M {e} is a perfect matching of G. Case 2: θ(g S) = S, for some proper subset S V (G). Let S = {v 1, v 2,..., v s } be a subset with maximum number of vertices such that θ(g S ) = S. We look at G S. Let G 1,..., G s be the odd components of G S. Observation 1: G S has no even components. On the contrary, if D is an even component of G S and x V (D), then D x has at least one odd component and so θ(g (S {x})) s + 1. Hence, θ(g (S {x})) = S {x}, since G satisfies (Tutte). This is a contradiction to the maximality of S. Observation 2: Any k (1 k s) odd components from G 1,..., G s are together joined to at least k vertices of S ; else, G violates (Tutte).

7.4. Perfect matchings in graphs 169 Therefore, by Hall s Theorem 7.3, there exists a matching, say M 0 = {(u 1, v 1 ),..., (u s, v s )}, where u i G i (1 i s). G 1 G 2 G s u 1 u 2 u s M 0 S v 1 v 2 v s Figure 7.9: The graph G with matching M 0 = {(u 1, v 1 ),..., (u s, v s )}. Figure 7.9 shows the structure of G that we have derived until now. Observation 3: H 1 = G 1 u 1 satisfies (Tutte). On the contrary, suppose that there exists T V (H 1 ) such that θ(h 1 T ) T + 1. Since, n(h 1 ) is even, using Lemma 7.6, we conclude that θ(h 1 T ) T + 2. Let L 1, L 2,..., L p be the odd component of H 1 T, where p T + 2. But then L 1, L 2,..., L p and G 2,..., G s are odd components of G (S {u 1 } T ). Hence, θ(g (S {u 1 } T )) = p + (s 1), T + 2 + s 1, = T + 1 + s, = (S {u 1 } T ). Since G satisfies (Tutte), we conclude that θ(g (S {u 1 } T )) = S {u 1 } T, which is a contradiction to the maximality of S. Hence the observation is proved.

170 Module 7. Independent sets, coverings and matchings G 1 G 2 G s M 1.. M 2. M s M 0 u 1 u 2 u s S v 1 v 2 v s Figure 7.10: G with perfect matchings M 0 M 1... M s. Therefore, by induction hypothesis, H 1 has a perfect matching, say M 1. Similarly, G 2 {u 2 },..., G s {u s } contain perfect matchings, say M 2,..., M s respectively. But then M 1 M 2 M s is a perfect matching of G; see Figure 7.10. Although Tutte s theorem characterizes the graphs with a perfect matching, it is hard to verify Tutte s condition and conclude that a given graph G has a perfect matching, because we have to verify (Tutte) for 2 n subsets of V (G). Hence, there have been several results proved by various mathematicians which say that a given graph G has a perfect matching if G satisfies a certain property (P)(where (P) is easily verifiable). In fact, the first result on perfect matchings was obtained by Petersen (1891) which preceded Tutte s theorem. However, we can easily deduce Petersen s result using Tutte s theorem. Corollary. If G is a (k 1)-edge-connected k-regular graph with n even, then G has a perfect matching. Proof. It is enough if we verify that G satisfies (Tutte). Let S V (G) and G 1, G 2,..., G t be the odd components of G S. Since, G is (k 1)-edge-connected, [S, V (G i )] k 1, for every i, 1 i t. Claim: [S, V (G i )] k, for every i, 1 i t.

7.4. Perfect matchings in graphs 171 Then On the contrary, suppose that for some j, 1 j t, [S, V (G j )] = k 1. deg Gj (v) = 2m(G j ) + k 1 v V (G j ) k V (G j ) = 2m(G j ) + k 1, since G is k-regular. k( V (G j ) 1) = 2m(G j ) 1. While right hand side is an odd integer, left hand side is an even integer since V (G j ) is odd. This contradiction proves the claim. We next estimate the number of edges in [S, V S] in two different ways. (1) [S, V S] k S, since G is k-regular. t (2) [S, V S] = [S, V (G i )], since V S = V (G 1 ) V (G t ) i=1 t k, by the above claim i=1 = tk. (1) and (2) imply that t S. Hence, G satisfies (Tutte) and it has a perfect matching. Corollary (Petersen, 1891). If G is a 2-edge-connected 3-regular graph, then G has a perfect matching. However, every connected 3-regular graph does not have a perfect matching; see Figure 7.8. Hence, we cannot strengthen Petersen s result by assuming that G is connected and 3-regular.

172 Module 7. Independent sets, coverings and matchings 7.5 Greedy and approximation algorithms (Optional) Since finding β 0 (G) and α 0 (G) are known to be hard problems, there have been attempts to describe algorithms which take G as an input and then output a vertex-cover (or an independent set) with cβ 0 (G) (or cα 0 (G)) number of vertices where c is a constant. Obviously, in the case of β 0 (G), c 1, and in the case of α 0 (G), c 1. There is much research to describe algorithms to output vertex covers containing cβ 0 (G) vertices with c as small as possible (and in the case of independent sets with c as large as possible). The constant c is called the approximation-factor and it is used to measure the efficiency of an algorithm. Obviously among the two algorithms A 1 and A 2 that output c 1 β 0 (G) and c 2 β 0 (G) vertices respectively, where c 1 < c 2, A 1 is a better algorithm. What we have learned in the previous sections is enough for us to describe two such algorithms. An approximate vertex-cover algorithm with approximation factor 2. Input: A graph G on n vertices, M, K. Output: A maximal matching M of G and a vertex-cover K of G. While E(G) do Select any edge e(u, v) from E(G). M M {e}, K K {u, v}. G G {u, v}. end while. Output M and K. We show that K 2β 0 (G).

7.5. Greedy and approximation algorithms (Optional) 173 Theorem 7.8 (Correctness of the algorithm). Any output K is a vertex-cover of G with K 2β 0 (G). Proof. At the outset observe that M is indeed a maximal matching. Since at every step after including e(u, v) in M we have deleted all the edges incident to u or v. Since M is a maximal matching, the set of all M-unsaturated vertices V K is an independent set. That is, every edge in G is incident with a vertex in K. Hence, K is a vertex-cover such that K 2 M 2α 1 (G) 2β 0 (G); since α 1 (G) β 0 (G), for any graph G (see the observation made in the beginning of the Section 7.4). An illustration for the algorithm: 1 2 a 3 3 4 b 5 4 b 5 6 7 (a) G 8 6 7 (b) M {a}, K {1, 2}, G 1 = G {1, 2} 8 6 7 8 (c) M {a, b}, K {1, 2, 4, 5}, G 2 = G {1, 2} {4, 5} 3 a 1 2 4 b 5 K = {1, 2, 4, 5} 3 6 7 8 V K Figure 7.11: A graph G with a maximal matching {a, b} generated by the greedy algorithm.

174 Module 7. Independent sets, coverings and matchings Notice that if we had selected the edge (4,6) instead of (4,5) in the second step, we would have generated a matching with 3 edges which is also a maximal matching. A greedy algorithm to output a maximal independent set of vertices. Input: A graph G, I. Output: A maximal independent set I of vertices. While V (G) do Select any vertex (arbitrarily) say v from V (G). I I {v}, G G {v} N G (v) end while. Output I. An illustration: 7 8 7 8 7 4 5 6 1 2 3 (a) G; I 5 6 3 (b) I {1}, G 1 = G {1} {2, 4}. (c) I {1, 6}, G 2 = G 1 {6, 3, 5, 8}. Graph with no vertices (d) I {1, 6, 7}, G 3 = G 2 {7}. Figure 7.12: A graph G with maximal independent set I = {1, 6, 7} generated by the greedy algorithm. Remarks. The algorithm indeed outputs an independent set since after selecting a vertex v we delete v and all the vertices adjacent to v. The algorithm need not generate a maximum independent set. If we had selected the vertex 3 in G 1 instead of 6 and thereafter had selected 7, we could have generated an independent set {1, 3, 7, 8} which is a maximum independent set.

7.5. Greedy and approximation algorithms (Optional) 175 Theorem 7.9. The algorithm outputs an independent set I with at least vertices. n 1 + (G) Proof. The algorithm indeed outputs a maximal independent set of vertices, since at every step after selecting vertex v, we delete v and all its neighbors, and in the next step, we select a new vertex from G v N(v). Suppose I = {v 1, v 2,..., v t } is the output. After selecting v t, we are left with no more vertices in the residual graph. So n (1 + ) + + (1 + ), }{{} sum t times since in each step we have deleted at most 1 + vertices. = t(1 + ) Hence, I = t n 1 +. Exercises 1. Let G be a simple bipartite graph. Show: (a) E(G) α 0 (G)β 0 (G). (b) If E(G) = α 0 (G)β 0 (G), then G is a complete bipartite graph; 2. For a bipartite graph G, show that the following statements are equivalent: (a) α 0 (H) V (H) /2, for every subgraph H of G. (b) α 0 (H) = β 1 (H), for every subgraph H of G with δ(h) > 0. 3. Let G be a complete n-partite graph. Prove the following: (a) β 0 (G) = δ(g) = k 0 (G) = k 1 (G) (b) G is Hamilton iff V (G) 2β 0 (G). 4. Prove that for any graph G, the following inequalities are equivalent. (a) β 0 (G) + β 0 (G c ) V (G). (b) α 0 (G) + α 0 (G c ) V (G).

176 Module 7. Independent sets, coverings and matchings (c) β 0 (G) + β 0 (G c ) α 0 (G) + α 0 (G c ). (d) β 0 (G) ω(g), where ω(g) = max{ V (H) : H is a complete subgraph of G}. 5. For any graph G, show: (a) β 0 (G) δ(g). (b) β 0 (G) ω(g) 1. 6. Prove or disprove: In any tree there is a maximal independent set of vertices containing all the vertices of degree one. 7. Find the vertex-covering number of K 1,t + K 1,t (t > 1). 8. Find the minimum edge covering number β 1 of the d-cube Q d. Justify your answer. And give an example of a minimum edge covering set of Q d. 9. Find β 0 and β 1 of K 2,4,6,...,2k. 10. Find α 0 and β 1 of C 2m+1 + C 2n and K n + C 2m+1. 11. Find α 0, β 0, α 1 and β 1 of K 1,2,...,n. 12. Find the matching number of C 5 + C 7. 13. Let M, N be disjoint matchings of a graph G with M > N. Show that there are disjoint matchings M and N of G such that M = M 1 and N = N + 1 and M N = M N. 14. Draw a connected 4-regular graph with no perfect matching on n-vertices where n is an even integer. What is the minimum value of n. Justify your graph indeed has no perfect matching. 15. For each k 2, find an example of a k-regular simple graph which has no perfect matching. 16. Prove or disprove: (a) The graph shown in the figure below contains a perfect matching. (b) A tree has at most one perfect matching. 17. A tree T has a perfect matching iff O(T v) = 1, for every vertex v.

7.5. Greedy and approximation algorithms (Optional) 177 1 2 3 4 5 6 7 8 9 10 18. Show that no tree (n 3) with every vertex of degree 1 or 3 has a perfect matching. 19. Draw a 3 regular connected simple graph with a perfect matching that has either a cut-vertex or a cut edge. 20. Let n > 1 be an integer. Prove or disprove: (a) If n is even, K n,n,n has a perfect matching. (b) If n is odd, K n,n,n has no perfect matching. 21. Draw a connected simple bipartite graph G[U, V ] with minimum degree at least 3 and U = V = 7 which has no matching saturating every vertex in U. 22. Prove or disprove: If G[X, Y ] is a simple connected bipartite graph such that the degree of every vertex in X is at least 3 and the degree of every vertex in Y is at most 3, then G has a matching saturating every vertex in X. 23. Illustrate the greedy algorithm to get a maximal independent set for the simple graph whose vertices are a, b, c, d, e, f and whose edges are (a, b), (b, c), (c, d), (d, e), (e, f), (f, a), (b, f), (c, e). 24. Apply greedy algorithm to get a maximal matching and a vertex cover of the graphs shown below. 10 4 5 3 6 2 1 8 9 4 5 6 7 2 3 1