sources for this lecture 3 matching in bipartite and
play

Sources for this lecture 3. Matching in bipartite and general graphs - PowerPoint PPT Presentation

S-72.2420 / T-79.5203 Matching in bipartite and general graphs 1 S-72.2420 / T-79.5203 Matching in bipartite and general graphs 3 Sources for this lecture 3. Matching in bipartite and general graphs The material for this


  1. ✬ ✩ ✬ ✩ S-72.2420 / T-79.5203 Matching in bipartite and general graphs 1 S-72.2420 / T-79.5203 Matching in bipartite and general graphs 3 Sources for this lecture 3. Matching in bipartite and general graphs The material for this lecture has been prepared with the help of Let G be a graph. A matching M in G is a set of nonloop edges [Wes, Chapter 3], [Jun, Section 7.2 and Chapter 12] and with no shared endpoints. [Die, Chapter 2]. Let M be a matching in G . A vertex of G is saturated by M if it is [Die] R. Diestel, Graph Theory, 2nd Edition , Graduate incident to an edge in M ; otherwise the vertex is unsaturated by M . Texts in Mathematics 173, Springer, New York NY, 2000. A matching that saturates all vertices in G is a perfect matching . [Lov] L. Lov´ asz and M. D. Plummer, Matching Theory , A matching in G is maximal if it is not a subset of a matching of North-Holland, Amsterdam, 1986. larger cardinality. A maximum matching is a matching of the The monograph [Lov] is a comprehensive reference to matching maximum size among all matchings in G . theory. ✫ ✪ ✫ ✪ c c 09. 04. 08 � Petteri Kaski 2006 09. 04. 08 � Petteri Kaski 2006 ✬ ✩ ✬ ✩ S-72.2420 / T-79.5203 Matching in bipartite and general graphs 2 S-72.2420 / T-79.5203 Matching in bipartite and general graphs 4 In this lecture we study matchings in bipartite and general graphs. Symmetric difference Our main topics of interest are: 1. Necessary and sufficient conditions for a graph to have a For convenience, we identify a matching M in G with the graph perfect matching (equivalently, a 1-factor). induced by the edges in M . ⊲ Hall’s matching theorem for bipartite graphs. ⊲ Tutte’s 1-factor theorem for general graphs. Let G and H be graphs. The symmetric difference G ⊕ H is the graph defined by 2. The size of a maximum matching in a graph. ⊲ K¨ onig-Egerv´ ary theorem for bipartite graphs. V ( G ⊕ H ) := V ( G ) ∪ V ( H ) , ⊲ Berge-Tutte formula for general graphs. E ( G ⊕ H ) := ( E ( G ) − E ( H )) ∪ ( E ( H ) − E ( G )) . 3. Efficient algorithms for finding a maximum matching in a Lemma A.6 Every component of the symmetric difference of two given graph G . matchings is either a path or an even cycle. 4. A small digression: stable matchings. (Note that some of the paths above may have length zero.) ✫ ✪ ✫ ✪ Not considered: weighted matchings; see [Jun, Chapter 13]. c c 09. 04. 08 � Petteri Kaski 2006 09. 04. 08 � Petteri Kaski 2006

  2. ✬ ✩ ✬ ✩ S-72.2420 / T-79.5203 Matching in bipartite and general graphs 5 S-72.2420 / T-79.5203 Matching in bipartite and general graphs 7 Augmenting paths and maximum matchings Matching in bipartite graphs Let G be a graph and let M be a matching in G . Recall the theorem of K¨ onig (1931) and Egerv´ ary (1931): An M -alternating path is a nontrivial path in G whose edges are Theorem A.27 For a bipartite graph G , the cardinality of a alternately in M and not in M . An M -alternating path whose maximum matching in G is equal to the minimum size of a vertex endpoints are unsaturated by M is an M -augmenting path . cover of G . The following theorem characterizing maximum matchings in an Thus, given a matching M in a bipartite graph G , we can prove that arbitrary graph is due to Berge (1957). M is a maximum matching by exhibiting a vertex cover C that Theorem A.26 A matching M in G is a maximum matching if and satisfies | M | = | C | . only if there exists no M -augmenting path. ✫ ✪ ✫ ✪ c c 09. 04. 08 � Petteri Kaski 2006 09. 04. 08 � Petteri Kaski 2006 ✬ ✩ ✬ ✩ S-72.2420 / T-79.5203 Matching in bipartite and general graphs 6 S-72.2420 / T-79.5203 Matching in bipartite and general graphs 8 Proof: ( ⇒ ) Suppose that P is an M -augmenting path. Then, Hall’s theorem M ⊕ P is a matching with cardinality | M | + 1. Thus, M is not a maximum matching. Let G be a bipartite graph and let X, Y be a bipartition of its vertex ( ⇐ ) Suppose that M is not a maximum matching. We must prove set. Let S ⊆ X . We denote by N ( S ) the vertices in G adjacent to a that there exists an M -augmenting path P . Since M is not a vertex in S . maximum matching, there exists a matching M ′ with | M ′ | = | M | + 1. By Lemma A.6, every component of M ⊕ M ′ is either an even cycle The following theorem is due to P. Hall (1935). or a path. Moreover, M ⊕ M ′ consists of an odd number of edges Theorem A.28 There exists a matching in G that saturates every with one more edge from M ′ than from M . Since each even cycle in vertex in X if and only if | N ( S ) | ≥ | S | for all S ⊆ X . M ⊕ M ′ must use equally many edges from M and from M ′ , we have that M ⊕ M ′ contains an odd-length path P , which is both M - and Proof: ( ⇒ ) Let M be a matching that saturates X and let S ⊆ X . M ′ -alternating. Thus, P is an M -augmenting path since both of its Since N ( S ) must contain the vertices matched to the vertices S in endpoints must be incident with an edge in M ′ . � M , we have | N ( S ) | ≥ | S | . ✫ ✪ ✫ ✪ c c 09. 04. 08 � Petteri Kaski 2006 09. 04. 08 � Petteri Kaski 2006

  3. ✬ ✩ ✬ ✩ S-72.2420 / T-79.5203 Matching in bipartite and general graphs 9 S-72.2420 / T-79.5203 Matching in bipartite and general graphs 11 Proof: ( ⇐ ) We apply the K¨ onig-Egerv´ ary theorem. Suppose G has no matching that saturates every vertex in X . Then, α ′ ( G ) < | X | . An algorithm for maximum matching Let C ⊆ X ∪ Y be a vertex cover of size α ′ ( G ) and put S := X − C . We have | N ( S ) | ≤ | C ∩ Y | since all edges with one endpoint in S • Theorem A.26 gives us a way to determine a maximum must have the other endpoint in C ∩ Y by definition of a vertex matching in a graph: given a (possibly empty) matching M , cover. Since | C | = | C ∩ X | + | C ∩ Y | and | C | < | X | = | C ∩ X | + | S | , search for a M -augmenting path. If an M -augmenting path we have | N ( S ) | ≤ | C | − | C ∩ X | < | S | . � P exists, we obtain a larger matching M ⊕ P ; otherwise M is The following is an example application of Hall’s theorem. a maximum matching. Theorem A.29 A regular bipartite graph has a perfect matching. • At most n ( G ) / 2 iterations suffice to produce a maximum matching. Proof: Let G be a k -regular bipartite graph. Every bipartition X, Y • Finding augmenting paths in a bipartite graph is of G satisfies k | X | = k | Y | , hence | X | = | Y | . Let S ⊆ X . Every vertex straightforward; the general case is more subtle, we will in N ( S ) is adjacent to at most k vertices in S . Since there are k | S | sketch the procedure at the end of this lecture. edges with one endpoint in S and the other in N ( S ), we must have ✫ ✪ ✫ ✪ k | N ( S ) | ≥ k | S | . Thus, | N ( S ) | ≥ | S | . � c c 09. 04. 08 � Petteri Kaski 2006 09. 04. 08 � Petteri Kaski 2006 ✬ ✩ ✬ ✩ S-72.2420 / T-79.5203 Matching in bipartite and general graphs 10 S-72.2420 / T-79.5203 Matching in bipartite and general graphs 12 Augmenting paths: the bipartite case Remarks Procedure bipartite-augment takes as input a bipartite graph G and a matching M in G . The output is either an M -augmenting path • The condition | N ( S ) | ≥ | S | is often called Hall’s matching or a vertex cover of G of size | M | . condition or simply Hall’s condition . The procedure uses the following local data structures: • Hall’s theorem is perhaps the most often applied result from graph theory. In the exercises we will consider some X, Y an arbitrary bipartition of G ; applications of Hall’s theorem. S ⊆ X ; T ⊆ Y contain vertices that are unsaturated or reach- • Many proofs of Hall’s theorem are known. For example, able from an unsaturated vertex in X by an [Die, Chapter 2] contains three independent proofs (one of M -alternating path; which was just given); in a subsequent lecture/exercise we p [ v ] is either undefined or contains a vertex that will see a proof using network flow theory. follows v ∈ V ( G ) in an M -alternating path ✫ ✪ ✫ ✪ terminating at an unsaturated vertex of X . c c 09. 04. 08 � Petteri Kaski 2006 09. 04. 08 � Petteri Kaski 2006

Recommend


More recommend