We think you have liked this presentation. If you wish to download it, please recommend it to your friends in any social system. Share buttons are a little bit lower. Thank you!
Presentation is loading. Please wait.
Published byBobby Garretson
Modified about 1 year ago
CPE702 Complexity Classes Pruet Boonma Department of Computer Engineering Chiang Mai University Based on Material by Jenny Walter
2 © 2004 Goodrich, Tamassia Complexity Classes 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 n, then the worst-case running time is O(n c ) for constant c. problems in P are considered “tractable” (if not in P, then not tractable)
3 © 2004 Goodrich, Tamassia Some Examples of P and Non-P Problems Single-source shortest path problem in a directed graph, even with negative edge weights, is in P (i.e., O(VE) time) Finding the longest simple path between two nodes is Non-P because exhaustive search is “superpolynomial time”. Even finding whether a graph has a simple path of length n is “intractable”. An Euler tour of a connected, directed graph is a cycle that traverses each edge of G exactly once, although it may visit a vertex more than once. We can determine whether a graph has an Euler tour and find the edges of such a tour in O(E) time. A hamiltonian cycle of a directed graph is a simple cycle that contains each vertex in V (each vertex only once). Determining whether a directed graph has a hamiltonian cycle is a Non-P problem.
4 © 2004 Goodrich, Tamassia Complexity Classes The class NP: class of problems with solutions that can be verified in time that is polynomial in the size of the input. Imagine we are given a “certificate” of a solution (really a potential solution) of a problem. Then the problem is in NP if we can verify that the certificate is a valid solution in polynomial time. Relies on the fact that checking a solution is easier than computing it (e.g., check that a list is sorted, rather than sorting it.)
5 © 2004 Goodrich, Tamassia NP-Completeness The class NP-Complete (NPC): class of the “hardest” problems in NP. this class has property that if any NPC problem can be solved in polynomial time (p-time), then all problems in NP could be solved in p-time. actual status of NPC problems is unknown -No p-time algorithms have been discovered for any NPC problem - No one has been able to prove that no p-time algorithm can exist for any of them Informally, a problem is in NPC if it is in NP and is as “hard” as any problem in NP. we will use reductions, to grow our set of NPC problems from one initial problem.
6 © 2004 Goodrich, Tamassia P, NP, NPC...how are they related? Any problem in P is also in NP, since if a problem is in P then we can solve it in polynomial-time without even being given a certificate. So P NP. By definition, NPC NP
7 © 2004 Goodrich, Tamassia P, NP, NPC...how are they related? Is NP P ??? open problem, but intuition says no probably the most famous open problem in CS seems plausible that the ability to guess and verify a solution in p-time is more powerful than computing a solution from scratch (deterministic p-time) so...we think P ≠ NP, but no one has proven it one way or the other (despite enormous effort). Note: It is known that if P ≠ NP, there must exist NP problems that neither are in P nor are NPC
8 © 2004 Goodrich, Tamassia P, NP, NPC...why do we care? So...why do we care to know whether a problem is NP-Complete? if it is, then finding a p-time algorithm to solve it is unlikely. better to spend your time looking for: oan efficient approximation algorithm to find solution close to optimal oheuristics that give correct answer with high probability
9 © 2004 Goodrich, Tamassia P, NP, NPC...why do we care? The set of "hardest" problems, the NPC problems, includes many problems of importance in science, engineering, operations research, and business, e.g.: traveling salesman bin packing knapsack problem vertex cover (graph coloring) integer linear programming etc…
Analysis of Algorithms NP & NP-Complete Prof. Muhammad Saeed.
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.
P, NP, NP-Complete Problems. Polynomial Problems (P Family) The set of problems that can be solved in polynomial time These problems form the P family.
1 P, NP, and NP-Complete Dr. Ying Lu RAIK 283 Data Structures & Algorithms.
NP-Complete Introduction to Algorithms NP-Complete CSE 680 Prof. Roger Crawfis.
NP-Complete Proof of correctness; More reductions.
Nattee Niparnan. Easy & Hard Problem What is “difficulty” of problem? Difficult for computer scientist to derive algorithm for the problem? Difficult.
Problems and Their Classes Solved many problems using different algorithms For each problem - algorithm and computing time Problem classes based on computing.
Algorithm Analysis. Assignment #8 Submit in PDF format ONLY !!! Assignment will NOT be accepted in format other than pdf. See and blackboard announcements.
Computational Complexity. Problem complexity vs. algorithmic complexity Upper bounds vs. lower bounds Exact solutions vs. approximate solutions Deterministic.
NP-hard problems and Approximation algorithms1 Lectures on NP-hard problems and Approximation algorithms COMP 523: Advanced Algorithmic Techniques Lecturer:
Computational Complexity Dr. Colin Campbell Course: EMAT20531.
CSE 211 Discrete Mathematics Chapter 8.4 Connectivity.
CS4018 Formal Models of Computation weeks Computability and Complexity Kees van Deemter (partly based on lecture notes by Dirk Nikodem)
NP-Completeness. Decision Problems Given Some Universal Set X, Let R be a subset of X. The decision problem for R is: Given an arbitrary element a of.
Complexity Classes: P and NP CS 130 Theory of Computation HMU Textbook: Chap 10.
Input sizeTime I1I1 T1T1 I2I2 T2T2 …… Algorithm Analysis We want to quantify the behavior of an algorithm. Useful to compare efficiency of two algorithms.
Time Complexity P vs NP. Consider a deterministic Turing Machine which decides a language.
What is Computer Science About? Part 2: Algorithms.
Turing Machines January 2003 Part 2:. 2 TM Recap We have seen how an abstract TM can be built to implement any computable algorithm TM has components:
Hard Problems Some problems are hard to solve. No polynomial time algorithm is known Most combinatorial optimization problems are hard Popular NP-hard.
CS 336 March 19, 2012 Tandy Warnow. Basic Graph Terminology Nodes, vertices, edges, degrees, paths, cycles, connected components, adjacency, isolated.
David Evans CS200: Computer Science University of Virginia Computer Science Class 38: Intractable Problems (Smiley Puzzles.
BQP PSPACE NP P PostBQP Limits on Efficient Computation in the Physical World Scott Aaronson MIT.
Facility Location Lindsey Bleimes Charlie Garrod Adam Meyerson.
Complexity ©D.Moshkovitz 1 Reductions. Complexity ©D.Moshkovitz 2 Motivation Reductions are our main tool for comparison between problems.
On the Complexity of Scheduling Peter Brucker University of Osnabrueck Germany.
Great Theoretical Ideas in Computer Science.
1 NP-Completeness Zeph Grunschlag. 2 Announcement HW9 Due Now HW Amnesty I’ll drop your lowest hw score.
1 Introduction to Algorithms 6.046J/18.401J/SMA5503 Lecture 18 Prof. Erik Demaine.
© 2016 SlidePlayer.com Inc. All rights reserved.