Topics in Combinatorial Optimization Orlando Lee Unicamp 15 de - PowerPoint PPT Presentation
Topics in Combinatorial Optimization Orlando Lee Unicamp 15 de abril de 2014 Orlando Lee Unicamp Topics in Combinatorial Optimization Agradecimentos Este conjunto de slides foram preparados originalmente para o curso T opicos de
Topics in Combinatorial Optimization Orlando Lee – Unicamp 15 de abril de 2014 Orlando Lee – Unicamp Topics in Combinatorial Optimization
Agradecimentos Este conjunto de slides foram preparados originalmente para o curso T´ opicos de Otimiza¸ c˜ ao Combinat´ oria no primeiro semestre de 2014 no Instituto de Computa¸ c˜ ao da Unicamp. Preparei os slides em inglˆ es simplesmente porque me deu vontade, mas as aulas ser˜ ao em portuguˆ es (do Brasil)! Agradecimentos especiais ao Prof. M´ ario Leston Rey. Sem sua ajuda, certamente estes slides nunca ficariam prontos a tempo. Qualquer erro encontrado nestes slide ´ e de minha inteira responsabilidade (Orlando Lee, 2014). Orlando Lee – Unicamp Topics in Combinatorial Optimization
Matching theory Matching in graphs is one of subjects of graph theory and combinatorial optimization that accumulated a large body of theory. We will start with the study of matchings in bipartite graphs. We postpone the study of matchings for general graphs for a later part of the course. Orlando Lee – Unicamp Topics in Combinatorial Optimization
Matchings A matching in a graph G = ( V , E ) is a subset of edges which contains no edges with a common end. Orlando Lee – Unicamp Topics in Combinatorial Optimization
Matchings u v If uv ∈ M then we say that u is matched with v (through M ). Orlando Lee – Unicamp Topics in Combinatorial Optimization
Matchings We say that a vertex incident to an edge of M is covered by M . An uncovered vertex is free of M . Orlando Lee – Unicamp Topics in Combinatorial Optimization
Matchings A matching M is perfect if covers every vertex of G . Orlando Lee – Unicamp Topics in Combinatorial Optimization
Matchings P 2 n C 2 n K 2 n K n , n Graphs that have perfect matchings. Orlando Lee – Unicamp Topics in Combinatorial Optimization
Emparelhamentos C 2 n +1 K n , m Not every graph has a perfect matching. Orlando Lee – Unicamp Topics in Combinatorial Optimization
Matchings A matching is maximal if it cannot be extended to a larger matching. A matching M is maximum if there is no matching larger than M . Orlando Lee – Unicamp Topics in Combinatorial Optimization
Problems of interest Maximum Matching Problem: given a graph G , find a maximum matching of G . Perfect Matching Problem: given a graph G , find, if it exists, a perfect matching of G . Maximum Weight Matching: given an edge-weighted graph ( Ga , w ), find a maximum weight matching of Ga . Maximum Weight Perfect Matching: given an edge-weighted graph ( G , w ), find a maximum weight perfect matching of G . Orlando Lee – Unicamp Topics in Combinatorial Optimization
Alternating paths Let M be a matching in a graph G . An M -alternating path or just alternating path is a path whose edges are alternatingly in M and out of M . Orlando Lee – Unicamp Topics in Combinatorial Optimization
Augmenting paths An M -alternating path whose ends are free of M is called M -augmenting path or just augmenting path. Orlando Lee – Unicamp Topics in Combinatorial Optimization
Augmenting paths P M ′ M M ′ := M △ EP is a matching with | M ′ | = | M | + 1 Notation: A △ B := ( A ∪ B ) − ( A ∩ B ) (symmetric difference). Orlando Lee – Unicamp Topics in Combinatorial Optimization
Berge’s theorem Theorem. (Berge, 1957) A matching M in a graph G is maximum if and only if G contains no M -augmenting path. Proof. ⇒ G contains no M -augmenting path M is maximum = Suppose that G contains an augmenting path P . Let M ′ := M △ EP . Then | M ′ | = | M | + 1 and M is not maximum. Orlando Lee – Unicamp Topics in Combinatorial Optimization
Berge’s theorem ⇒ M is maximum G contains no M -augmenting path = Suppose that M is not maximum and let M ∗ be a maximum matching of G . So | M ∗ | > | M | . let us show that G contains an M -augmenting path. Let H := G [ M △ M ∗ ]. Orlando Lee – Unicamp Topics in Combinatorial Optimization
Berge’s theorem Example: M M ∗ H := G [ M △ M ∗ ] Orlando Lee – Unicamp Topics in Combinatorial Optimization
Berge’s theorem Every vertex in H = G [ M △ M ∗ ] has degree one or two. Each component of H is either a cycle with edges alternating in M and M ∗ , or a path with edges alternating in M and M ∗ . Orlando Lee – Unicamp Topics in Combinatorial Optimization
Berge’s theorem Since | M ∗ | > | M | , H contains more edges from M ∗ than from M . Thus, some path component P in H must start and end with edges of M ∗ . This is an M -aumenting path. Orlando Lee – Unicamp Topics in Combinatorial Optimization
Maximum matching in bipartite graphs Consider the problem of finding a maximum matching in an ( X , Y )-bipartite graph G . We have seen that a matching M is maximum if and only if G contains no M -augmenting paths. However, it would be much better if we had a simple certificate of a maximality of a given matching. Orlando Lee – Unicamp Topics in Combinatorial Optimization
Vertex cover A vertex cover in a graph G = ( V , E ) is a subset U of V such that every edge of G has one end in U . Orlando Lee – Unicamp Topics in Combinatorial Optimization
Matching versus vertex cover Lemma. Let M be a matching and U a vertex cover in a graph G . Then | M | ≤ | U | . Furthermore, if equality holds then M is a maximum matching and U is a minimum vertex cover. Proof. Each edge of M has one end in U . Hence, | M | ≤ | U | . Orlando Lee – Unicamp Topics in Combinatorial Optimization
Matching versus vertex cover M ∗ = U ∗ M ∗ < U ∗ It is not always true that the size of a maximum matching is equal to the size of a minimum vertex cover. We will show that equality holds for bipartite graphs. Orlando Lee – Unicamp Topics in Combinatorial Optimization
Maximum matching in bipartite graphs Let G be a ( X , Y )-bipartite graph. Let M be a matching. Let D M be the digraph obtained from G by orienting each edge e = xy of G (with x ∈ X and y ∈ Y ) as follows: if e ∈ M then orient e as ( y , x ), if e �∈ M then orient e as ( x , y ). Let X M and Y M be the subsets of vertices of X and Y (resp.) that are free of M . Clearly, G contains an M -augmenting path if and only if D M contains an X M Y M -path. Orlando Lee – Unicamp Topics in Combinatorial Optimization
Maximum matching in bipartite graphs X Y G contains an M -augmenting path if and only if D M contains an X M Y M -path. Orlando Lee – Unicamp Topics in Combinatorial Optimization
Maximum matching in bipartite graphs The following algorithm obviously produces a maximum matching of a ( X , Y )-bipartite graph G . MaxBipartiteMatching ( G ) 1. M ← ∅ ⊲ or any matching 2. while there exists an X M Y M -path Q in D M do 3. let P be the augmenting path corresponding to Q M ← M △ E ( P ) 4. 5. return M Theorem. (Kuhn, 1955) A maximum matching in a bipartite graph can be found in time O ( nm ). Orlando Lee – Unicamp Topics in Combinatorial Optimization
K˝ onig’s theorem Theorem. (K˝ onig, 1931) Let G be a bipartite graph. Then the size of a maximum matching is equal to the size of a minimum vertex cover. Moreover, given a maximum matching, we can find a minimum vertex cover of G in time O ( m ). Proof. We have seen that the maximum is at most the minimum. Let M be a maximum matching and let D M , X M and Y M as previously defined. Let R M be the set of vertices reachable from X M in D M . Thus, R M ∩ Y M = ∅ . Orlando Lee – Unicamp Topics in Combinatorial Optimization
K˝ onig’s theorem R M X Y So each edge of M has both ends in R M or none at all. Moreover, no edge of G connects X ∩ R M and Y \ R M . Hence, ( X \ R M ) ∪ ( Y ∩ R M ) is a vertex cover with the same size of M . Orlando Lee – Unicamp Topics in Combinatorial Optimization
Hall’s condition X Y Does there exist a matching that covers X ? Orlando Lee – Unicamp Topics in Combinatorial Optimization
Hall’s condition S X Y Does there exist a matching that covers X ? Orlando Lee – Unicamp Topics in Combinatorial Optimization
Hall’s condition S X Y Γ( S ) Γ( S ) := set of neighbors of S | Γ( S ) | < | S | = ⇒ no matching covers X Orlando Lee – Unicamp Topics in Combinatorial Optimization
Hall’s condition S X Y Γ( S ) If there exists a matching that covers X , then | Γ( S ) | ≥ | S | for all S ⊆ X . Orlando Lee – Unicamp Topics in Combinatorial Optimization
Hall’s theorem Theorem. (Hall, 1935) A ( X , Y )-bipartite graph has a matching that covers X if and only if | Γ( S ) | ≥ | S | for all S ⊆ X . Proof. We have seen that condition is necessary. Let us show sufficiency. Let M be a maximum matching. If it covers X then the result follows. Let D M , X M and Y M as defined in the MaxBipartiteMatching algorithm. Let R M be the set of vertices reachable from X M in D M . Orlando Lee – Unicamp Topics in Combinatorial Optimization
K˝ onig’s theorem S X Y So each edge of M has both ends in R M or none at all. Moreover, no edge of G connects X ∩ R M and Y \ R M . Let S := R M ∩ X . Then | Γ( S ) | < | S | . Orlando Lee – Unicamp Topics in Combinatorial Optimization
Recommend
More recommend
Explore More Topics
Stay informed with curated content and fresh updates.