Complexity Classes.

Slides:



Advertisements
Similar presentations
1 P, NP, and NP-Complete Dr. Ying Lu RAIK 283 Data Structures & Algorithms.
Advertisements

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,
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
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 
Great Theoretical Ideas in Computer Science for Some.
Computational problems, algorithms, runtime, hardness
Analysis of Algorithms CS 477/677
1 CSE 417: Algorithms and Computational Complexity Winter 2001 Lecture 22 Instructor: Paul Beame.
Complexity Theory: The P vs NP question Lecture 28 (Dec 4, 2007)
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
MCS312: NP-completeness and Approximation Algorithms
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.
NP Complexity By Mussie Araya. What is NP Complexity? Formal Definition: NP is the set of decision problems solvable in polynomial time by a non- deterministic.
CSE 326: Data Structures NP Completeness Ben Lerner Summer 2007.
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.
Week 10Complexity of Algorithms1 Hard Computational Problems Some computational problems are hard Despite a numerous attempts we do not know any efficient.
CSE 3813 Introduction to Formal Languages and Automata Chapter 14 An Introduction to Computational Complexity These class notes are based on material from.
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 Algorithm : Design & Analysis [23]
CPS Computational problems, algorithms, runtime, hardness (a ridiculously brief introduction to theoretical computer science) Vincent Conitzer.
CS6045: Advanced Algorithms NP Completeness. NP-Completeness Some problems are intractable: as they grow large, we are unable to solve them in reasonable.
NPC.
The Theory of NP-Completeness 1. Nondeterministic algorithms A nondeterminstic algorithm consists of phase 1: guessing phase 2: checking If the checking.
CSE 332: NP Completeness, Part II Richard Anderson Spring 2016.
PRIMES is in P Manindra Agrawal Neeraj Kayal Nitin Saxena Dept of CSE, IIT Kanpur.
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
Limitation of Computation Power – P, NP, and NP-complete
The NP class. NP-completeness
NP-Complete Problems.
P & NP.
Chapter 10 NP-Complete Problems.
Computational problems, algorithms, runtime, hardness
Richard Anderson Lectures NP-Completeness
Richard Anderson Lecture 26 NP-Completeness
Lecture 2-2 NP Class.
Great Theoretical Ideas in Computer Science
Richard Anderson Lecture 29 NP-Completeness and course wrap-up
Richard Anderson Lecture 26 NP-Completeness
Hard Problems Introduction to NP
Lecture 22 Complexity and Reductions
NP-Completeness Yin Tat Lee
Computability and Complexity
ICS 353: Design and Analysis of Algorithms
Richard Anderson Lecture 28 NP-Completeness
Section 14.3 Complexity Classes
Richard Anderson Lecture 30 NP-Completeness
NP-Complete Problems.
Chapter 34: NP-Completeness
CPS 173 Computational problems, algorithms, runtime, hardness
NP-Completeness Yin Tat Lee
CSE 6408 Advanced Algorithms.
P, NP and NP-Complete Problems
The Theory of NP-Completeness
CSE 589 Applied Algorithms Spring 1999
P, NP and NP-Complete Problems
The Polynomial Hierarchy Enumeration Problems 7.3.3
Instructor: Aaron Roth
Our old list of problems
RAIK 283 Data Structures & Algorithms
ADVANCED COMPUTATIONAL MODELS AND ALGORITHMS
Presentation transcript:

Complexity Classes

Definitions Algorithms that have a polynomial complexity are algorithms whose run time is (nd) for some positive integer d. Algorithms that have an exponential complexity are algorithms whose run time is (cn) for some constant c greater than 1. It is clear that as n grows large, the exponential complexity algorithms may become impractical. (i.e. It may take many years of continuous computation in order to find the correct answer).

Complexity Classes This will be an informal discussion of the basics of this terminology. Much of the terminology refers to decision problems. A decision problem can be described as a problem that requires a “yes” or “no” answer. The class P refers to the set of all decision problems for which polynomial-time algorithms exist. (P stands for polynomial)

There is a larger class of decision problems called NP There is a larger class of decision problems called NP. These problems have the property that, for any problem instance for which the answer is “yes”, there exists a proof that the answer is “yes” that can be verified by a polynomial-time algorithm. (NP stands for “non-deterministic polynomial”.) Note that we do not stipulate that here is any efficient method to find the given proof; we require only that a given hypothetical proof can be checked for validity by a polynomial-time algorithm.

It is not difficult to show that P  NP It is not difficult to show that P  NP. It seems likely that NP is a much larger class than P, but this is unproven at present. Example: Vertex Coloring of a graph G, with exactly k colors. This problem is a decision problem. An algorithm that “solves” it is required only to give the correct answer “yes” or “no”. Let us first observe that this problem is in the class NP. If the graph G does have a k-coloring, then the color itself can serve as the desired proof. To verify that a given color is in fact a k-coloring, it suffices to consider every edge of G and check to see if the two vertices have received different colors.

Although verifying that a given function color is a k-coloring is easy,it does not seem so easy to find color in the first place. Even if we fix k=3, then there is no known polynomial-time algorithm for this problem. (On the other hand, if k=2, then the resulting problem is in the class P. A graph G has a 2-coloring iff it is bipartite. IN fact, Vertex coloring is generally believed to be in the class NP\P. There is further evidence to support this conjecture, beyond the fact that no one has managed to find a polynomial-time algorithm to solve it. Vertex coloring turns out to be one of the so-called NP-complete problems. Another NP-complete problem is Hamiltonian Cycles.