Limitation of Computation Power – P, NP, and NP-complete

Slides:



Advertisements
Similar presentations
Analysis of Algorithms
Advertisements

P, NP, NP-Complete Problems
1 P, NP, and NP-Complete Dr. Ying Lu RAIK 283 Data Structures & Algorithms.
Chapter 11 Limitations of Algorithm Power Copyright © 2007 Pearson Addison-Wesley. All rights reserved.
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,
The Theory of NP-Completeness
CPE702 Complexity Classes Pruet Boonma Department of Computer Engineering Chiang Mai University Based on Material by Jenny Walter.
Computability and Complexity 23-1 Computability and Complexity Andrei Bulatov Search and Optimization.
Design and Analysis of Algorithms - Chapter 31 Brute Force A straightforward approach usually based on problem statement and definitions Examples: 1. Computing.
NP-Complete Problems Reading Material: Chapter 10 Sections 1, 2, 3, and 4 only.
The Theory of NP-Completeness
NP-Complete Problems Problems in Computer Science are classified into
Design and Analysis of Algorithms - Chapter 31 Brute Force A straightforward approach usually based on problem statement and definitions Examples: 1. Computing.
Analysis of Algorithms CS 477/677
CSE 421 Algorithms Richard Anderson Lecture 27 NP Completeness.
Homework page 102 questions 1, 4, and 10 page 106 questions 4 and 5 page 111 question 1 page 119 question 9.
Chapter 11 Limitations of Algorithm Power Copyright © 2007 Pearson Addison-Wesley. All rights reserved.
1 The Theory of NP-Completeness 2 NP P NPC NP: Non-deterministic Polynomial P: Polynomial NPC: Non-deterministic Polynomial Complete P=NP? X = P.
The Theory of NP-Completeness 1. Nondeterministic algorithms A nondeterminstic algorithm consists of phase 1: guessing phase 2: checking If the checking.
The Theory of NP-Completeness 1. What is NP-completeness? Consider the circuit satisfiability problem Difficult to answer the decision problem in polynomial.
MCS312: NP-completeness and Approximation Algorithms
CSCE350 Algorithms and Data Structure
Computational Complexity Polynomial time O(n k ) input size n, k constant Tractable problems solvable in polynomial time(Opposite Intractable) Ex: sorting,
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.
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.
TECH Computer Science NP-Complete Problems Problems  Abstract Problems  Decision Problem, Optimal value, Optimal solution  Encodings  //Data Structure.
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.
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.
1 The Theory of NP-Completeness 2 Cook ’ s Theorem (1971) Prof. Cook Toronto U. Receiving Turing Award (1982) Discussing difficult problems: worst case.
NP-Complete Problems. Running Time v.s. Input Size Concern with problems whose complexity may be described by exponential functions. Tractable problems.
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.
NP-Complete Problems Algorithm : Design & Analysis [23]
Limits to Computation How do you analyze a new algorithm? –Put it in the form of existing algorithms that you know the analysis. –For example, given 2.
CS 3343: Analysis of Algorithms Lecture 25: P and NP Some slides courtesy of Carola Wenk.
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.
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 7 Jianjun Hu Department of Computer Science and Engineering University of South Carolina CSCE350 Algorithms and Data Structure.
Lecture 25 NP Class. P = ? NP = ? PSPACE They are central problems in computational complexity.
NPC.
1 Ch 10 - NP-completeness Tractable and intractable problems Decision/Optimization problems Deterministic/NonDeterministic algorithms Classes P and NP.
The Theory of NP-Completeness 1. Nondeterministic algorithms A nondeterminstic algorithm consists of phase 1: guessing phase 2: checking If the checking.
Chapter 3 Brute Force Copyright © 2007 Pearson Addison-Wesley. All rights reserved.
COSC 3101A - Design and Analysis of Algorithms 14 NP-Completeness.
1 P and NP. 2 Introduction The Traveling Salesperson problem and thousands of other problems are equally hard in the sense that if we had an efficient.
Algorithm Complexity By: Ashish Patel and Alex Golebiewski.
1 The Theory of NP-Completeness 2 Review: Finding lower bound by problem transformation Problem X reduces to problem Y (X  Y ) iff X can be solved by.
Ch3 /Lecture #4 Brute Force and Exhaustive Search 1.
Exhaustive search Exhaustive search is simply a brute- force approach to combinatorial problems. It suggests generating each and every element of the problem.
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
Chapter 10 NP-Complete Problems.
Richard Anderson Lectures NP-Completeness
Lecture 2-2 NP Class.
Hard Problems Introduction to NP
Lecture 5 NP Class.
ICS 353: Design and Analysis of Algorithms
Richard Anderson Lecture 28 NP-Completeness
Approximation Algorithms
Richard Anderson Lecture 30 NP-Completeness
P, NP and NP-Complete Problems
The Theory of NP-Completeness
P, NP and NP-Complete Problems
Our old list of problems
Hamiltonian Circuit (HC) problem
Presentation transcript:

Limitation of Computation Power – P, NP, and NP-complete Class P Definition 1 Class P is a class of decision problems that can be solved in polynomial time by (deterministic) algorithms. This class of problems is called polynomial. Class NP There is a large number of important problems, for which no polynomial-time algorithm has been found, nor has the impossibility of such an algorithm has been proved. Some samples are: Knapsack problem Find the most valuable subset of n items of given positive integer weights and values that fit into a knapsack of a given positive integer capacity.

Hamiltonian circuit Determine whether a given graph as a Hamiltonian circuit (a path that starts and ends at the same vertex and passes through all the other vertices exactly once). Traveling salesman Find the shortest tour through n cities with known positive integer distances between them. Graph coloring For a given graph, find its chromatic number (the smallest number of colors that need to be assigned to the graph’s vertices so that no two adjacent vertices are assigned the same color).

Example of Traveling sales man problem Given a graph G, find the shortest simple circuit (Hamiltonian circuit) in G which passes through all the vertices. Tour length abcda 18 abdca 11 … Totally there are P(4,4)=4! tours. a c d b 2 3 1 5 8 7 Generally, there may have n! tours in a graph of n vertices and if we check all the tours the computing time is O(n!). People couldn’t find a good algorithm (using polynomial time) to solve it!

Example of Knapsack problem knapsack: W=10 item 1: w=7, v=$42 item 2: w=3, v=$12, item 3: w=4, v= $40, item 4: w=5, v=$25 People couldn’t find a good algorithm (using polynomial time) to solve it !

Definition 2 A nondeterministic algorithm is a two-stage procedure that takes as its input an instance I of a decision problem and does the following. Nondeterministic (“guess”) stage: generate a candidate solution S to the given instance I. Deterministic (“verification”) stage: A deterministic algorithm takes both I and S as its input, and it outputs yes if S is a solution to instance I. Definition 3 Class NP is the class of decision problems that that can be solved by nondeterministic polynomial algorithms. This class of problems is called nondeterministic polynomial. Famous Problem: P = NP ?

Class NP-complete Definition 3 A decision problem D1 is said to be polynomially reducible to a decision problem D2 if there exists a function t that transforms instances of D1 to instances of D2 such that t maps all yes instances of D1 to yes instances of D2 and no instances of D1 to no instances of D2; t is computable by a polynomial-time algorithm. If a problem D1 polynomially reducible to some problem D2 that can be solved in polynomial time, then problem D1 can also be solved in polynomial time. Definition 4 A decision problem D is said to be NP-complete if It belongs to class NP; Every problem in NP is polynomially reducible to D.

Class P Class P-complete Class NP