1 Perfect Matchings in Bipartite Graphs An undirected graph G=(U  V,E) is bipartite if U  V=  and E  U  V. A 1-1 and onto function f:U  V is a perfect.

Slides:



Advertisements
Similar presentations
COMPLEXITY THEORY CSci 5403 LECTURE XVI: COUNTING PROBLEMS AND RANDOMIZED REDUCTIONS.
Advertisements

NP-Hard Nattee Niparnan.
Theory of Computing Lecture 18 MAS 714 Hartmut Klauck.
Lecture 23. Subset Sum is NPC
NP-Completeness: Reductions
Department of Computer Science & Engineering
The Theory of NP-Completeness
Complexity 25-1 Complexity Andrei Bulatov #P-Completeness.
Complexity 11-1 Complexity Andrei Bulatov NP-Completeness.
CS21 Decidability and Tractability
Computability and Complexity 15-1 Computability and Complexity Andrei Bulatov NP-Completeness.
1 Optimization problems such as MAXSAT, MIN NODE COVER, MAX INDEPENDENT SET, MAX CLIQUE, MIN SET COVER, TSP, KNAPSACK, BINPACKING do not have a polynomial.
Computability and Complexity 16-1 Computability and Complexity Andrei Bulatov NP-Completeness.
1 CSE 417: Algorithms and Computational Complexity Winter 2001 Lecture 23 Instructor: Paul Beame.
1 CSE 417: Algorithms and Computational Complexity Winter 2001 Lecture 24 Instructor: Paul Beame.
1 On the Computation of the Permanent Dana Moshkovitz.
Toward NP-Completeness: Introduction Almost all the algorithms we studies so far were bounded by some polynomial in the size of the input, so we call them.
Complexity ©D.Moshkovitz 1 Paths On the Reasonability of Finding Paths in Graphs.
Clique Cover Cook’s Theorem 3SAT and Independent Set
February 25, 2015CS21 Lecture 211 CS21 Decidability and Tractability Lecture 21 February 25, 2015.
Theory of Computing Lecture 19 MAS 714 Hartmut Klauck.
The Theory of NP-Completeness 1. Nondeterministic algorithms A nondeterminstic algorithm consists of phase 1: guessing phase 2: checking If the checking.
The Theory of NP-Completeness 1. What is NP-completeness? Consider the circuit satisfiability problem Difficult to answer the decision problem in polynomial.
1 The Theory of NP-Completeness 2012/11/6 P: the class of problems which can be solved by a deterministic polynomial algorithm. NP : the class of decision.
Nattee Niparnan. Easy & Hard Problem What is “difficulty” of problem? Difficult for computer scientist to derive algorithm for the problem? Difficult.
MCS 312: NP Completeness and Approximation algorithms Instructor Neelima Gupta
Lecture 22 More NPC problems
Week 10Complexity of Algorithms1 Hard Computational Problems Some computational problems are hard Despite a numerous attempts we do not know any efficient.
CSE 024: Design & Analysis of Algorithms Chapter 9: NP Completeness Sedgewick Chp:40 David Luebke’s Course Notes / University of Virginia, Computer Science.
Complexity 25-1 Complexity Andrei Bulatov Counting Problems.
EMIS 8373: Integer Programming NP-Complete Problems updated 21 April 2009.
May 9, New Topic The complexity of counting.
1 Chapter 8 NP and Computational Intractability Slides by Kevin Wayne. Copyright © 2005 Pearson-Addison Wesley. All rights reserved.
CS151 Complexity Theory Lecture 12 May 6, QSAT is PSPACE-complete Theorem: QSAT is PSPACE-complete. Proof: 8 x 1 9 x 2 8 x 3 … Qx n φ(x 1, x 2,
Additional NP-complete problems
NP-COMPLETE PROBLEMS. Admin  Two more assignments…  No office hours on tomorrow.
NP-Complete problems.
CS 3343: Analysis of Algorithms Lecture 25: P and NP Some slides courtesy of Carola Wenk.
NP-completeness Section 7.4 Giorgi Japaridze Theory of Computability.
NPC.
CSC 413/513: Intro to Algorithms
The Theory of NP-Completeness 1. Nondeterministic algorithms A nondeterminstic algorithm consists of phase 1: guessing phase 2: checking If the checking.
C&O 355 Lecture 19 N. Harvey TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A A A A A A A A A.
Complexity 24-1 Complexity Andrei Bulatov Counting Problems.
Prof. Busch - LSU1 Busch Complexity Lectures: More NP-complete Problems.
SUBSET-SUM Instance: A set of numbers denoted S and a target number t.
1 The Theory of NP-Completeness 2 Review: Finding lower bound by problem transformation Problem X reduces to problem Y (X  Y ) iff X can be solved by.
The NP class. NP-completeness Lecture2. The NP-class The NP class is a class that contains all the problems that can be decided by a Non-Deterministic.
NP-Completeness (2) NP-Completeness Graphs 4/13/2018 5:22 AM x x x x x
More NP-Complete and NP-hard Problems
More NP-complete problems
More NP-complete Problems
SUBSET-SUM Instance: A set of numbers denoted S and a target number t.
NP-Completeness (2) NP-Completeness Graphs 7/23/ :02 PM x x x x
NP-Completeness (2) NP-Completeness Graphs 7/23/ :02 PM x x x x
NP-Completeness Proofs
Perfect Matchings in Bipartite Graphs
CMU Graduate Complexity Lecture 20
CS154, Lecture 16: More NP-Complete Problems; PCPs
ICS 353: Design and Analysis of Algorithms
NP-Completeness (2) NP-Completeness Graphs 11/23/2018 2:12 PM x x x x
More NP-complete Problems
NP-Completeness Yin Tat Lee
Lecture 4-4 #P-complete Problems
CS154, Lecture 16: More NP-Complete Problems; PCPs
Umans Complexity Theory Lectures
Trevor Brown DC 2338, Office hour M3-4pm
Instructor: Aaron Roth
NP-Completeness (2) NP-Completeness Graphs 7/9/2019 6:12 AM x x x x x
CHAPTER 7 Time complexity
Presentation transcript:

1 Perfect Matchings in Bipartite Graphs An undirected graph G=(U  V,E) is bipartite if U  V=  and E  U  V. A 1-1 and onto function f:U  V is a perfect matching if for any u  U, (u,f(u))  E.

2 Finding Perfect Matchings is Easy Matching as a flow problem

3 What About Counting Them? § Let A=(a(i,j)) 1  i,j  n be the adjacency matrix of a bipartite graph G=({u 1,...,u n }  {v 1,...,v n },E), i.e. - permanent sum over the permutations of {1,...,n} §The number of perfect matchings in the graph is

4 Cycle-Covers Given an undirected bipartite graph G=({u 1,...,u n }  {v 1,...,v n },E), the corresponding directed graph is G’=({w 1,...,w n },E), where (w i,w j )  E iff (u i,v j )  E. Definition: Given a directed graph G=(V,E), a set of node-disjoint cycles that together cover V is called a cycle-cover of G. Observation: Every perfect matching in G corresponds to a cycle-cover in G’ and vice- versa.

5 Three Ways To View Our Problem 1) Counting the number of Perfect Matchings in a bipartite graph. 2) Computing the Permanent of a 0-1 matrix. 3) Counting the number of Cycle-Covers in a directed graph.

6 #P - A Complexity Class of Counting Problems L  NP iff there is a polynomial time decidable binary relation R, s.t. f  #P iff f(x)=| { y | R(x,y) } | where R is a relation associated with some NP problem. We say a #P function is #P-Complete, if every #P function Cook-reduces to it. It is well known that #SAT (i.e - counting the number of satisfying assignments) is #P- Complete. some polynomial

7 On the Hardness of Computing the Permanent Claim [Val79]: Counting the number of cycle- covers in a directed graph is #P-Complete. Proof: By a reduction from #SAT to a generalization of the problem.

8 The Generalization: Integer Permanent §Activity: an integer weight attached to each edge (u,v)  E, denoted (u,v). §The activity of a matching M is (M)=  (u,v)  M (u,v). §The activity of a set of matchings S is (M)=  M  S (M). §The goal is to compute the total activity

9 Integer Permanent Reduces to 0-1 Permanent 2 the rest of the graph 1 1 We would have loved to do something of this sort...

10 Integer Permanent Reduces to 0-1 Permanent the rest of the graph So instead we do:

11 But this is really cheating! The integers may be exponentially large, but we are forbidden to add an exponential number of nodes!

12 The Solution the rest of the graph...

13 What About Negative Numbers? § W.l.og, let us assume the only negative numbers are -1’s. § We can reduce the problem to calculating the Permanent modulo (big enough) N of a 0-1 matrix by replacing each -1 with (N-1). § Obviously, Perm mod N is efficiently reducible to calculating the Permanent.

14 Continuing With The Hardness Proof § We showed that computing the permanent of an integer matrix reduces to computing the permanent of a 0-1 matrix. § It remains to prove the reduction from #SAT to integer Permanent. § We start by presenting a few gadgets.

15 The Choice Gadget Observation: in any cycle-cover the two nodes must be covered by either the left cycle (true) or the right cycle (false). x= truex= false

16 The Clause Gadget Observation: §no cycle-cover of this graph contains all three external edges. §However, for every proper subset of the external edges, there is exactly one cycle- cover containing it. each external edge corresponds to one literal

17 The Exclusive-Or Gadget § The Perm. of the whole matrix is 0. § The Perm. of the matrix resulting if we delete the first (last) row and column is 0. § The Perm. of the matrix resulting if we delete the first (last) row and the last (first) column is

18 Plugging in the XOR-Gadget Observe a cycle-cover of the graph with a XOR-gadget plugged as in the below figure. §If e is traversed but not t (or vice versa), the Perm. is multiplied by 4. § Otherwise, the Perm. is added 0. e t

19 Putting It All Together § One choice gadget for every variable. § One Clause gadget for every clause. x= truex= false if the literal is x x= truex= false if the literal is  x

20 Sum Up § Though finding a perfect matching in a bipartite graph can be done in polynomial time, §counting the number of perfect matchings is #P-Complete, and hence believed to be impossible in polynomial time.