A Fast Algorithm for Enumerating Bipartite Perfect Matchings Takeaki Uno (National Institute of Informatics, JAPAN)

Slides:



Advertisements
Similar presentations
More Efficient Generation of Plane Triangulations Shin-ichi Nakano Takeaki Uno Gunma University National Institute of JAPAN Informatics, JAPAN 23/Sep/2003.
Advertisements

Comp 122, Spring 2004 Greedy Algorithms. greedy - 2 Lin / Devi Comp 122, Fall 2003 Overview  Like dynamic programming, used to solve optimization problems.
Greedy Algorithms Greed is good. (Some of the time)
1 Discrete Structures & Algorithms Graphs and Trees: III EECE 320.
Graph Isomorphism Algorithms and networks. Graph Isomorphism 2 Today Graph isomorphism: definition Complexity: isomorphism completeness The refinement.
Label Placement and graph drawing Imo Lieberwerth.
A polylogarithmic approximation of the minimum bisection Robert Krauthgamer The Hebrew University Joint work with Uri Feige.
Perfect Matching for Biconnected Cubic Graphs in O(nlog 2 n) Time Krzysztof Diks & Piotr Stańczyk.
A Randomized Linear-Time Algorithm to Find Minimum Spanning Trees David R. Karger David R. Karger Philip N. Klein Philip N. Klein Robert E. Tarjan.
On the Enumeration of Bipartite Minimum Edge Colorings Yasuko Matsui (Tokai Univ. JAPAN) Takeaki Uno (National Institute of Informatics, JAPAN)
1 Discrete Structures & Algorithms Graphs and Trees: II EECE 320.
Introduction to Approximation Algorithms Lecture 12: Mar 1.
DAST 2005 Tirgul 14 (and more) sample questions. DAST 2005 (reminder?) Kruskal’s MST Algorithm.
The max flow problem
CSE 421 Algorithms Richard Anderson Lecture 4. What does it mean for an algorithm to be efficient?
Lecture 11. Matching A set of edges which do not share a vertex is a matching. Application: Wireless Networks may consist of nodes with single radios,
A 2-Approximation algorithm for finding an optimum 3-Vertex-Connected Spanning Subgraph.
Lecture 11. Matching A set of edges which do not share a vertex is a matching. Application: Wireless Networks may consist of nodes with single radios,
UMass Lowell Computer Science Analysis of Algorithms Prof. Karen Daniels Fall, 2004 Lecture 5 Wednesday, 10/6/04 Graph Algorithms: Part 2.
Antimagic Labellings of Graphs Torsten Mütze Joint work with Dan Hefetz and Justus Schwartz.
1 CSC 6001 VLSI CAD (Physical Design) January
1 Introduction to Approximation Algorithms. 2 NP-completeness Do your best then.
Algorithms for Enumerating All Spanning Trees of Undirected and Weighted Graphs Presented by R 李孟哲 R 陳翰霖 R 張仕明 Sanjiv Kapoor and.
Fixed Parameter Complexity Algorithms and Networks.
I/O-Efficient Graph Algorithms Norbert Zeh Duke University EEF Summer School on Massive Data Sets Århus, Denmark June 26 – July 1, 2002.
1 Introduction to Approximation Algorithms. 2 NP-completeness Do your best then.
CSCE350 Algorithms and Data Structure Lecture 17 Jianjun Hu Department of Computer Science and Engineering University of South Carolina
2IL05 Data Structures Fall 2007 Lecture 13: Minimum Spanning Trees.
Introduction to Algorithms L ECTURE 14 (Chap. 22 & 23) Greedy Algorithms I 22.1 Graph representation 23.1 Minimum spanning trees 23.1 Optimal substructure.
Spring 2015 Lecture 11: Minimum Spanning Trees
Approximating the Minimum Degree Spanning Tree to within One from the Optimal Degree R 陳建霖 R 宋彥朋 B 楊鈞羽 R 郭慶徵 R
Toward Constant time Enumeration by Amortized Analysis 27/Aug/2015 Lorentz Workshop for Enumeration Algorithms Using Structures Takeaki Uno (National Institute.
UNC Chapel Hill Lin/Foskey/Manocha Minimum Spanning Trees Problem: Connect a set of nodes by a network of minimal total length Some applications: –Communication.
Lecture 16 Maximum Matching. Incremental Method Transform from a feasible solution to another feasible solution to increase (or decrease) the value of.
TECH Computer Science NP-Complete Problems Problems  Abstract Problems  Decision Problem, Optimal value, Optimal solution  Encodings  //Data Structure.
An Efficient Algorithm for Enumerating Pseudo Cliques Dec/18/2007 ISAAC, Sendai Takeaki Uno National Institute of Informatics & The Graduate University.
Lecture 19 Greedy Algorithms Minimum Spanning Tree Problem.
New Algorithms for Enumerating All Maximal Cliques
NP-COMPLETE PROBLEMS. Admin  Two more assignments…  No office hours on tomorrow.
NP-Complete problems.
Speeding Up Enumeration Algorithms with Amortized Analysis Takeaki Uno (National Institute of Informatics, JAPAN)
Algorithm Design and Analysis (ADA)
Iterative Improvement for Domain-Specific Problems Lecturer: Jing Liu Homepage:
Lecture 12 Algorithm Analysis Arne Kutzner Hanyang University / Seoul Korea.
TU/e Algorithms (2IL15) – Lecture 8 1 MAXIMUM FLOW (part II)
Greedy Algorithms General principle of greedy algorithm
Maximum Flow c v 3/3 4/6 1/1 4/7 t s 3/3 w 1/9 3/5 1/1 3/5 u z 2/2
New Characterizations in Turnstile Streams with Applications
Algorithm Analysis Fall 2017 CS 4306/03
Introduction to Algorithms
May 12th – Minimum Spanning Trees
Algorithms and Networks
Algorithms and networks
Lecture 12 Algorithm Analysis
Chapter 5. Optimal Matchings
Instructor: Shengyu Zhang
Maximum Flow c v 3/3 4/6 1/1 4/7 t s 3/3 w 1/9 3/5 1/1 3/5 u z 2/2
Lecture 12 Algorithm Analysis
Problem Solving 4.
Analysis of Algorithms
Output Sensitive Enumeration
Algorithms (2IL15) – Lecture 7
Maximum Flow c v 3/3 4/6 1/1 4/7 t s 3/3 w 1/9 3/5 1/1 3/5 u z 2/2
Greedy Algorithms Comp 122, Spring 2004.
Alan Kuhnle*, Victoria G. Crawford, and My T. Thai
Lecture 12 Algorithm Analysis
Total running time is O(E lg E).
A Variation of Minimum Latency Problem on Path, Tree and DAG
Analysis of Algorithms
Minimum Spanning Trees
Presentation transcript:

A Fast Algorithm for Enumerating Bipartite Perfect Matchings Takeaki Uno (National Institute of Informatics, JAPAN)

Motivations Goal: find out general techniques and properties for speed up enumeration algorithms Speeding up discrete algorithms. A lot of studies have been done. Enumeration algorithms: Algorithms have been proposed for various problems. Speeding up enumeration algorithm: Only few studies have been done. Optimization => find a solution Enumeration => find many solutions Techniques, structures, and analysis do not work well. Original techniques for enumeration algorithms are required

Enumeration Problem of Bipartite Perfect Matchings For a given bipartite graph G = (V, E), output all the perfect matchings included in G per matching Matsui, Fukuda (’93) O(|E|) I (’97) O(|V|) (amortized analysis) Minimum weighted perfect matchings Matsui, Fukuda O(|E||V|) I (’01: submitting) O(|V|) This talk: O( log |V|) ( both )

Partition the problem into two subproblems, and solve the subproblems recursively 1. Choose a vertex v 2. E 1, E 2 = Partition of edges incident to v 3. Solve two subproblems: enumeration of perfect matchings including an edge of E i for i = 1,2 Subproblem of E 1 = problem of ( V, E \ E 2 ) Simple Algorithm E1E1 E2E2 v

To partition the problem, subproblem of ( V, E \ E i ) has to include at least one perfect matching For a perfect matching M and a vertex v 1. Find a perfect matching M’ ≠ M 2. E 1, E 2 = Partition of edges incident to v such that E 1 includes an edge of M E 2 includes an edge of M’ Simple Algorithm 2 M M’ v How to find M’ ? E1E1 E2E2 # iter ≤ 2 # perfect matchings

Use a directed graph DG( G, M ) · Orient edges of M in a direction · Orient other edges in the opposite direction A perfect matching M‘ exists  a directed cycle is in DG( G, M ) M‘ is obtained by exchanging edges along the cycle Finding M’ from M M Operation of an iteration = Finding a directed cycle = O( |E|)

Consider speeding up an iteration · Really take O( |E| ) time? --- in worst case, really take · Dynamic graph approach --- maintain directed cycle Similar to transitivity update, O( |V| 2 ) · Amortized analysis --- distribute time to subproblems A graph including a perfect matching requires O( |V| 2 ) time Difficulty of Speed up Needs of · improve algorithms · improve amortized analysis

“Trimming and balancing“ generalized technique for speeding up Proposed 3 years ago ( by I ) : Isaac98 · Time complexity analysis and speeding up using the analysis, specialized for enumeration algorithms · Improved several algorithms, which had not been improved by existing techniques

Corollary of “Trimming and balancing“ For an iteration x of an (recursive type) enumeration algorithm, T(x) : computation time for x Chd(x) : Children of x T* : amortized computation time for an iteration T l : maximum computation time of bottom level iterations If for a constant α >1, for any x, α T(x) - α ≤ ∑ T(y) => T* = O ( T l ) y ∈ Chd(x) If for a constant α > 1, for any x and its child y, αT(y) + α ≥ T(x) => T* = O ( T l × log ( input size ) ) ( we use this here)

“Trimming and balancing“ Trimming and balancing improves algorithms by adding trimming phase and balancing phase to each iteration Simple algorithm · satisfies no these conditions · T l = O(|E|) For each iteration, add “trimming phase” to decrease T l → O( 1 ) add “balancing phase” to satisfy T(x)-2 ≤ 4T(y)

Trimming Phase Pass reduced graphs to subproblems Remove edges · included in all perfect matchings · included in no perfect matching → included in no directed cycle Contract 3 consecutive edges into an edge Take O(|E|) time Reduce to an equivalent problem On bottom level input graph includes one perfect matching → O(1) size graph → T l = O( 1 )

Trimming Phase 2 Lemma For a trimmed graph G = (V, E) a perfect matching M, DG(G, M) includes at least f(G) = |E| - |V| +cc(G) directed cycles (cc(G) : # of connected components of G ) In a trimmed graph G = (V, E) |E| ≥ 1.25|V| → |E| - |V| ≥ 0.2|E| → G = (V, E) includes at least 0.2|E| perfect matchings → T l = O( 1 )

Balancing Phase Set E 1, E 2 in arbitrary way If ( V, E \ E i ) has few edges after trimming phase, re-choose E 1, E 2 f(G) = |E| - |V| + ( # of connected components of G ) → ( V, E \ E i ) can includes few edges but 4 f( ( V, E \ E i ) ) + 2 ≥ f(G)

Re-choose edge sets If ( V, E \ E i ) has few edges after trimming phase then DG(G, M) includes many edges included in only directed cycles including edges of E i E1E1 E2E2 Take O(|E|) time EiEi

Analysis An iteration inputting G=( V, E ) takes O(|V|+|E|) = O( f(G) ) time On bottom level, O(|V|+|E|) = O( f(G) ) = O(1) → T l = O( 1 ) From balancing phase, 4 f( (V, E \ E i ) ) + 4 ≥ f(G) From Theorem, time complexity = O( 1 × log n (=log m) ) per perfect matching

Conclusion Speeded up enumeration algorithm of perfect matchings, using “trimming and balancing”