1 Polynomial Church-Turing thesis A decision problem can be solved in polynomial time by using a reasonable sequential model of computation if and only.

Slides:



Advertisements
Similar presentations
Complexity Classes: P and NP
Advertisements

NP-Hard Nattee Niparnan.
Everything you always wanted to know about theoretical computer science (but were afraid to ask) Dimitris Achlioptas Microsoft Research.
Polynomial-time reductions We have seen several reductions:
1 NP-completeness Lecture 2: Jan P The class of problems that can be solved in polynomial time. e.g. gcd, shortest path, prime, etc. There are many.
Department of Computer Science & Engineering
NP-complete and NP-hard problems Transitivity of polynomial-time many-one reductions Concept of Completeness and hardness for a complexity class Definition.
The Theory of NP-Completeness
1 NP-Complete Problems. 2 We discuss some hard problems:  how hard? (computational complexity)  what makes them hard?  any solutions? Definitions 
Theory of Computing Lecture 16 MAS 714 Hartmut Klauck.
Complexity 16-1 Complexity Andrei Bulatov Non-Approximability.
Complexity 15-1 Complexity Andrei Bulatov Hierarchy Theorem.
1 L is in NP means: There is a language L’ in P and a polynomial p so that L 1 · L 2 means: For some polynomial time computable map r : 8 x: x 2 L 1 iff.
Computability and Complexity 13-1 Computability and Complexity Andrei Bulatov The Class NP.
NP-complete and NP-hard problems Transitivity of polynomial-time many-one reductions Definition of complexity class NP –Nondeterministic computation –Problems.
1 dKS, Spring Some practical information Lecturers: Kristoffer Arnsfelt Hansen and Peter Bro Miltersen. Homepage:
1 Polynomial Church-Turing thesis A decision problem can be solved in polynomial time by using a reasonable sequential model of computation if and only.
1 Polynomial Church-Turing thesis A decision problem can be solved in polynomial time in a reasonable sequential model of computation if and only if it.
1 Combinatorial Search Spring 2008 (Fourth Quarter)
The max flow problem
NP-complete and NP-hard problems
Analysis of Algorithms CS 477/677
CSE 421 Algorithms Richard Anderson Lecture 27 NP Completeness.
Chapter 11: Limitations of Algorithmic Power
1 The Theory of NP-Completeness 2 NP P NPC NP: Non-deterministic Polynomial P: Polynomial NPC: Non-deterministic Polynomial Complete P=NP? X = P.
1 L is in NP means: There is a language L’ in P and a polynomial p so that L 1 ≤ L 2 means: For some polynomial time computable map r : x: x L 1 iff r(x)
The Theory of NP-Completeness 1. Nondeterministic algorithms A nondeterminstic algorithm consists of phase 1: guessing phase 2: checking If the checking.
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.
Complexity Classes (Ch. 34) The class P: class of problems that can be solved in time that is polynomial in the size of the input, n. if input size is.
Theory of Computation, Feodor F. Dragan, Kent State University 1 NP-Completeness P: is the set of decision problems (or languages) that are solvable in.
Prabhas Chongstitvatana1 NP-complete proofs The circuit satisfiability proof of NP- completeness relies on a direct proof that L  p CIRCUIT-SAT for every.
CSC 413/513: Intro to Algorithms NP Completeness.
Polynomial-time reductions We have seen several reductions:
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.
CSE 3813 Introduction to Formal Languages and Automata Chapter 14 An Introduction to Computational Complexity These class notes are based on material from.
EMIS 8373: Integer Programming NP-Complete Problems updated 21 April 2009.
Instructor: Shengyu Zhang 1. Tractable While we have introduced many problems with polynomial-time algorithms… …not all problems enjoy fast computation.
CSCI 3160 Design and Analysis of Algorithms Tutorial 10 Chengyu Lin.
1 The Theory of NP-Completeness 2 Cook ’ s Theorem (1971) Prof. Cook Toronto U. Receiving Turing Award (1982) Discussing difficult problems: worst case.
1 Design and Analysis of Algorithms Yoram Moses Lecture 11 June 3, 2010
1 P P := the class of decision problems (languages) decided by a Turing machine so that for some polynomial p and all x, the machine terminates after at.
Umans Complexity Theory Lectures Lecture 1a: Problems and Languages.
NP-Complete Problems. Running Time v.s. Input Size Concern with problems whose complexity may be described by exponential functions. Tractable problems.
1 Chapter 34: NP-Completeness. 2 About this Tutorial What is NP ? How to check if a problem is in NP ? Cook-Levin Theorem Showing one of the most difficult.
Lecture 12 P and NP Introduction to intractability Class P and NP Class NPC (NP-complete)
NP-Complete Problems Algorithm : Design & Analysis [23]
CS 3343: Analysis of Algorithms Lecture 25: P and NP Some slides courtesy of Carola Wenk.
1 How to establish NP-hardness Lemma: If L 1 is NP-hard and L 1 ≤ L 2 then L 2 is NP-hard.
NP-completeness Class of hard problems. Jaruloj ChongstitvatanaNP-complete Problems2 Outline  Introduction  Problems and Languages Turing machines and.
CSE 589 Part V One of the symptoms of an approaching nervous breakdown is the belief that one’s work is terribly important. Bertrand Russell.
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.
CPS Computational problems, algorithms, runtime, hardness (a ridiculously brief introduction to theoretical computer science) Vincent Conitzer.
CS6045: Advanced Algorithms NP Completeness. NP-Completeness Some problems are intractable: as they grow large, we are unable to solve them in reasonable.
Chapter 11 Introduction to Computational Complexity Copyright © 2011 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1.
NP Completeness Piyush Kumar. Today Reductions Proving Lower Bounds revisited Decision and Optimization Problems SAT and 3-SAT P Vs NP Dealing with NP-Complete.
Chapter 15 P, NP, and Cook’s Theorem. 2 Computability Theory n Establishes whether decision problems are (only) theoretically decidable, i.e., decides.
Young CS 331 D&A of Algo. NP-Completeness1 NP-Completeness Reference: Computers and Intractability: A Guide to the Theory of NP-Completeness by Garey and.
The Theory of NP-Completeness 1. Nondeterministic algorithms A nondeterminstic algorithm consists of phase 1: guessing phase 2: checking If the checking.
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.
1 SAT SAT: Given a Boolean function in CNF representation, is there a way to assign truth values to the variables so that the function evaluates to true?
CSE 332: NP Completeness, Part II Richard Anderson Spring 2016.
The NP class. NP-completeness
Richard Anderson Lectures NP-Completeness
NP-Completeness Yin Tat Lee
Chapter 11 Limitations of Algorithm Power
Prabhas Chongstitvatana
NP-Completeness Yin Tat Lee
Presentation transcript:

1 Polynomial Church-Turing thesis A decision problem can be solved in polynomial time by using a reasonable sequential model of computation if and only if it can be solved in polynomial time by a Turing machine.

2 The complexity class P P := the class of decision problems (languages) decided by a Turing machine so that for some polynomial p and all x, the machine terminates after at most p(|x|) steps on input x. By the Polynomial Church-Turing Thesis, P is “robust” with respect to changes of the machine model. Is P also robust with respect to changes of the representation of decision problems as languages?

3 java MaxFlow 6#0|16|13|0|0|0#0|0|10|12|0|0 #0|4|0|0|14|0#0|0|9|0|0|20 #0|0|0|7|0|4|#0|0|0|0|0|0 How to encode max flow instance?

4 java MaxFlow #| | ||| #|| | || #|1111||| | #|| ||| #||| ||1111 #|||||

5 Ford-Fulkerson Ford-Fulkerson algorithm is not a polynomial time algorithm if input is encoded in binary. Ford-Fulkerson is a polynomial time algorithm if input is ecoded in unary.

6 Polynomial time computable maps f: {0,1}* ! {0,1}* is called polynomial time computable if for some polynomial p, - For all x, |f(x)| · p(|x|). - L f 2 P.

7 Polynomial time computable maps A map is polynomial time computable if and only if there is a Turing machine that on every input x accepts after at most a polynomial number of steps and leaves f(x) on its tape when terminating.

8 Good and polynomially equivalent representations A representation is good if the language of valid representations is in P. Two different representations of objects (say graphs, numbers) are called polynomially equivalent if we may translate between them using polynomial time computable maps. Ex: Adjacency matrices vs. Edge lists Ex: Binary vs. Decimal Counterexample: Binary vs. Unary

9 Robustness of Representation Given two good, polynomially equivalent representations of the instances of a decision problem, resulting in languages L 1 and L 2 we have L 1 2 P iff L 2 2 P.

10 Terminology When we say, “Problem X can be solved in polynomial time”, we mean L binary X 2 P, i.e., we assume binary representation of integers of input. If we want to say L unary X 2 P, i.e., assume unary representation of integers, we say “Problem X can be solved in pseudopolynomial time”,

11 Rigorous Formalization “Problems” Languages “Efficient Algorithms” Turing Machines, P “Search Problems” NP “Reductions” Polynomial Reductions “Universal Search Problems” NPC

12 Search Problems: NP L is in NP iff there is a language L’ in P and a polynomial p so that:

13 Intuition The y-strings are the possible solutions to the instance x. We require that solutions are not too long and that it can be checked efficiently if a given y is indeed a solution (we have a “simple” search problem)

14

15

16 P vs. NP P is a subset of NP Is P=NP? Then any “simple” search problem has a polynomial time algorithm. This is the most famous open problem of mathematical computer science!

17

18 If P=NP, mathematicians may be replaced by (much more reliable) computers: P=NP ) There is an algorithmic procedure that takes as input any formal math statement and always outputs its shortest formal proof in time polynomial in the length of the proof. This is usually regarded as evidence that P and NP are different. P vs. NP and mathematics

19 Rigorous Formalization “Problems” Languages “Efficient Algorithms” Turing Machines, P “Search Problems” NP “Reductions” Polynomial Reductions “Universal Search Problems” NPC

20 Reductions A reduction r of L 1 to L 2 is a polynomial time computable map so that 8 x: x 2 L 1 iff r(x) 2 L 2 We write L 1 · L 2 if there is a reduction of L 1 to L 2. Intuition: Efficient software for L 2 can also be used to efficiently solve L 1.

21 Example L TSP · L ILP

22

23 TSP as ILP, compact formulation

24 Properties of reductions Transitivity: L 1 · L 2 Æ L 2 · L 3 ) L 1 · L 3 Follows from Polynomial Church-Turing thesis.

25 Properties of reductions Downward closure of P: L 1 · L 2 Æ L 2 2 P ) L 1 2 P. Follows from Polynomial Church-Turing thesis.

26 NP-hardness A language L is called NP-hard iff 8 L’ 2 NP: L’ · L Intuition: Software for L is strong enough to be used to solve any simple search problem. Proposition: If some NP-hard language is in P, then P=NP.

27 NPC A language L 2 NP that is NP-hard is called NP-complete. NPC := the class of NP-complete problems. Proposition: L 2 NPC ) [L 2 P iff P=NP].

28 Usefulness of NPC Languages in NPC are the least likely problems in NP to be in P. Suppose we would like to find a worst case efficient algorithm for L 2 NPC. If we believe that P is not NP, we know that no worst case efficient algorithm exists. If we have no opinion about P vs. NP, we know that if we find a worst case efficient algorithm for L, we’ll earn $1,000,000.

29 How to establish NP-hardness Thousands of natural problems are NP-complete: Empiric fact: Most natural problems in NP are either in P or NP-hard. Lemma: If L 1 is NP-hard and L 1 · L 2 then L 2 is NP-hard. We need to establish one problem to be NP-hard, the rest follows using chains of reductions. Cook (1972) established SAT to be NP-hard.

30 SAT ILP MILP MAX INDEPENDENT SET MIN VERTEX COLORING HAMILTONIAN CYCLE TSP TRIPARTITE MATCHING SET COVER KNAPSACK BINPACKING