Complexity 25-1 Complexity Andrei Bulatov Counting Problems.

Slides:



Advertisements
Similar presentations
1 Nondeterministic Space is Closed Under Complement Presented by Jing Zhang and Yingbo Wang Theory of Computation II Professor: Geoffrey Smith.
Advertisements

FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY
NP-complete and NP-hard problems Transitivity of polynomial-time many-one reductions Concept of Completeness and hardness for a complexity class Definition.
Complexity 25-1 Complexity Andrei Bulatov #P-Completeness.
Complexity 11-1 Complexity Andrei Bulatov NP-Completeness.
Complexity 12-1 Complexity Andrei Bulatov Non-Deterministic Space.
Computability and Complexity 23-1 Computability and Complexity Andrei Bulatov Search and Optimization.
Complexity 15-1 Complexity Andrei Bulatov Hierarchy Theorem.
Complexity 11-1 Complexity Andrei Bulatov Space Complexity.
Complexity 26-1 Complexity Andrei Bulatov Interactive Proofs.
Computability and Complexity 14-1 Computability and Complexity Andrei Bulatov Cook’s Theorem.
Computability and Complexity 13-1 Computability and Complexity Andrei Bulatov The Class NP.
Computability and Complexity 19-1 Computability and Complexity Andrei Bulatov Non-Deterministic Space.
February 23, 2015CS21 Lecture 201 CS21 Decidability and Tractability Lecture 20 February 23, 2015.
Computability and Complexity 15-1 Computability and Complexity Andrei Bulatov NP-Completeness.
The Counting Class #P Slides by Vera Asodi & Tomer Naveh
FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY Read sections 7.1 – 7.3 of the book for next time.
NP-Complete Problems Reading Material: Chapter 10 Sections 1, 2, 3, and 4 only.
1 Polynomial Time Reductions Polynomial Computable function : For any computes in polynomial time.
NP-Complete Problems Problems in Computer Science are classified into
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.
Complexity 19-1 Complexity Andrei Bulatov More Probabilistic Algorithms.
Computability and Complexity 20-1 Computability and Complexity Andrei Bulatov Class NL.
CS Master – Introduction to the Theory of Computation Jan Maluszynski - HT Lecture NP-Completeness Jan Maluszynski, IDA, 2007
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.
Computability and Complexity 17-1 Computability and Complexity Andrei Bulatov Strong NP-Completeness.
Theory of Computing Lecture 19 MAS 714 Hartmut Klauck.
Nattee Niparnan. Easy & Hard Problem What is “difficulty” of problem? Difficult for computer scientist to derive algorithm for the problem? Difficult.
The Complexity of Optimization Problems. Summary -Complexity of algorithms and problems -Complexity classes: P and NP -Reducibility -Karp reducibility.
NP Complexity By Mussie Araya. What is NP Complexity? Formal Definition: NP is the set of decision problems solvable in polynomial time by a non- deterministic.
CSCI 2670 Introduction to Theory of Computing November 29, 2005.
CSE 024: Design & Analysis of Algorithms Chapter 9: NP Completeness Sedgewick Chp:40 David Luebke’s Course Notes / University of Virginia, Computer Science.
May 9, New Topic The complexity of counting.
CSC401 – Analysis of Algorithms Chapter 13 NP-Completeness Objectives: Introduce the definitions of P and NP problems Introduce the definitions of NP-hard.
CSCI 3160 Design and Analysis of Algorithms Tutorial 10 Chengyu Lin.
NP-Complete Problems. Running Time v.s. Input Size Concern with problems whose complexity may be described by exponential functions. Tractable problems.
NP-COMPLETE PROBLEMS. Admin  Two more assignments…  No office hours on tomorrow.
Lecture 6 NP Class. P = ? NP = ? PSPACE They are central problems in computational complexity.
NP-Algorithms Tractable vs Intractable Some problems are intractable: as they grow large, we are unable to solve them in reasonable time.
NP-completeness Class of hard problems. Jaruloj ChongstitvatanaNP-complete Problems2 Outline  Introduction  Problems and Languages Turing machines and.
Strings Basic data type in computational biology A string is an ordered succession of characters or symbols from a finite set called an alphabet Sequence.
Lecture 25 NP Class. P = ? NP = ? PSPACE They are central problems in computational complexity.
Chapter 11 Introduction to Computational Complexity Copyright © 2011 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1.
NPC.
COMPLEXITY. Satisfiability(SAT) problem Conjunctive normal form(CNF): Let S be a Boolean expression in CNF. That is, S is the product(and) of several.
Complexity 24-1 Complexity Andrei Bulatov Interactive Proofs.
NP-complete Languages
CSCI 2670 Introduction to Theory of Computing December 2, 2004.
CSCI 2670 Introduction to Theory of Computing December 7, 2005.
Given this 3-SAT problem: (x1 or x2 or x3) AND (¬x1 or ¬x2 or ¬x2) AND (¬x3 or ¬x1 or x2) 1. Draw the graph that you would use if you want to solve this.
Complexity 24-1 Complexity Andrei Bulatov Counting Problems.
1 1. Which of these sequences correspond to Hamilton cycles in the graph? (a) (b) (c) (d) (e)
COMPLEXITY. Satisfiability(SAT) problem Conjunctive normal form(CNF): Let S be a Boolean expression in CNF. That is, S is the product(and) of several.
Computability Examples. Reducibility. NP completeness. Homework: Find other examples of NP complete problems.
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.
 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
ICS 353: Design and Analysis of Algorithms NP-Complete Problems King Fahd University of Petroleum & Minerals Information & Computer Science Department.
NP-Completeness A problem is NP-complete if: It is in NP
The NP class. NP-completeness
Lecture 2-2 NP Class.
Perfect Matchings in Bipartite Graphs
CS21 Decidability and Tractability
ICS 353: Design and Analysis of Algorithms
NP-Complete Problems.
CS154, Lecture 13: P vs NP.
Umans Complexity Theory Lectures
CSE 589 Applied Algorithms Spring 1999
Instructor: Aaron Roth
Lecture 6: Computational Complexity
Lecture 23 NP-Hard Problems
Presentation transcript:

Complexity 25-1 Complexity Andrei Bulatov Counting Problems

Complexity 25-2 Graph Reliability How reliable is our network?

Complexity 25-3 Instance: A graph G and two its vertices s and t Objective: How many subgraphs of G contains a path from s to t ? Graph Reliability Counting Problems Instance: A formula  in CNF Objective: How many satisfying assignments does  have? #SAT

Complexity 25-4 Perfect Matching Definition Given a bipartite graph G with bipartition a perfect matching of G is a collection of n edges such that, for any edges from the collection

Complexity 25-5 Instance: A bipartite graph G Objective: How many perfect matchings does G have? #Matching

Complexity 25-6 Matching and Adjacency Matrix Note that a perfect matching of G is a collection of entries of A(G) such that it contains exactly n entries all of the entries are 1 no two entries are in the same row no two entries are in the same column

Complexity 25-7 Therefore Definition Permanent of an n  n matrix A is the sum #Matching = Permanent

Complexity 25-8 Definition A decider machine V is called a verifier for a language L if L   w  V accepts “ w;c ” for some string c  NP is the class of languages that have a polynomial time verifier Definition A decider machine V is called a verifier for a language L if L   w  V accepts “ w;c ” for some string c  NP is the class of languages that have a polynomial time verifier The Class #P A polynomially balanced, polynomial time decidable binary relation is a binary relation U on  * such that (a) there is a polynomial time decider for U (b) if then for some polynomial p

Complexity 25-9 Definition NP is the class of languages L that can be represented as for a certain polynomially balanced polynomial time decidable relation U Definition NP is the class of languages L that can be represented as for a certain polynomially balanced polynomial time decidable relation U Definition Let U be a certain polynomially balanced polynomial time decidable relation. The counting problem associated with U is the following: Given u, how many v are there such that (u,v)  U ? #P is the class of all counting problems associated with a certain polynomially balanced polynomial time decidable relations Definition Let U be a certain polynomially balanced polynomial time decidable relation. The counting problem associated with U is the following: Given u, how many v are there such that (u,v)  U ? #P is the class of all counting problems associated with a certain polynomially balanced polynomial time decidable relations Every problem from NP has a corresponding counting problem!

Complexity Examples #SAT #Reachability  Graph Reliability #Matching Instance: A graph G Objective: How many Hamilton paths does G have? #Hamilton Path #Primes ? (formula; satisfying assignment) (graph+ s + t ; path from s to t )

Complexity Parsimonious Reduction We need a notion of reduction that “preserves the number of solutions” Definition A polynomial time function f is said to be a parsimonious reduction of a counting problem A to a counting problem B, denoted, if for all instances of A, x and f(x) have the same answer

Complexity #P-Completeness Theorem #SAT is #P-complete Definition A language L is said to be #P -complete if, for any counting problem A corresponding to a polynomially balanced polynomial time decidable relation, Definition A language L is said to be #P -complete if, for any counting problem A corresponding to a polynomially balanced polynomial time decidable relation,

Complexity Proof Take a counting problem A from #P. There is a polynomially balanced polynomial time decidable relation U corresponding to A That is there exist a polynomial p(n) and a Turing machine T such that T decides U (on an input (w,c) ) in a time p(|w|+|c|) if (w,c)  U then |c|  p(|w|) We need to do: Given a string w generate (in polynomial time) a formula such that the number of satisfying assignments to = the number of c such that (w,c)  U

Complexity Reduction When proving Cook’s theorem we, given a non-deterministic Turing machine NT and an input w for NT, built a CNF such that every satisfying assignment of encodes an accepting computation of NT on the input w. The decider for U is a deterministic Turing machine, that is a particular case of non-deterministic machines Consider the formula Since T is deterministic, has at most one satisfying assignment

Complexity The fact that the input for T is (w,c) is encoded as follows Let and then contains the clauses where is true if and only if at the time 1 the tape cell number i contains x Replace with in which is replaced with Then every assignment to correspond to a unique pair (w,c) which may or may not belong to U, and gives rise to a unique satisfying assignment to if and only if (w,c)  U

Complexity More #P-complete Problems #3- SAT #Matching = Permanent # Hamilton Path Open Problem Is this true that if L is NP-complete then # L is #P-complete?

Complexity Counting Problems Solvable in Poly-Time Instance: A system of linear equations modulo p ( p prime) Objective: How many solutions does it have? #System of Linear Equations Fact If a system of linear equations has n variables, then there are at most n+1 different vectors such that any solution can be represented in the form

Complexity This “basis of solutions” can be found in polynomial time (using Gaussian elimination) and the number of solutions is