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

Slides:



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

Reducibility Class of problems A can be reduced to the class of problems B Take any instance of problem A Show how you can construct an instance of problem.
What is Intractable? Some problems seem too hard to solve efficiently. Question 1: Does an efficient algorithm exist?  An O(a ) algorithm, where a > 1,
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.
NP-complete and NP-hard problems Transitivity of polynomial-time many-one reductions Concept of Completeness and hardness for a complexity class Definition.
Lecture 21 NP-complete problems
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 
© The McGraw-Hill Companies, Inc., Chapter 8 The Theory of NP-Completeness.
CSC5160 Topics in Algorithms Tutorial 2 Introduction to NP-Complete Problems Feb Jerry Le
Complexity 11-1 Complexity Andrei Bulatov NP-Completeness.
Complexity 15-1 Complexity Andrei Bulatov Hierarchy Theorem.
Graphs 4/16/2017 8:41 PM NP-Completeness.
Approximation Algorithms Lecture for CS 302. What is a NP problem? Given an instance of the problem, V, and a ‘certificate’, C, we can verify V is in.
Transitivity of  poly Theorem: Let ,  ’, and  ’’ be three decision problems such that   poly  ’ and  ’  poly  ’’. Then  poly  ’’. Proof:
The Theory of NP-Completeness
NP-Complete Problems Problems in Computer Science are classified into
1 CSE 417: Algorithms and Computational Complexity Winter 2001 Lecture 23 Instructor: Paul Beame.
Analysis of Algorithms CS 477/677
Chapter 11: Limitations of Algorithmic Power
Chapter 11 Limitations of Algorithm Power Copyright © 2007 Pearson Addison-Wesley. All rights reserved.
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.
Chapter 11 Limitations of Algorithm Power Copyright © 2007 Pearson Addison-Wesley. All rights reserved.
February 25, 2015CS21 Lecture 211 CS21 Decidability and Tractability Lecture 21 February 25, 2015.
P, NP, and NP-Complete Suzan Köknar-Tezel.
The Theory of NP-Completeness 1. Nondeterministic algorithms A nondeterminstic algorithm consists of phase 1: guessing phase 2: checking If the checking.
Programming & Data Structures
Chapter 11 Limitations of Algorithm Power. Lower Bounds Lower bound: an estimate on a minimum amount of work needed to solve a given problem Examples:
CSCE350 Algorithms and Data Structure
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.
Tonga Institute of Higher Education Design and Analysis of Algorithms IT 254 Lecture 8: Complexity Theory.
Prabhas Chongstitvatana1 NP-complete proofs The circuit satisfiability proof of NP- completeness relies on a direct proof that L  p CIRCUIT-SAT for every.
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.
1 Lower Bounds Lower bound: an estimate on a minimum amount of work needed to solve a given problem Examples: b number of comparisons needed to find the.
EMIS 8373: Integer Programming NP-Complete Problems updated 21 April 2009.
1 The Theory of NP-Completeness 2 Cook ’ s Theorem (1971) Prof. Cook Toronto U. Receiving Turing Award (1982) Discussing difficult problems: worst case.
Unit 9: Coping with NP-Completeness
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.
Instructor Neelima Gupta Table of Contents Class NP Class NPC Approximation Algorithms.
Design and Analysis of Algorithms - Chapter 101 Our old list of problems b Sorting b Searching b Shortest paths in a graph b Minimum spanning tree b Primality.
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-Algorithms Tractable vs Intractable Some problems are intractable: as they grow large, we are unable to solve them in reasonable time.
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.
Fundamentals of Informatics Lecture 14 Intractability and NP-completeness Bas Luttik.
LIMITATIONS OF ALGORITHM POWER
CS6045: Advanced Algorithms NP Completeness. NP-Completeness Some problems are intractable: as they grow large, we are unable to solve them in reasonable.
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?
Chapter 11 Introduction to Computational Complexity Copyright © 2011 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1.
NPC.
CSC 413/513: Intro to Algorithms
1 Ch 10 - NP-completeness Tractable and intractable problems Decision/Optimization problems Deterministic/NonDeterministic algorithms Classes P and NP.
CSE 421 Algorithms Richard Anderson Lecture 27 NP-Completeness Proofs.
COSC 3101A - Design and Analysis of Algorithms 14 NP-Completeness.
CSE 332: NP Completeness, Part II Richard Anderson Spring 2016.
ICS 353: Design and Analysis of Algorithms NP-Complete Problems King Fahd University of Petroleum & Minerals Information & Computer Science Department.
Richard Anderson Lecture 26 NP-Completeness
Lecture 2-2 NP Class.
Part VI NP-Hardness.
Lecture 5 NP Class.
Lecture 24 NP-Complete Problems
ICS 353: Design and Analysis of Algorithms
Our old list of problems
RAIK 283 Data Structures & Algorithms
Lecture 24 Vertex Cover and Hamiltonian Cycle
Presentation transcript:

Lecture 25 NP Class

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?

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.

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.

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.

Lecture 26 Polynomial-time many-one reduction

A < m B A set A in Σ* is said to be polynomial-time many-one reducible to B in Γ* if there exists a polynomial-time computable function f: Σ* → Γ* such that x ε A iff f(x) ε B. p

A = Hamiltonian cycle (HC) Given a graph G, does G contain a Hamiltonian cycle?

B = decision version of Traveling Salesman Problem (TSP) Given n cities and a distance table between these n cities, find a tour (starting from a city and come back to start point passing through each city exactly once) with minimum total length. Given n cities, a distance table and k > 0, does there exist a tour with total length < k?

HC < m TSP From a given graph G, we need to construct (n cities, a distance table, k). p

SAT < m 3-SAT SAT: Given a Boolean formula F, does F have a satisfied assignment? An assignment is satisfied if it makes F =1. 3-SAT: Given a 3-CNF F, does F have a satisfied assignment? p

Property of < m A < m B and B < m C imply A < m C A < m B and B ε P imply A ε P p p pp p

NP-complete A set A is NP-hard if for any B in NP, B < m A. A set A is NP-complete if it is in NP and NP-hard. A decision problem is NP-complete if its corresponding language is NP-complete. An optimization problem is NP-hard if its decision version is NP-hard. p

Cook Theorem SAT is NP-complete

3-SAT is NP-complete

HC is NP-complete

Vertex-Cover is NP-complete

Proof of Cook Theorem