NP-Complete Problems.

Slides:



Advertisements
Similar presentations
Analysis of Algorithms
Advertisements

P, NP, NP-Complete Problems
NP-Complete Problems CIT 596, Spring Problems that Cross the Line What if a problem has: o An exponential upper bound o A polynomial lower bound.
NP-Hard Nattee Niparnan.
Polynomial-time reductions We have seen several reductions:
CPE702 Complexity Classes Pruet Boonma Department of Computer Engineering Chiang Mai University Based on Material by Jenny Walter.
1 NP-Complete Problems. 2 We discuss some hard problems:  how hard? (computational complexity)  what makes them hard?  any solutions? Definitions 
NP-Complete Problems Reading Material: Chapter 10 Sections 1, 2, 3, and 4 only.
The Theory of NP-Completeness
Analysis of Algorithms CS 477/677
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.
1 CSE 417: Algorithms and Computational Complexity Winter 2001 Lecture 22 Instructor: Paul Beame.
Programming & Data Structures
Computational Complexity Polynomial time O(n k ) input size n, k constant Tractable problems solvable in polynomial time(Opposite Intractable) Ex: sorting,
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.
Lecture 30. P, NP and NP Complete Problems 1. Recap Data compression is a technique to compress the data represented either in text, audio or image form.
CSC 413/513: Intro to Algorithms NP Completeness.
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.
CSCI 3160 Design and Analysis of Algorithms Tutorial 10 Chengyu Lin.
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.
NP-COMPLETE PROBLEMS. Admin  Two more assignments…  No office hours on tomorrow.
NP-Complete problems.
Fundamentals of Informatics Lecture 14 Intractability and NP-completeness Bas Luttik.
CS6045: Advanced Algorithms NP Completeness. NP-Completeness Some problems are intractable: as they grow large, we are unable to solve them in reasonable.
CS216: Program and Data Representation University of Virginia Computer Science Spring 2006 David Evans Lecture 8: Crash Course in Computational Complexity.
COSC 3101A - Design and Analysis of Algorithms 14 NP-Completeness.
CSC 172 P, NP, Etc.
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
NP-Completeness A problem is NP-complete if: It is in NP
Limitation of Computation Power – P, NP, and NP-complete
Complexity Classes.
The NP class. NP-completeness
NP-completeness Ch.34.
P & NP.
Chapter 10 NP-Complete Problems.
Computational problems, algorithms, runtime, hardness
Richard Anderson Lectures NP-Completeness
Richard Anderson Lecture 26 NP-Completeness
Advanced Algorithms Analysis and Design
Decision trees Polynomial-Time
Richard Anderson Lecture 26 NP-Completeness
Lecture 22 Complexity and Reductions
ICS 353: Design and Analysis of Algorithms
Intro to NP Completeness
Richard Anderson Lecture 25 NP-Completeness
Computational Complexity
Approximation Algorithms
Computation Basics & NP-Completeness
Halting Problem.
NP-Complete Problems.
Chapter 34: NP-Completeness
Richard Anderson Lecture 27 NP Completeness
NP-completeness The Chinese University of Hong Kong Fall 2008
CPS 173 Computational problems, algorithms, runtime, hardness
CS 3343: Analysis of Algorithms
NP-Completeness Yin Tat Lee
NP-Completeness Reference: Computers and Intractability: A Guide to the Theory of NP-Completeness by Garey and Johnson, W.H. Freeman and Company, 1979.
P, NP and NP-Complete Problems
The Theory of NP-Completeness
CSE 589 Applied Algorithms Spring 1999
P, NP and NP-Complete Problems
A Few Sample Reductions
Richard Anderson Lecture 25 NP Completeness
Instructor: Aaron Roth
RAIK 283 Data Structures & Algorithms
ADVANCED COMPUTATIONAL MODELS AND ALGORITHMS
Lecture 22 Complexity and Reductions
Presentation transcript:

NP-Complete Problems

NP and P What is NP? NP is the set of all decision problems (question with yes-or-no answer) for which the 'yes'-answers can be verified in polynomial time (O(n^k) where n is the problem size, and k is a constant) by a deterministic Turing machine. Polynomial time is sometimes used as the definition of fast or quickly. What is P? P is the set of all decision problems which can be solved in polynomial time by a deterministic Turing machine. Since it can solve in polynomial time, it can also be verified in polynomial time. Therefore P is a subset of NP.

Class of “P” Problems Class P consists of (decision) problems that are solvable in polynomial time Polynomial-time algorithms Worst-case running time is O(nk), for some constant k Examples of polynomial time: O(n2), O(n3), O(1), O(n lg n) Examples of non-polynomial time: O(2n), O(nn), O(n!)

Class of “NP” Problems Class NP consists of problems that could be solved by NP algorithms i.e., verifiable in polynomial time If we were given a “certificate” of a solution, we could verify that the certificate is correct in time polynomial to the size of the input Warning: NP does not mean “non-polynomial”

NP-Complete What is NP-Complete? A problem x that is in NP is also in NP-Complete if and only if every other problem in NP can be quickly (ie. in polynomial time) transformed into x. In other words: x is in NP, and Every problem in NP is reducible to x So what makes NP-Complete so interesting is that if any one of the NP-Complete problems was to be solved quickly then all NP problems can be solved quickly

NP-Hard What is NP-Hard? NP-Hard are problems that are at least as hard as the hardest problems in NP. Note that NP-Complete problems are also NP-hard. However not all NP-hard problems are NP (or even a decision problem), despite having 'NP' as a prefix. That is the NP in NP-hard does not mean 'non-deterministic polynomial time'. Yes this is confusing but its usage is entrenched and unlikely to change.

Tractable/Intractable Problems Problems in P are also called tractable Problems not in P are intractable or unsolvable Can be solved in reasonable time only for small inputs Or, can not be solved at all Are non-polynomial algorithms always worst than polynomial algorithms? - n1,000,000 is technically tractable, but really impossible - nlog log log n is technically intractable, but easy

Reductions Reduction is a way of saying that one problem is “easier” than another. We say that problem A is easier than problem B, (i.e., we write “A  B”) if we can solve A using the algorithm that solves B. Idea: transform the inputs of A to inputs of B f Problem B   yes no Problem A

Polynomial Reductions Given two problems A, B, we say that A is polynomially reducible to B (A p B) if: There exists a function f that converts the input of A to inputs of B in polynomial time A(i) = YES  B(f(i)) = YES

NP-Complete Problems

Traveling Salesman

5-Clique

Hamiltonian Path

Map Coloring

Vertex Cover (VC) Given a graph and an integer k, is there a collection of k vertices such that each edge is connected to one of the vertices in the collection?