Lecture 2-2 NP Class.

Slides:



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

1 P, NP, and NP-Complete Dr. Ying Lu RAIK 283 Data Structures & Algorithms.
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.
1 NP-Complete Problems. 2 We discuss some hard problems:  how hard? (computational complexity)  what makes them hard?  any solutions? Definitions 
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.
The Theory of NP-Completeness
NP-Complete Problems Problems in Computer Science are classified into
Chapter 11 Limitations of Algorithm Power Copyright © 2007 Pearson Addison-Wesley. All rights reserved.
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
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.
Unit 9: Coping with NP-Completeness
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.
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.
CS 3343: Analysis of Algorithms Lecture 25: P and NP Some slides courtesy of Carola Wenk.
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.
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.
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.
The Theory of NP-Completeness
Limitation of Computation Power – P, NP, and NP-complete
More NP-Complete and NP-hard Problems
More NP-complete problems
NP-completeness Ch.34.
Richard Anderson Lectures NP-Completeness
Richard Anderson Lecture 26 NP-Completeness
Part VI NP-Hardness.
NP-Completeness (2) NP-Completeness Graphs 7/23/ :02 PM x x x x
NP-Completeness Proofs
Richard Anderson Lecture 26 NP-Completeness
Hard Problems Introduction to NP
P and NP CISC4080, Computer Algorithms CIS, Fordham Univ.
Lecture 5 NP Class.
Lecture 24 NP-Complete Problems
ICS 353: Design and Analysis of Algorithms
Richard Anderson Lecture 25 NP-Completeness
Richard Anderson Lecture 28 NP-Completeness
Richard Anderson Lecture 29 NP-Completeness
Chapter 34: NP-Completeness
Richard Anderson Lecture 30 NP-Completeness
Chapter 11 Limitations of Algorithm Power
NP-Complete Problems.
Prabhas Chongstitvatana
Richard Anderson Lecture 26 NP-Completeness
P, NP and NP-Complete Problems
No Guarantee Unless P equals NP
The Theory of NP-Completeness
CSE 589 Applied Algorithms Spring 1999
P, NP and NP-Complete Problems
Lecture 24 Classical NP-hard Problems
Our old list of problems
RAIK 283 Data Structures & Algorithms
ADVANCED COMPUTATIONAL MODELS AND ALGORITHMS
Lecture 24 Vertex Cover and Hamiltonian Cycle
Presentation transcript:

Lecture 2-2 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.

Is it true that a problem belongs to NP iff its solution can be polynomial-time checkable ? Answer: No!

Integer Programming

Decision version of Integer Programming

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.

Post office

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. 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.

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.

Polynomial-time many-one reduction

A < m B p 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.

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 p From a given graph G, we need to construct (n cities, a distance table, k).

3-SAT < m SAT p 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?

Boolean Algebra

Boolean Algebra

3CNF

Examples

SAT < m 3-SAT p 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?

Examples Not a polynomial-time reduction!!!

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 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

Characterization of NP

Thanks, end