“One ring to rule them all” Analogy (sort of) Lord of The Rings Computational Complexity “One problem to solve them all” “my preciousss…”

Slides:



Advertisements
Similar presentations
The Theory of NP-Completeness
Advertisements

1 NP-Complete Problems. 2 We discuss some hard problems:  how hard? (computational complexity)  what makes them hard?  any solutions? Definitions 
© The McGraw-Hill Companies, Inc., Chapter 8 The Theory of NP-Completeness.
Computability and Complexity 23-1 Computability and Complexity Andrei Bulatov Search and Optimization.
Transitivity of  poly Theorem: Let ,  ’, and  ’’ be three decision problems such that   poly  ’ and  ’  poly  ’’. Then  poly  ’’. Proof:
NP-Complete Problems Reading Material: Chapter 10 Sections 1, 2, 3, and 4 only.
1 Polynomial Time Reductions Polynomial Computable function : For any computes in polynomial time.
The Theory of NP-Completeness
NP-Complete Problems Problems in Computer Science are classified into
88- 1 Chapter 8 The Theory of NP-Completeness P: the class of problems which can be solved by a deterministic polynomial algorithm. NP : the class.
CSE 421 Algorithms Richard Anderson Lecture 27 NP Completeness.
Chapter 11: Limitations of Algorithmic Power
Chapter 11 Limitations of Algorithm Power Copyright © 2007 Pearson Addison-Wesley. All rights reserved.
Chapter 11 Limitations of Algorithm Power Copyright © 2007 Pearson Addison-Wesley. All rights reserved.
P, NP, and NP-Complete Suzan Köknar-Tezel.
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.
Themes of Presentations Rule-based systems/expert systems (Catie) Software Engineering (Khansiri) Fuzzy Logic (Mark) Configuration Systems (Sudhan) *
The Theory of NP-Completeness 1. Nondeterministic algorithms A nondeterminstic algorithm consists of phase 1: guessing phase 2: checking If the checking.
NP-Complete Problems CSC 331: Algorithm Analysis NP-Complete Problems.
The Theory of NP-Completeness 1. What is NP-completeness? Consider the circuit satisfiability problem Difficult to answer the decision problem in polynomial.
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
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.
Tonga Institute of Higher Education Design and Analysis of Algorithms IT 254 Lecture 8: Complexity Theory.
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.
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.
Unit 9: Coping with NP-Completeness
NP-Complete Problems. Running Time v.s. Input Size Concern with problems whose complexity may be described by exponential functions. Tractable problems.
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.
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]
NP-Completeness (Nondeterministic Polynomial Completeness) Sushanth Sivaram Vallath & Z. Joseph.
CS 3343: Analysis of Algorithms Lecture 25: P and NP Some slides courtesy of Carola Wenk.
David Evans CS200: Computer Science University of Virginia Computer Science Lecture 15: Intractable Problems (Smiley.
CS6045: Advanced Algorithms NP Completeness. NP-Completeness Some problems are intractable: as they grow large, we are unable to solve them in reasonable.
NPC.
CSC 413/513: Intro to Algorithms
Young CS 331 D&A of Algo. NP-Completeness1 NP-Completeness Reference: Computers and Intractability: A Guide to the Theory of NP-Completeness by Garey and.
1 Ch 10 - NP-completeness Tractable and intractable problems Decision/Optimization problems Deterministic/NonDeterministic algorithms Classes P and NP.
CSCI 2670 Introduction to Theory of Computing December 2, 2004.
CSCI 2670 Introduction to Theory of Computing December 7, 2005.
CSE 421 Algorithms Richard Anderson Lecture 27 NP-Completeness Proofs.
The Theory of NP-Completeness 1. Nondeterministic algorithms A nondeterminstic algorithm consists of phase 1: guessing phase 2: checking If the checking.
COSC 3101A - Design and Analysis of Algorithms 14 NP-Completeness.
P, NP, and NP-Complete Problems Section 10.3 The class P consists of all problems that can be solved in polynomial time, O(N k ), by deterministic computers.
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.
The NP class. NP-completeness Lecture2. The NP-class The NP class is a class that contains all the problems that can be decided by a Non-Deterministic.
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
NP-Completeness A problem is NP-complete if: It is in NP
Chapter 10 NP-Complete Problems.
Richard Anderson Lectures NP-Completeness
Richard Anderson Lecture 26 NP-Completeness
Richard Anderson Lecture 26 NP-Completeness
Hard Problems Introduction to NP
Lecture 24 NP-Complete Problems
ICS 353: Design and Analysis of Algorithms
Richard Anderson Lecture 25 NP-Completeness
Computational Complexity
Richard Anderson Lecture 28 NP-Completeness
NP-Complete Problems.
CS 3343: Analysis of Algorithms
The Theory of NP-Completeness
CSC 380: Design and Analysis of Algorithms
Our old list of problems
Presentation transcript:

“One ring to rule them all” Analogy (sort of) Lord of The Rings Computational Complexity “One problem to solve them all” “my preciousss…”

NP Complexity The class NP consists of all problems that can be solved in polynomial time by nondeterministic algorithms Nondeterministic algorithms are done in two phases: Phase I: algorithm that makes a guess (solutions must be included among the possible guesses) Phase II: algorithm that checks if the guess is an actual solution or not

The Traveling Salesperson Problem (TSP) Given the cities and cost to travel between cities, obtain a route R such that: 1.All cities are in R 2.Every city is visited only once in R 3.R has the minimum cost. That is, for any other route R’ meeting 1-2, cost(R’)  cost(R).

Example: Traveling Salesman Problem (TSP) is in NP A C B D F G E H

Proof We can show that Traveling Salesman Problem (TSP) is in NP phaseI(G: Graph) //input: G a graph with n nodes //output: C a guess for TSP v  randomNode(G) C  () While random(0,1) = 1 and |C| < n do { w  PickNeighbourRandomly(v) C  C + (v,w) v  w } return C phaseII(C: path, min: int ) //input: C a guessed solution //output: true iff C is a TSP If |C| < n then return false Visited  {} for i =1 to n do { (u,v) = C[i] if v in Visited then return false else Visited  Visited + {v} } return cost(C) = min

Why do We Care About NP Problems? Network Problems Traveling Salesperson Longest path Graph coloring Data Storage Minimum Bin Packing Scheduling Minimum Job Scheduling Minimum Multiprocessor Scheduling Mathematical Programming Knapsack

Why do We Care About NP Problems? (II) Automata Theory (computing) Longest computation Shortest computation All of these problems have 4 things in common: Planning Find a Universal Problem Solver They are important for a group of people No knows (for sure) if they are in P or not All of them are in NP They all are in a special category of NP problems: NP- Complete problems

NP-Complete A problem npc is NP-complete if: npc is in NP Every other problem prob in NP can be transformed in polynomial time into npc. (NP-Hard) Reduction: npc prob Polynomial transformation solution

NP-Complete npc MSTTSP Shortest Path Sorting … Knapsack 1.If we can find one NP-complete problem the can be solved in polynomial time then P = NP 2.If we can show for one NP-complete problem that it cannot be solved in polynomial time then no other NP-complete problem can be solved in polynomial time (and P ≠NP) “my preciousss…”

Fine, But How Do one Proof that a Problem is NP-Complete? First problem was hard to proof: Conjunctive Normal Form (Cook, 1971) Every problem q afterwards is “easier”:  Show that q is in NP  Find a problem, npc, that is NP-complete and show that npc can be transformed in polynomial time into q npc MSTTSP Shortest Path Sorting … Knapsack q

Conjunctive Normal Form A conjunctive normal form (CNF) is a Boolean expression consisting of one or more disjunctive formulas connected by an AND symbol (  ). A disjunctive formula is a collection of one or more (positive and negative) literals connected by an OR symbol (  ). Example: (a)  (¬ a  ¬b  c  d)  (¬c  ¬d)  (¬d) Problem (CNF-satisfaction): Give an algorithm that receives as input a CNF form and returns Boolean assignments for each literal in form such that form is true Example (above): a  true, b  false, c  true, d  false

Cook Theorem (1971) The CNF-satisfaction satisfaction is NP-complete