Perfect matchings in O ( n log n ) time in regular bipartite graphs -Ashish Goel, Michael Kapralov and Sanjeev Khanna October 20, 2019 -Ashish Goel, Michael Kapralov and Sanjeev Khanna Perfect matchings in regular bipartite graphs October 20, 2019 1 / 28
Overview Problem Statement 1 Previous Approaches 2 Algorithm 3 Algorithm Analysis 4 Lower bound for deterministic algorithms 5 -Ashish Goel, Michael Kapralov and Sanjeev Khanna Perfect matchings in regular bipartite graphs October 20, 2019 2 / 28
Overview Problem Statement 1 Previous Approaches 2 Algorithm 3 Algorithm Analysis 4 Lower bound for deterministic algorithms 5 -Ashish Goel, Michael Kapralov and Sanjeev Khanna Perfect matchings in regular bipartite graphs October 20, 2019 3 / 28
Introduction We are given a d -regular bipartite graph on 2 n nodes with m = nd edges. We need to find a perfect matching in the graph. This can be done in O ( m √ n ) time using Hopcroft - Karp algorithm. This paper gives a randomized algorithm that finds a perfect matching in O ( n log n ) time (both in expectation and with high probability). -Ashish Goel, Michael Kapralov and Sanjeev Khanna Perfect matchings in regular bipartite graphs October 20, 2019 4 / 28
Introduction We are given a d -regular bipartite graph on 2 n nodes with m = nd edges. We need to find a perfect matching in the graph. This can be done in O ( m √ n ) time using Hopcroft - Karp algorithm. This paper gives a randomized algorithm that finds a perfect matching in O ( n log n ) time (both in expectation and with high probability). Note The O ( n log n ) running time is smaller than the O ( nd ) time required to read the input and only slightly worse than the O ( n ) time required to output a perfect matching. -Ashish Goel, Michael Kapralov and Sanjeev Khanna Perfect matchings in regular bipartite graphs October 20, 2019 4 / 28
Introduction We are given a d -regular bipartite graph on 2 n nodes with m = nd edges. We need to find a perfect matching in the graph. This can be done in O ( m √ n ) time using Hopcroft - Karp algorithm. This paper gives a randomized algorithm that finds a perfect matching in O ( n log n ) time (both in expectation and with high probability). Note The O ( n log n ) running time is smaller than the O ( nd ) time required to read the input and only slightly worse than the O ( n ) time required to output a perfect matching. Note It is assumed that the graph is presented in the adjacency array format. -Ashish Goel, Michael Kapralov and Sanjeev Khanna Perfect matchings in regular bipartite graphs October 20, 2019 4 / 28
Overview Problem Statement 1 Previous Approaches 2 Algorithm 3 Algorithm Analysis 4 Lower bound for deterministic algorithms 5 -Ashish Goel, Michael Kapralov and Sanjeev Khanna Perfect matchings in regular bipartite graphs October 20, 2019 5 / 28
Previous Approaches H. N. Gabow, G. Karov (1982) O ( m ) time algorithm when d is a power of 2. -Ashish Goel, Michael Kapralov and Sanjeev Khanna Perfect matchings in regular bipartite graphs October 20, 2019 6 / 28
Previous Approaches H. N. Gabow, G. Karov (1982) O ( m ) time algorithm when d is a power of 2. R. Cole, K. Ost, S.Schirra (2001) O ( m ) time algorithm for general d . -Ashish Goel, Michael Kapralov and Sanjeev Khanna Perfect matchings in regular bipartite graphs October 20, 2019 6 / 28
Previous Approaches H. N. Gabow, G. Karov (1982) O ( m ) time algorithm when d is a power of 2. R. Cole, K. Ost, S.Schirra (2001) O ( m ) time algorithm for general d . A. Goel, M. Kapralov, and S. Khanna (2009) � � m , n 2 �� ˜ O min time for general d . d � � m , n 2 �� Also gives a lower bound of ˜ Ω min on the running time of d an algorithm that uses non-adaptive uniform sampling. -Ashish Goel, Michael Kapralov and Sanjeev Khanna Perfect matchings in regular bipartite graphs October 20, 2019 6 / 28
Overview Problem Statement 1 Previous Approaches 2 Algorithm 3 Algorithm Analysis 4 Lower bound for deterministic algorithms 5 -Ashish Goel, Michael Kapralov and Sanjeev Khanna Perfect matchings in regular bipartite graphs October 20, 2019 7 / 28
Construction of H Let G = ( P , Q , E ) be the input d -regular bipartite graph and M be a partial matching in G that leaves 2 k vertices unmatched. -Ashish Goel, Michael Kapralov and Sanjeev Khanna Perfect matchings in regular bipartite graphs October 20, 2019 8 / 28
Construction of H Let G = ( P , Q , E ) be the input d -regular bipartite graph and M be a partial matching in G that leaves 2 k vertices unmatched. Construct the directed graph H = ( V , E ′ ) as: 1. Orient edges of G from P to Q -Ashish Goel, Michael Kapralov and Sanjeev Khanna Perfect matchings in regular bipartite graphs October 20, 2019 8 / 28
Construction of H Let G = ( P , Q , E ) be the input d -regular bipartite graph and M be a partial matching in G that leaves 2 k vertices unmatched. Construct the directed graph H = ( V , E ′ ) as: 1. Orient edges of G from P to Q 2. Add a source vertex s and add d parallel edges to each unmatched vertex in P directed out of s . -Ashish Goel, Michael Kapralov and Sanjeev Khanna Perfect matchings in regular bipartite graphs October 20, 2019 8 / 28
Construction of H Let G = ( P , Q , E ) be the input d -regular bipartite graph and M be a partial matching in G that leaves 2 k vertices unmatched. Construct the directed graph H = ( V , E ′ ) as: 1. Orient edges of G from P to Q 2. Add a source vertex s and add d parallel edges to each unmatched vertex in P directed out of s . 3. Add a sink vertex t and add d parallel edges from each unmatched vertex in Q directed into t . -Ashish Goel, Michael Kapralov and Sanjeev Khanna Perfect matchings in regular bipartite graphs October 20, 2019 8 / 28
Construction of H Let G = ( P , Q , E ) be the input d -regular bipartite graph and M be a partial matching in G that leaves 2 k vertices unmatched. Construct the directed graph H = ( V , E ′ ) as: 1. Orient edges of G from P to Q 2. Add a source vertex s and add d parallel edges to each unmatched vertex in P directed out of s . 3. Add a sink vertex t and add d parallel edges from each unmatched vertex in Q directed into t . 4. Contract each pair ( u , v ) ∈ M into a supernode. -Ashish Goel, Michael Kapralov and Sanjeev Khanna Perfect matchings in regular bipartite graphs October 20, 2019 8 / 28
Construction of H (contd.) The graph H has n + k + 2 nodes and for each vertex v ∈ V \ { s , t } , the in-degree of v is equal to its out-degree. Also, the out-degree of s equals dk and the in-degree of t equals dk . Note Any path from s to t in H gives an augmenting path in G w.r.t. M . -Ashish Goel, Michael Kapralov and Sanjeev Khanna Perfect matchings in regular bipartite graphs October 20, 2019 9 / 28
Construction of H (contd.) The graph H has n + k + 2 nodes and for each vertex v ∈ V \ { s , t } , the in-degree of v is equal to its out-degree. Also, the out-degree of s equals dk and the in-degree of t equals dk . Note Any path from s to t in H gives an augmenting path in G w.r.t. M . Consider the graph H ∗ , obtained from H by: 1. Contracting s and t to s ∗ -Ashish Goel, Michael Kapralov and Sanjeev Khanna Perfect matchings in regular bipartite graphs October 20, 2019 9 / 28
Construction of H (contd.) The graph H has n + k + 2 nodes and for each vertex v ∈ V \ { s , t } , the in-degree of v is equal to its out-degree. Also, the out-degree of s equals dk and the in-degree of t equals dk . Note Any path from s to t in H gives an augmenting path in G w.r.t. M . Consider the graph H ∗ , obtained from H by: 1. Contracting s and t to s ∗ 2. Adding a self loop at every vertex -Ashish Goel, Michael Kapralov and Sanjeev Khanna Perfect matchings in regular bipartite graphs October 20, 2019 9 / 28
Construction of H (contd.) The graph H has n + k + 2 nodes and for each vertex v ∈ V \ { s , t } , the in-degree of v is equal to its out-degree. Also, the out-degree of s equals dk and the in-degree of t equals dk . Note Any path from s to t in H gives an augmenting path in G w.r.t. M . Consider the graph H ∗ , obtained from H by: 1. Contracting s and t to s ∗ 2. Adding a self loop at every vertex Note H ∗ is a balanced directed graph i.e. the in-degree of every vertex is equal to its out-degree. Out-degree of s ∗ equals ( dk + 1), for unmatched vertices it equals ( d + 1) and for matched vertices it equals d . -Ashish Goel, Michael Kapralov and Sanjeev Khanna Perfect matchings in regular bipartite graphs October 20, 2019 9 / 28
Pseudo-code for algorithm Input: A d -regular bipartite graph G = ( P , Q , E ) in adjacency array format. Output: A perfect matching on G Algorithm: 1. Set j := 0, M := φ -Ashish Goel, Michael Kapralov and Sanjeev Khanna Perfect matchings in regular bipartite graphs October 20, 2019 10 / 28
Pseudo-code for algorithm Input: A d -regular bipartite graph G = ( P , Q , E ) in adjacency array format. Output: A perfect matching on G Algorithm: 1. Set j := 0, M := φ � � 4 + 2 n 2. Repeatedly run truncated walk (s, b j ) for b j := 2 on H ∗ , n − j until a successfull run is obtained. -Ashish Goel, Michael Kapralov and Sanjeev Khanna Perfect matchings in regular bipartite graphs October 20, 2019 10 / 28
Recommend
More recommend