Computability and Complexity 13-1 Computability and Complexity Andrei Bulatov The Class NP.

Slides:



Advertisements
Similar presentations
Polynomial-time reductions We have seen several reductions:
Advertisements

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.
The class NP Section 7.3 Giorgi Japaridze Theory of Computability.
NP-Completeness Lecture for CS 302. Traveling Salesperson Problem You have to visit n cities You want to make the shortest trip How could you do this?
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 
Great Theoretical Ideas in Computer Science for Some.
Theory of Computing Lecture 16 MAS 714 Hartmut Klauck.
Lecture 21 Nondeterministic Polynomial time, and the class NP FIT2014 Theory of Computation Monash University Faculty of Information Technology Slides.
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.
Complexity 15-1 Complexity Andrei Bulatov Hierarchy Theorem.
Computability and Complexity 14-1 Computability and Complexity Andrei Bulatov Cook’s Theorem.
Complexity 18-1 Complexity Andrei Bulatov Probabilistic Algorithms.
NP-completeness Sipser 7.4 (pages 271 – 283). CS 311 Fall The classes P and NP NP = ∪ k NTIME(n k ) P = ∪ k TIME(n k )
Computability and Complexity 19-1 Computability and Complexity Andrei Bulatov Non-Deterministic Space.
NP-complete and NP-hard problems Transitivity of polynomial-time many-one reductions Definition of complexity class NP –Nondeterministic computation –Problems.
NP-Complete Problems Problems in Computer Science are classified into
Computability and Complexity 20-1 Computability and Complexity Andrei Bulatov Class NL.
NP-complete and NP-hard problems
Analysis of Algorithms CS 477/677
NP-Completeness NP-Completeness Graphs 4/17/2017 4:10 AM x x x x x x x
CSE 421 Algorithms Richard Anderson Lecture 27 NP Completeness.
CS Master – Introduction to the Theory of Computation Jan Maluszynski - HT Lecture NP-Completeness Jan Maluszynski, IDA, 2007
Chapter 11: Limitations of Algorithmic Power
Computability and Complexity 17-1 Computability and Complexity Andrei Bulatov Strong NP-Completeness.
Computational Complexity Polynomial time O(n k ) input size n, k constant Tractable problems solvable in polynomial time(Opposite Intractable) Ex: sorting,
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.
חישוביות וסיבוכיות Computability and Complexity Lecture 7 TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A AAAA.
The Complexity of Optimization Problems. Summary -Complexity of algorithms and problems -Complexity classes: P and NP -Reducibility -Karp reducibility.
Cs3102: Theory of Computation Class 24: NP-Completeness Spring 2010 University of Virginia David Evans.
CSC 413/513: Intro to Algorithms NP Completeness.
CSC 172 P, NP, Etc. “Computer Science is a science of abstraction – creating the right model for thinking about a problem and devising the appropriate.
CSCI 2670 Introduction to Theory of Computing November 29, 2005.
Polynomial-time reductions We have seen several reductions:
CSE 024: Design & Analysis of Algorithms Chapter 9: NP Completeness Sedgewick Chp:40 David Luebke’s Course Notes / University of Virginia, Computer Science.
NP-COMPLETENESS PRESENTED BY TUSHAR KUMAR J. RITESH BAGGA.
Complexity 25-1 Complexity Andrei Bulatov Counting Problems.
EMIS 8373: Integer Programming NP-Complete Problems updated 21 April 2009.
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 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 6 NP Class. P = ? NP = ? PSPACE They are central problems in computational complexity.
Non-Approximability Results. Summary -Gap technique -Examples: MINIMUM GRAPH COLORING, MINIMUM TSP, MINIMUM BIN PACKING -The PCP theorem -Application:
NP-Completeness (Nondeterministic Polynomial Completeness) Sushanth Sivaram Vallath & Z. Joseph.
CS 3343: Analysis of Algorithms Lecture 25: P and NP Some slides courtesy of Carola Wenk.
NP-completeness Class of hard problems. Jaruloj ChongstitvatanaNP-complete Problems2 Outline  Introduction  Problems and Languages Turing machines and.
Automata & Formal Languages, Feodor F. Dragan, Kent State University 1 CHAPTER 7 Time complexity Contents Measuring Complexity Big-O and small-o notation.
Donghyun (David) Kim Department of Mathematics and Computer Science North Carolina Central University 1 Chapter 7 Time Complexity Some slides are in courtesy.
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.
CSCI 2670 Introduction to Theory of Computing December 2, 2004.
April 13 th Class Notes Hw# 5 will be worth 50 points and it will be posted tonight or tomorrow.
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.
Great Theoretical Ideas in Computer Science.
The NP class. NP-completeness
Probabilistic Algorithms
CSC 4170 Theory of Computation The class NP Section 7.3.
CS154, Lecture 13: P vs NP.
NP-completeness The Chinese University of Hong Kong Fall 2008
NP-Completeness Lecture for CS 302.
CSE 589 Applied Algorithms Spring 1999
Instructor: Aaron Roth
Theory of Computability
Presentation transcript:

Computability and Complexity 13-1 Computability and Complexity Andrei Bulatov The Class NP

Computability and Complexity 13-2 Beyond P We have seen that the class P provides a useful model of “easy” computation This includes 2- Satisfiability and 2- Colourability But what about 3- Satisfiability and 3- Colourability No polynomial time algorithms for these problems are known On the other hand …

Computability and Complexity 13-3 Certificates Every yes-instance of those problems has a short and easily checkable certificate Satisfiability — a satisfying assignment k - Colourability — a k -colouring Hamiltonian Circuit — a Hamiltonian circuit Linear Programming — a solution to the system of inequalities In all cases one can easily prove a positive answer

Computability and Complexity 13-4 Verifiers Definition A decider machine V is called a verifier for a language L if L   w  V accepts “ w;c ” for some string c  Definition A decider machine V is called a verifier for a language L if L   w  V accepts “ w;c ” for some string c  The string c is called a certificate (or witness) for w A verifier is said to be polynomial time if it is a polynomial time Turing Machine, and there is a polynomial p(x) such that, for any w  L, there is a certificate c with |c|  p(|w|) All problems from the previous slide have a polynomial time verifier

Computability and Complexity 13-5 The Class NP Definition The class of languages that have polynomial time verifiers is called NP Definition The class of languages that have polynomial time verifiers is called NP

Computability and Complexity 13-6 More Examples of Problems in NP Instance: A graph G and a number k. Question: Does G contain a clique of size k ? Clique Instance: A sequence of positive integers and a target integer t. Question: Is there a subset T  S such that ? SubsetSum

Instance: A positive integer k. Question: Are there positive integers u, v >1 such that k = u·v ? Composite Computability and Complexity 13-7 More Examples of Problems in NP Instance: A graph G and two its vertices u and v. Question: Is there a path connecting u and v ? Path

Computability and Complexity 13-8 Problems not in NP Instance: A graph G. Question: Is it true that G has no Hamiltonian circuit? No Hamiltonian Circuit Instance: A positive integer k. Question: Is k prime? Prime ( = Not Composite)

Computability and Complexity 13-9 Problems not in NP Instance: A positive integer n. Question: Is there a winning strategy for whites in a checker game on n  n board? Checkers

Computability and Complexity Non-deterministic Machines We can get an alternative definition of the class NP by considering non-deterministic machines Recall that if NT is a non-deterministic Turing Machine, then NT(x) denotes the tree of configurations which can be entered with input x, and NT accepts x if there is some accepting path in NT(x) Definition The time complexity of a non-deterministic Turing Machine NT is the function such that is the number of steps in the shortest accepting path of NT(x) if there is one, otherwise it is the number of steps in the shortest rejecting path Definition The time complexity of a non-deterministic Turing Machine NT is the function such that is the number of steps in the shortest accepting path of NT(x) if there is one, otherwise it is the number of steps in the shortest rejecting path (If not all paths of NT(x) halt, then is undefined)

Computability and Complexity Nondeterministic Time Complexity Definition For any function f, we say that the nondeterministic time complexity of a decidable language L is in O(f) if there exists a nondeterministic Turing Machine NT which decides L, and constants and c such that for all inputs x with Definition For any function f, we say that the nondeterministic time complexity of a decidable language L is in O(f) if there exists a nondeterministic Turing Machine NT which decides L, and constants and c such that for all inputs x with Definition The nondeterministic time complexity class NTIME[f] is defined to be the class of all languages with nondeterministic time complexity in O(f) Definition The nondeterministic time complexity class NTIME[f] is defined to be the class of all languages with nondeterministic time complexity in O(f)

Computability and Complexity An Alternative Definition of NP Definition This was the original form of the definition of NP, and was first formulated by Karp in 1972 It explains the name — NP  N ondeterministic P olynomial-time

Computability and Complexity Equivalence Theorem The two definitions of NP are equivalent Theorem The two definitions of NP are equivalent Proof: If, then there is a nondeterministic machine NT such that x  L if and only if there is an accepting computation path in NT(x). Furthermore, the length of these paths is in Using (some encoding of) these computation paths as the certificates, we can construct a polynomial time verifier for L which simply checks that each step of the computation path is valid

Computability and Complexity Conversely, if L has a polynomial-time verifier V, then we can construct a non-deterministic Turing Machine that first “guesses” the value of the certificate (by making a series of non-deterministic choices), and then simulates V with that certificate. Since the length of the certificate is polynomial in the length of the input, this machine is a nondeterministic polynomial-time decision procedure for L. guessing a certificate checking certificate

Computability and Complexity P and NP All Languages Decidable Languages PNP

Computability and Complexity P  NP? The question of whether or not P  NP is one of the biggest open problems in computer science It is equivalent to determining whether or not the existence of a short solution guarantees an efficient way to find that solution Virtually everyone is convinced that P  NP, but after 30 years of effort there is still no proof Resolving this question (either way) would win a prize of $1 million — see

Computability and Complexity Reducibility and Completeness Any complexity class can be partitioned into equivalence classes via polynomial-time reduction — each class contains problems that are reducible to each other These equivalence classes are partially ordered by reduction Problems in the maximal class are called complete

Computability and Complexity NP-Completeness Definition A language L is said to be NP -complete if L  NP and, for any A  NP, A  L Definition A language L is said to be NP -complete if L  NP and, for any A  NP, A  L NP-complete problems are the hardest problems in NP They are all equally difficult — an efficient solution to one would solve them all

Computability and Complexity Proving NP-completeness To show that L is NP-complete we must show that every language in NP can be reduced to L in polynomial time This would appear to be hard! However, once we have one NP-complete language we can show any other language L is NP-complete just by showing Hence the most difficult part is finding the first one …

Computability and Complexity Cook – Levin Theorem This problem was solved by Cook in 1970 (and independently by Levin in the USSR) Theorem (Cook – Levin) Satisfiability is NP-complete Theorem (Cook – Levin) Satisfiability is NP-complete