Part VI NP-Hardness.

Slides:



Advertisements
Similar presentations
Part VI NP-Hardness. Lecture 23 Whats NP? Hard Problems.
Advertisements

Deterministic Turing Machines
Complexity Classes: P and NP
Lecture 16 Deterministic Turing Machine (DTM) Finite Control tape head.
Lecture 6 Nondeterministic Finite Automata (NFA)
NP-complete and NP-hard problems Transitivity of polynomial-time many-one reductions Concept of Completeness and hardness for a complexity class Definition.
1 NP-Complete Problems. 2 We discuss some hard problems:  how hard? (computational complexity)  what makes them hard?  any solutions? Definitions 
Lecture 21 Nondeterministic Polynomial time, and the class NP FIT2014 Theory of Computation Monash University Faculty of Information Technology Slides.
Complexity 12-1 Complexity Andrei Bulatov Non-Deterministic Space.
Complexity 15-1 Complexity Andrei Bulatov Hierarchy Theorem.
Computability and Complexity 13-1 Computability and Complexity Andrei Bulatov The Class NP.
P and NP Sipser (pages ). CS 311 Fall Polynomial time P = ∪ k TIME(n k ) … P = ∪ k TIME(n k ) … TIME(n 3 ) TIME(n 2 ) TIME(n)
Complexity Theory CSE 331 Section 2 James Daly. Reminders Project 4 is out Due Friday Dynamic programming project Homework 6 is out Due next week (on.
Computability and Complexity 19-1 Computability and Complexity Andrei Bulatov Non-Deterministic Space.
P, NP, PS, and NPS By Muhannad Harrim. Class P P is the complexity class containing decision problems which can be solved by a Deterministic Turing machine.
Complexity ©D.Moshkovitz 1 Turing Machines. Complexity ©D.Moshkovitz 2 Motivation Our main goal in this course is to analyze problems and categorize them.
NP-complete and NP-hard problems Transitivity of polynomial-time many-one reductions Definition of complexity class NP –Nondeterministic computation –Problems.
The Theory of NP-Completeness
Computability and Complexity 20-1 Computability and Complexity Andrei Bulatov Class NL.
NP-complete and NP-hard problems
Analysis of Algorithms CS 477/677
Computability and Complexity 3-1 Turing Machine Computability and Complexity Andrei Bulatov.
Lecture 3 Graph Representation for Regular Expressions
1 Turing Machines. 2 A Turing Machine Tape Read-Write head Control Unit.
Programming & Data Structures
חישוביות וסיבוכיות Computability and Complexity Lecture 7 TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A AAAA.
Theory of Computing Lecture 15 MAS 714 Hartmut Klauck.
Ding-Zhu Du Office: ECSS 3-611, M 3:15-4:30 Lecture: ECSS 2.311, MW 12:30-1:45.
Week 10Complexity of Algorithms1 Hard Computational Problems Some computational problems are hard Despite a numerous attempts we do not know any efficient.
Lecture 6 NP Class. P = ? NP = ? PSPACE They are central problems in computational complexity.
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.
TU/e Algorithms (2IL15) – Lecture 9 1 NP-Completeness NOT AND OR AND NOT AND.
Theory of Computational Complexity Yuji Ishikawa Avis lab. M1.
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.
Modeling Arithmetic, Computation, and Languages Mathematical Structures for Computer Science Chapter 8 Copyright © 2006 W.H. Freeman & Co.MSCS SlidesTuring.
ICS 353: Design and Analysis of Algorithms NP-Complete Problems King Fahd University of Petroleum & Minerals Information & Computer Science Department.
Design and Analysis of Approximation Algorithms
Limitation of Computation Power – P, NP, and NP-complete
The NP class. NP-completeness
Chapter 10 NP-Complete Problems.
Turing’s Thesis Costas Busch - LSU.
Lecture 1-2 Time and Space of DTM
Lecture 2-2 NP Class.
Lecture 22 Complexity and Reductions
The Definition of Algorithm
Turing Machines Acceptors; Enumerators
Chapter 9 TURING MACHINES.
Lecture 5 NP Class.
ICS 353: Design and Analysis of Algorithms
Intro to Theory of Computation
Turing Machines (TM) Deterministic Turing Machine (DTM)
Space Complexity Costas Busch - LSU.
CLASSES P AND NP.
CS154, Lecture 13: P vs NP.
Part II Theory of Nondeterministic Computation
Recall last lecture and Nondeterministic TMs
Turing Machines Complexity ©D.Moshkovitz.
Umans Complexity Theory Lectures
CSE 589 Applied Algorithms Spring 1999
Teori Bahasa dan Automata Lecture 10: Push Down Automata
CS6382 Theory of Computation
Instructor: Aaron Roth
RAIK 283 Data Structures & Algorithms
Week 11 - Wednesday CS221.
Lecture 24 Vertex Cover and Hamiltonian Cycle
Lecture 1-2 Time and Space of DTM
Presentation transcript:

Part VI NP-Hardness

Lecture 23 What’s NP?

Hard Problems

Answer What is NP-complete? What is NP-hard? First, what is NP?

Answer 1 Wrong! Did you take computer science before ? NP means “Not Polynomial-time computable”. Wrong! Did you take computer science before ?

Answer 2 Still wrong! But, almost true. I can give you a counterexample!

Integer Programming

Decision version of Integer Programming

How to prove a decision problem belonging to NP? How to design a polynomial-time nondeterministic algorithm?

we need to study computation model-Turing Machine. To answer, we need to study computation model-Turing Machine.

Deterministic Turing Machine (DTM) Finite Control tape head

p h B e a l a The tape has the left end but infinite to the right. It is divided into cells. Each cell contains a symbol in an alphabet Γ. There exists a special symbol B which represents the empty cell.

a The head scans at a cell on the tape and can read, erase, and write a symbol on the cell. In each move, the head can move to the right cell or to the left cell (or stay in the same cell).

The finite control has finitely many states which form a set Q The finite control has finitely many states which form a set Q. For each move, the state is changed according to the evaluation of a transition function δ : Q x Γ → Q x Γ x {R, L}.

b a q p δ(q, a) = (p, b, L) means that if the head reads symbol a and the finite control is in the state q, then the next state should be p, the symbol a should be changed to b, and the head moves one cell to the left.

a b q p δ(q, a) = (p, b, R) means that if the head reads symbol a and the finite control is in the state q, then the next state should be p, the symbol a should be changed to b, and the head moves one cell to the right.

s There are some special states: an initial state s and an final states h. Initially, the DTM is in the initial state and the head scans the leftmost cell. The tape holds an input string.

Otherwise, the input string is rejected. x h When the DTM is in the final state, the DTM stops. An input string x is accepted by the DTM if the DTM reaches the final state h. Otherwise, the input string is rejected.

Multi-tape DTM Input tape (read only) Storage tapes Output tape (possibly, write only)

Nondeterministic Turing Machine (NTM) Finite Control tape head

p h B e a l a The tape has the left end but infinite to the right. It is divided into cells. Each cell contains a symbol in an alphabet Γ. There exists a special symbol B which represents the empty cell.

The finite control has finitely many states which form a set Q The finite control has finitely many states which form a set Q. For each move, the state is changed according to the evaluation of a transition function δ : Q x Γ → 2^{Q x Γ x {R, L}}.

Nondeterministic TM (NTM) There are multiple choices for each transition. For each input x, the NTM may have more than one computation paths. An input x is accepted if at least one computation path leads to the final state. L(M) is the set of all accepted inputs.

Time of DTM TimeM (x) = # of moves that DTM M takes on input x. TimeM(x) < infinity iff x ε L(M).

Space SpaceM(x) = maximum # of cells that M visits on each work (storage) tapes during the computation on input x. If M is a multitape DTM, then the work tapes do not include the input tape and the write-only output tape.

What’s P? P is a class of decision problems that each can be solved by deterministic TM in polynomial time.

What’s NP? NP is a class of decision problems that each can be solved by a nondeterministic TM in polynomial time. NP is a class of decision problems that each can be solved by a polynomial-time nondeterministic algorithm.

What’s PSPACE? PSPACE is a class of decision problems that each can be solved by TM in polynomial space. Why didn’t specify Deterministic or Nondeterministic? It doesn’t matter due to Savitch’s Theorem.

P = ? NP = ? PSPACE They are central problems in computational complexity.

If P = NP, then NP-complete P

Ladner Theorem If NP ≠ P, then there exists a set A lying -between P and NP-complete class, i.e., A is in NP, but not in P and not being NP-compete.

How to prove a decision problem belonging to NP? How to design a polynomial-time nondeterministic algorithm?

Hamiltonian Cycle Given a graph G, does G contain a Hamiltonian cycle? Hamiltonian cycle is a cycle passing every vertex exactly once.

Nondeterministic Algorithm Guess a permutation of all vertices. Check whether this permutation gives a cycle. If yes, then algorithm halts. What is the running time?

Guessing Time Each guess can choose one from a constant number of choices. This is because that in NTM, the number of choices for each move is independent from input size. Guessing a permutation of n vertices needs (n long n) time.

Minimum Spanning Tree Given an edge-weighted graph G, find a spanning tree with minimum total weight. Decision Version: Given an edge-weighted graph G and a positive integer k, does G contains a spanning tree with total weight < k.

Nondeterministic Algorithm Guess a spanning tree T. Check whether the total weight of T < k. This is not clear!

How to guess a spanning tree? Guess n-1 edges where n is the number of vertices of G. Check whether those n-1 edges form a connected spanning subgraph, i.e., there is a path between every pair of vertices.

Co-decision version of MST Given an edge-weighted graph G and a positive integer k, does G contain no spanning tree with total weight < k?

Algorithm Computer a minimum spanning tree. Check whether its weight < k. If yes, the algorithm halts.

co-NP co-NP = {A | Σ* - A ε NP}

NP ∩ co-NP So far, no natural problem has been found in NP ∩ co-NP, but not in P. NP co-NP P

Linear Programming Decision version: Given a system of linear inequality, does the system have a solution? It was first proved in NP ∩ co-NP and later found in P (1979).

Primality Test Given a natural number n, is n a prime? It was first proved in NP ∩ co-NP and later found in P (2004).

Therefore A natural problem belonging to NP ∩ co-NP is a big sign for the problem belonging to P.

Proving a problem in NP In many cases, it is not hard. In a few cases, it is not easy.

Polynomial-time verification with polynomial-size certificate

Integer Programming Decision version: Given A and b, does Ax > b contains an integer solution? The difficulty is that the domain of “guess” is too large, that is, it is not easy to know the existence of polynomial-size certificate.