May 9, 20131 New Topic The complexity of counting.

Slides:



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

Complexity Theory Lecture 7
Theory of Computing Lecture 18 MAS 714 Hartmut Klauck.
CS151 Complexity Theory Lecture 17 May 27, CS151 Lecture 172 Outline elements of the proof of the PCP Theorem counting problems –#P and its relation.
Complexity 25-1 Complexity Andrei Bulatov #P-Completeness.
CSC5160 Topics in Algorithms Tutorial 2 Introduction to NP-Complete Problems Feb Jerry Le
Complexity 11-1 Complexity Andrei Bulatov NP-Completeness.
CS21 Decidability and Tractability
February 23, 2015CS21 Lecture 201 CS21 Decidability and Tractability Lecture 20 February 23, 2015.
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.
1 CSE 417: Algorithms and Computational Complexity Winter 2001 Lecture 23 Instructor: Paul Beame.
Fall 2006Costas Busch - RPI1 More NP-complete Problems.
NP-Completeness (2) NP-Completeness Graphs 4/17/2017 6:25 AM x x x x x
1 CSE 417: Algorithms and Computational Complexity Winter 2001 Lecture 24 Instructor: Paul Beame.
CSE 421 Algorithms Richard Anderson Lecture 27 NP Completeness.
1 On the Computation of the Permanent Dana Moshkovitz.
February 25, 2015CS21 Lecture 211 CS21 Decidability and Tractability Lecture 21 February 25, 2015.
Lecture 22 More NPC problems
INHERENT LIMITATIONS OF COMPUTER PROGRAMS CSci 4011.
Week 10Complexity of Algorithms1 Hard Computational Problems Some computational problems are hard Despite a numerous attempts we do not know any efficient.
Complexity 25-1 Complexity Andrei Bulatov Counting Problems.
EMIS 8373: Integer Programming NP-Complete Problems updated 21 April 2009.
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
Fall 2013 CMU CS Computational Complexity Lecture 7 Alternating Quantifiers, PH, PSPACE. These slides are mostly a resequencing of Chris Umans’
Lecture 6 NP Class. P = ? NP = ? PSPACE They are central problems in computational complexity.
CS 3343: Analysis of Algorithms Lecture 25: P and NP Some slides courtesy of Carola Wenk.
CSCI 3130: Formal languages and automata theory Andrej Bogdanov The Chinese University of Hong Kong The Cook-Levin.
1 Suppose I construct a TM M f which: 1. Preserves its input u. 2. Simulates a machine M b on input ε. 3. If M b hangs on input ε, force an infinite loop.
Lecture 25 NP Class. P = ? NP = ? PSPACE They are central problems in computational complexity.
1 CPSC 320: Intermediate Algorithm Design and Analysis July 30, 2014.
NP-completeness NP-complete problems. Homework Vertex Cover Instance. A graph G and an integer k. Question. Is there a vertex cover of cardinality k?
NPC.
CSC 413/513: Intro to Algorithms
CSCI 2670 Introduction to Theory of Computing December 2, 2004.
CSCI 2670 Introduction to Theory of Computing December 7, 2005.
CSE 421 Algorithms Richard Anderson Lecture 27 NP-Completeness Proofs.
CSC 3130: Automata theory and formal languages Andrej Bogdanov The Chinese University of Hong Kong NP-complete.
Complexity 24-1 Complexity Andrei Bulatov Counting Problems.
Prof. Busch - LSU1 Busch Complexity Lectures: More NP-complete Problems.
 2005 SDU Lecture15 P,NP,NP-complete.  2005 SDU 2 The PATH problem PATH = { | G is a directed graph that has a directed path from s to t} s t
TU/e Algorithms (2IL15) – Lecture 10 1 NP-Completeness, II.
NP-Completeness (2) NP-Completeness Graphs 4/13/2018 5:22 AM x x x x x
Richard Anderson Lectures NP-Completeness
Richard Anderson Lecture 26 NP-Completeness
More NP-complete Problems
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
Richard Anderson Lecture 26 NP-Completeness
Perfect Matchings in Bipartite Graphs
NP-Completeness Yin Tat Lee
CS21 Decidability and Tractability
CS151 Complexity Theory Lecture 13 May 15, 2017.
Lecture 24 NP-Complete Problems
NP-Completeness (2) NP-Completeness Graphs 11/23/2018 2:12 PM x x x x
More NP-complete Problems
Richard Anderson Lecture 25 NP-Completeness
Richard Anderson Lecture 28 NP-Completeness
NP-Completeness Yin Tat Lee
CS21 Decidability and Tractability
CSE 6408 Advanced Algorithms.
CS21 Decidability and Tractability
NP-Completeness Yin Tat Lee
Lecture 4-4 #P-complete Problems
CS21 Decidability and Tractability
Umans Complexity Theory Lectures
Trevor Brown DC 2338, Office hour M3-4pm
CS151 Complexity Theory Lecture 12 May 10, 2019.
NP-Completeness (2) NP-Completeness Graphs 7/9/2019 6:12 AM x x x x x
Lecture 23 NP-Hard Problems
Presentation transcript:

May 9, New Topic The complexity of counting

May 9, Counting problems So far, we have ignored function problems –given x, compute f(x) important class of function problems: counting problems –e.g. given 3-CNF φ how many satisfying assignments are there?

May 9, Counting problems #P is the class of function problems expressible as: input x f(x) = |{y : (x, y)  R}| where R  P. compare to NP (decision problem) input x f(x) =  y : (x, y)  R ? where R  P.

May 9, Counting problems examples –#SAT: given 3-CNF φ how many satisfying assignments are there? –#CLIQUE: given (G, k) how many cliques of size at least k are there?

May 9, Reductions Reduction from function problem f 1 to function problem f 2 –two efficiently computable functions Q, A x (prob. 1) y (prob. 2) f 2 (y) f 1 (x) Q A f2f2 f1f1

May 9, Reductions problem f is #P-complete if –f is in #P –every problem in #P reduces to f “parsimonious reduction”: A is identity –many standard NP-completeness reductions are parsimonious –therefore: if #SAT is #P-complete we get lots of #P-complete problems x (prob. 1) y (prob. 2) f 2 (y) f 1 (x) Q A f2f2 f1f1

May 9, #SAT #SAT: given 3-CNF φ how many satisfying assignments are there? Theorem: #SAT is #P-complete. Proof: –clearly in #P: (φ, A)  R  A satisfies φ –take any f  #P defined by R  P

May 9, #SAT –add new variables z, produce φ such that  z φ(x, y, z) = 1  C(x, y) = 1 –for (x, y) such that C(x, y) = 1 this z is unique –hardwire x –# satisfying assignments = |{y : (x, y)  R}| …x… …y… C CVAL reduction for R 1 iff (x, y)  R f(x) = |{y : (x, y)  R}|

May 9, Relationship to other classes To compare to classes of decision problems, usually consider P #P which is a decision class… easy: NP, coNP  P #P easy: P #P  PSPACE Toda’s Theorem (homework): PH  P #P.

May 14, Relationship to other classes Question: is #P hard because it entails finding NP witnesses? …or is counting difficult by itself?

May 14, Bipartite Matchings Definition: –G = (U, V, E) bipartite graph with |U| = |V| –a perfect matching in G is a subset M  E that touches every node, and no two edges in M share an endpoint

May 14, Bipartite Matchings Definition: –G = (U, V, E) bipartite graph with |U| = |V| –a perfect matching in G is a subset M  E that touches every node, and no two edges in M share an endpoint

May 14, Bipartite Matchings #MATCHING: given a bipartite graph G = (U, V, E) how many perfect matchings does it have? Theorem: #MATCHING is #P-complete. But… can find a perfect matching in polynomial time! –counting itself must be difficult

May 14, Cycle Covers Claim: 1-1 correspondence between cycle covers in G’ and perfect matchings in G –#MATCHING and #CYCLE-COVER parsimoniously reducible to each other G = (U, V, E)G’ = (V, E’)

May 14, Cycle Covers cycle cover: collection of node-disjoint directed cycles that touch every node #CYCLE-COVER: given directed graph G = (V, E) how many cycle covers does it have? Theorem: #CYCLE-COVER is #P-complete. –implies #MATCHING is #P-complete

May 14, Cycle Cover is #P-complete variable gadget: every cycle cover includes left cycle or right cycle xixi xixi clause gadget: cycle cover cannot use all three outer edges – and each of 7 ways to exclude at least one gives exactly 1 cover using those external edges

Cycle Cover is #P-complete May 14,

Cycle Cover is #P-complete May 14,

May 14, Cycle Cover is #P-complete clause gadget corresponding to (A  B  C) has “xor” gadget between outer 3 edges and A, B, C B BB A AA C CC xor gadget ensures that exactly one of two edges can be in cover uv u’v’ xor

May 14, Cycle Cover is #P-complete Proof outline (reduce from #SAT) (  x 1  x 2  x 3 )  (  x 3  x 1 )  …  (x 3  x 2 ) x1x1 x1x1 x2x2 x2x2 x3x3 x3x3... clause gadgets variable gadgets xor gadgets (exactly 1 of two edges is in cover) N.B. must avoid reducing SAT to MATCHING!

May 14, Cycle Cover is #P-complete Introduce edge weights –cycle cover weight is product of weights of its edges “implement” xor gadget by –weight of cycle cover that “obeys” xor multiplied by 4 (mod N) –weight of cycle cover that “violates” xor multiplied by N large integer

May 14, Cycle Cover is #P-complete Weighted xor gadget: –weight of cycle cover that “obeys” xor multiplied by 4 (mod N) –weight of cycle cover that “violates” xor multiplied by N uv u’v’ xor u v’ v u’ N (unlabeled weights are 1)

May 14, Cycle Cover is #P-complete Simulating positive edge weights –need to handle 2, 3, 4, 5, …, N k2k k times

May 14, Cycle Cover is #P-complete (  x 1  x 2  x 3 )  (  x 3  x 1 )  …  (x 3  x 2 ) –m = # xor gadgets; n = # variables; N > 4 m 2 n –# covers (mod N) = (4 m ) ¢ (#sat. assignments) x1x1 x1x1 x2x2 x2x2 x3x3 x3x3... clause gadget variable gadgets: xor gadget (exactly 1 of two edges is in cover)