Recall: Matchings. Examples. K n,m, K n, Petersen graph, Q k ; graphs without perfect matching

Similar documents
M-saturated M={ } M-unsaturated. Perfect Matching. Matchings

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

Combinatorial Optimization

Graphs & Algorithms: Advanced Topics Nowhere-Zero Flows

Chapter 7 Matchings and r-factors

Observation 4.1 G has a proper separation of order 0 if and only if G is disconnected.

Maximum flow problem

Graph G = (V, E). V ={vertices}, E={edges}. V={a,b,c,d,e,f,g,h,k} E={(a,b),(a,g),( a,h),(a,k),(b,c),(b,k),...,(h,k)}

Agenda. Soviet Rail Network, We ve done Greedy Method Divide and Conquer Dynamic Programming

CS675: Convex and Combinatorial Optimization Fall 2016 Combinatorial Problems as Linear and Convex Programs. Instructor: Shaddin Dughmi

CS675: Convex and Combinatorial Optimization Fall 2014 Combinatorial Problems as Linear Programs. Instructor: Shaddin Dughmi

Observation 4.1 G has a proper separation of order 0 if and only if G is disconnected.

Material. Tibor Szabó Summer 2010 Combinatorics

On shredders and vertex connectivity augmentation

Part V. Matchings. Matching. 19 Augmenting Paths for Matchings. 18 Bipartite Matching via Flows

7.5 Bipartite Matching

1 Matchings in Non-Bipartite Graphs

Bipartite Matchings. Andreas Klappenecker

6.046 Recitation 11 Handout

- Well-characterized problems, min-max relations, approximate certificates. - LP problems in the standard form, primal and dual linear programs

Advanced Topics in Discrete Math: Graph Theory Fall 2010

2 Matchings and 1-Factors

Computer Science & Engineering 423/823 Design and Analysis of Algorithms

15.1 Matching, Components, and Edge cover (Collaborate with Xin Yu)

Two Applications of Maximum Flow

The min cost flow problem Course notes for Search and Optimization Spring 2004

5 Flows and cuts in digraphs

Generating p-extremal graphs

4-coloring P 6 -free graphs with no induced 5-cycles

RECOVERY OF NON-LINEAR CONDUCTIVITIES FOR CIRCULAR PLANAR GRAPHS

CS 6820 Fall 2014 Lectures, October 3-20, 2014

Algorithm Design and Analysis

Ring Sums, Bridges and Fundamental Sets

Soviet Rail Network, 1955

Introduction to Graph Theory

arxiv: v2 [math.co] 24 May 2018

Out-colourings of Digraphs

On a Conjecture of Thomassen

Nowhere zero flow. Definition: A flow on a graph G = (V, E) is a pair (D, f) such that. 1. D is an orientation of G. 2. f is a function on E.

The Algorithmic Aspects of the Regularity Lemma

The Steiner Network Problem

Math 5707: Graph Theory, Spring 2017 Midterm 3

directed weighted graphs as flow networks the Ford-Fulkerson algorithm termination and running time

Classical Complexity and Fixed-Parameter Tractability of Simultaneous Consecutive Ones Submatrix & Editing Problems

Independent Transversals in r-partite Graphs

Flows and Cuts. 1 Concepts. CS 787: Advanced Algorithms. Instructor: Dieter van Melkebeek

Math 301: Matchings in Graphs

arxiv: v1 [math.co] 1 Oct 2013

Coloring. Basics. A k-coloring of a loopless graph G is a function f : V (G) S where S = k (often S = [k]).

Packing and Covering Dense Graphs

Topics in Approximation Algorithms Solution for Homework 3

Chapter 7. Network Flow. Slides by Kevin Wayne. Copyright 2005 Pearson-Addison Wesley. All rights reserved.

Imprimitive symmetric graphs with cyclic blocks

The min cost flow problem Course notes for Optimization Spring 2007

Preliminaries. Graphs. E : set of edges (arcs) (Undirected) Graph : (i, j) = (j, i) (edges) V = {1, 2, 3, 4, 5}, E = {(1, 3), (3, 2), (2, 4)}

CS 138b Computer Algorithm Homework #14. Ling Li, February 23, Construct the level graph

Notes on Graph Theory

An Algorithmic Proof of the Lopsided Lovász Local Lemma (simplified and condensed into lecture notes)

GRAPH PARTITIONING USING SINGLE COMMODITY FLOWS [KRV 06] 1. Preliminaries

RECAP How to find a maximum matching?

Analogies and discrepancies between the vertex cover number and the weakly connected domination number of a graph

Constructive proof of deficiency theorem of (g, f)-factor

Maximum Flow. Reading: CLRS Chapter 26. CSE 6331 Algorithms Steve Lai

Undirected Graphs. V = { 1, 2, 3, 4, 5, 6, 7, 8 } E = { 1-2, 1-3, 2-3, 2-4, 2-5, 3-5, 3-7, 3-8, 4-5, 5-6 } n = 8 m = 11

Ma/CS 6b Class 3: Stable Matchings

Ma/CS 6a Class 28: Latin Squares

INVERSE SPANNING TREE PROBLEMS: FORMULATIONS AND ALGORITHMS

A note on network reliability

1 Integer Decomposition Property

Blockers for the stability number and the chromatic number

GRAPH ALGORITHMS Week 7 (13 Nov - 18 Nov 2017)

Spring 2017 CO 250 Course Notes TABLE OF CONTENTS. richardwu.ca. CO 250 Course Notes. Introduction to Optimization

A short course on matching theory, ECNU Shanghai, July 2011.

Trees. A tree is a graph which is. (a) Connected and. (b) has no cycles (acyclic).

Linear-Time Algorithms for Finding Tucker Submatrices and Lekkerkerker-Boland Subgraphs

On the Existence of a Second Hamilton Cycle in Hamiltonian Graphs With Symmetry

The Matching Polytope: General graphs

Decomposing oriented graphs into transitive tournaments

Introduction to Domination Polynomial of a Graph

A lower bound for the Laplacian eigenvalues of a graph proof of a conjecture by Guo

THE MAXIMAL SUBGROUPS AND THE COMPLEXITY OF THE FLOW SEMIGROUP OF FINITE (DI)GRAPHS

The Reduction of Graph Families Closed under Contraction

Applications of the Lopsided Lovász Local Lemma Regarding Hypergraphs

A New Characterization of König-Egervary Graphs

R(p, k) = the near regular complete k-partite graph of order p. Let p = sk+r, where s and r are positive integers such that 0 r < k.

CSCE423/823. Introduction. Flow Networks. Ford-Fulkerson Method. Edmonds-Karp Algorithm. Maximum Bipartite Matching 2/35 CSCE423/823.

CS261: A Second Course in Algorithms Lecture #9: Linear Programming Duality (Part 2)

Duality of LPs and Applications

3. Linear Programming and Polyhedral Combinatorics

A taste of perfect graphs

THE (2k 1)-CONNECTED MULTIGRAPHS WITH AT MOST k 1 DISJOINT CYCLES

U.C. Berkeley CS294: Beyond Worst-Case Analysis Handout 2 Luca Trevisan August 29, 2017

Claw-Free Graphs With Strongly Perfect Complements. Fractional and Integral Version.

21-301, Spring 2019 Homework 4 Solutions

CO 250 Final Exam Guide

Math 775 Homework 1. Austin Mohr. February 9, 2011

Lectures 6, 7 and part of 8

Planar Graphs (1) Planar Graphs (3) Planar Graphs (2) Planar Graphs (4)

ACO Comprehensive Exam March 17 and 18, Computability, Complexity and Algorithms

Linear programming. Saad Mneimneh. maximize x 1 + x 2 subject to 4x 1 x 2 8 2x 1 + x x 1 2x 2 2

Transcription:

Recall: Matchings A matching is a set of (non-loop) edges with no shared endpoints. The vertices incident to an edge of a matching M are saturated by M, the others are unsaturated. A perfect matching of G is matching which saturates all the vertices. Examples. K n,m, K n, Petersen graph, Q k ; graphs without perfect matching A maximal matching cannot be enlarged by adding another edge. A maximum matching of G is one of maximum size. Example. Maximum Maximal 1

Recall: Characterization of maximum matchings Let M be a matching. A path that alternates between edges in M and edges not in M is called an M- alternating path. An M-alternating path whose endpoints are unsaturated by M is called an M-augmenting path. Theorem(Berge, 1957) A matching M is a maximum matching of graph G iff G has no M-augmenting path. Proof. ( ) Easy. ( ) Suppose there is no M-augmenting path and let M be a matching of maximum size. What is then M M??? Lemma Let M 1 and M 2 be matchings of G. Then each connected component of M 1 M 2 is a path or an even cycle. For two sets A and B, the symmetric difference is A B = (A \ B) (B \ A). 2

Recall: Hall s Condition and consequences Theorem (Marriage Theorem; Hall, 1935) Let G be a bipartite (multi)graph with partite sets X and Y. Then there is a matching in G saturating X iff N(S) S for every S X. Proof. ( ) Easy. ( ) Not so easy. Find an M-augmenting path for any matching M which does not saturate X. (Let U be the M-unsaturated vertices in X. Define T := {y Y : M-alternating U, y-path}, S := {x X : M-alternating U, x-path}. Unless there is an M-augmenting path, S U violates Hall s condition.) Corollary. (Frobenius (1917)) For k > 0, every k- regular bipartite (multi)graph has a perfect matching. 3

Recall: Application: 2-Factors A factor of a graph is a spanning subgraph. A k-factor is a spanning k-regular subgraph. Every regular bipartite graph has a 1-factor. Not every regular graph has a 1-factor. But... Theorem. (Petersen, 1891) Every 2k-regular graph has a 2-factor. Proof. Use Eulerian cycle of G to create an auxiliary k-regular bipartite graph H, such that a perfect matching in H corresponds to a 2-factor in G. 4

Recall: Graph parameters α (G) = size of the largest matching in G A vertex cover of G is a set Q V (G) that contains at least one endpoint of every edge. β(g) = size of the smallest vertex cover in G Claim. For every graph G, β(g) α (G). Theorem. (König (1931), Egerváry (1931)) If G is bipartite then β(g) = α (G). Proof of König s Theorem: For any minimum vertex cover Q, apply Hall s Condition to match Q X into Y \ Q and Q Y into X \ Q. Remarks 1. König s Theorem For bipartite graphs there always exists a vertex cover proving that a particular matching of maximum size is really maximum. 2. This is NOT the case for general graphs: C 5. 5

How to find a maximum matching in bipartite graphs? Augmenting Path Algorithm Input. A bipartite graph G with partite sets X and Y, a matching M in G. Output. EITHER an M-augmenting path OR a certificate (a cover of the same size) that M is maximum. Idea. Let U be set of unsaturated vertices in X. Explore M-alternating paths from U, letting S X and T Y be the sets of vertices reached. As a vertex is reached, record the previous vertex on the M-alternating path from which it was reached. Mark vertices of S that have been fully explored for path extensions (say, put them into a set Q). Initialization. S = U, Q =, and T =. 6

Iteration. IF Q = S THEN stop and report that M is a maximum matching and T (X \ S), is a cover of the same size. ELSE select x S \ Q and FORALL y N(x) with xy M DO IF y is unsaturated, THEN stop and report an M-augmenting path from U to y. ELSE w X with yw M. Update T := T {y} (y is reached from x), S := S {w} (w is reached from y). update Q := Q {x} iterate. Theorem. Repeatadly applying the Augmenting Path Algorithm to a bipartite graph produces a maximum matching and a minimum vertex cover. If G has n vertices and m edges, then this algorithm finds a maximum matching in O(nm) time. 7

8

Proof of correctness If Augmenting Path Algorithm does what it supposed to, then after at most n/2 application we can produce a maximum matching. Why does the APA terminate? It touches each edge at most once. Hence running time is O(nm). What if an M-augmenting path is returned? It is OK, since y is an unsaturated neighbor of x S, and x can be reached from U on an M-alternating path. What if the APA returns M as maximum matching and T (X \ S) as minimum cover? Since S = Q, all edges leaving S were explored, so there is no edge between S and Y \ T. Hence T (X \ S) is indeed a cover. M = T + X \ S (By selection of S and T.) Key Lemma If, in any graph, a cover and a matching have the same size, then they are both optimal. M α (G) β(g) T (X \ S) = M. 9

How to find a maximum weight matching in a bipartite graph? In the maximum weighted matching problem a nonnegative weight w i,j is assigned to each edge x i y j of K n,n and we seek a perfect matching M to maximize the total weight w(m) = e M w(e). With these weights, a (weighted) cover is a choice of labels u 1,..., u n and v 1,..., v n, such that u i + v j w i,j for all i, j. The cost c(u, v) of a cover (u, v) is ui + v j. The minimum weighted cover problem is that of finding a cover of minimum cost. Duality Lemma For a perfect matching M and a weighted cover (u, v) in a bipartite graph G, c(u, v) w(m). Also, c(u, v) = w(m) iff M consists of edges x i y π(i) such that u i + v π(i) = w i,π(i) for some permutation π S n. In this case, M and (u, v) are both optimal. 10

The algorithm The equality subgraph G u,v for a weighted cover (u, v) is the spanning subgraph of K n,n whose edges are the pairs x i y j such that u i + v j = w i,j. In the cover, the excess for i, j is u i + v j w i,j. Hungarian Algorithm Input. A matrix (w i,j ) of weights on the edges of K n.n with partite sets X and Y. Idea. Iteratively adjusting a cover (u, v) until the equality subgraph G u,v has a perfect matching. Initialization. Let u i = max{w i,j : j = 1,..., n} and v j = 0. 11

Iteration. Form G u,v and use APA to find a maximum matching M and minimum vertex cover Q = T R, where R = X Q and T = Y Q. IF M is a perfect matching, THEN stop and report M as a maximum weight matching and (u, v) as a minimum cost cover ELSE ɛ := min{u i + v j w i,j : x i X \ R, y j Y \ T } Update u and v: u i := u i ɛ if x i X \ R v j := v j + ɛ if y j T Iterate Remarks. By properties of APA: Q = M, no M-edge is covered by twice by Q T = {y Y : there is an M-alternating (U, y)-path} R = {x X : there is NO M-alternating (U, x)-path} where U = {x X : x is M-unsaturated}. Theorem The Hungarian Algorithm finds a maximum weight matching and a minimum cost cover. 12

The Assignment Problem An example 1 2 3 4 5 6 7 8 7 2 1 3 4 4 5 3 6 2 8 7 4 1 3 5 4 Excess Matrix Equality Subgraph 5 8 5 8 5 0 0 0 0 0 4 3 2 1 0 2 1 0 1 6 4 2 1 1 0 5 2 6 0 1 1 4 2 0 1 T T T T T T ɛ = 1 13

4 7 4 7 4 0 0 1 1 1 3 2 2 1 0 1 0 0 1 6 3 1 1 1 0 4 1 6 0 1 0 3 2 0 1 T T T R T R T T ɛ = 1 3 7 3 6 3 1 0 1 2 2 3 1 1 1 0 2 0 0 2 7 3 0 0 1 0 4 0 5 0 1 0 2 1 0 1 DONE!! 14

The Duality Lemma states that if w(m) = c(u, v) for some cover (u, v), then M is maximum weight. We found a maximum weight matching (transversal). The fact that it is maximum is certified by the indicated cover, which has the same cost: 3 7 3 6 3 1 0 1 2 2 1 2 3 4 5 6 7 8 7 2 1 3 4 4 5 3 6 2 8 7 4 1 3 5 4 w(m) = 5 + 7 + 4 + 8 + 4 = 28 = = 1 + 0 + 1 + 2 + 2+ 3 + 7 + 3 + 6 + 3 = c(u, v) 15

Hungarian Algorithm Proof of correctness Proof. If the algorithm ever terminates and G u,v is the equality subgraph of a (u, v), which is indeed a cover, then M is a m.w.m. and (u, v) is a m.c.c. by Duality Lemma. Why is (u, v), created by the iteration, a cover? Let x i y j E(K n,n ). Check the four cases. x i R, y j Y \ T u i and v j do not change. x i R, y j T u i does not change v j increases. x i X \ R, y j T u i decreases by ɛ, v j increases by ɛ. x i X \ R, y j Y \ T u i + v j w i,j by definition of ɛ. 16

Why does the algorithm terminate? # of vertices reached from U by M-alternating paths grows (only edges between S and T can become non-edges during an iteration and these do not participate in such paths.) after n iteration an M-unsaturated y Y is reached with a (U, y)-augmenting path max matching gets larger; can happen n-times after n 2 iteration G u,v has perfect matching