COSE215: Theory of Computation. Lecture 21 P, NP, and NP-Complete Problems

Similar documents
COSE215: Theory of Computation. Lecture 20 P, NP, and NP-Complete Problems

Intractable Problems [HMU06,Chp.10a]

Tractability. Some problems are intractable: as they grow large, we are unable to solve them in reasonable time What constitutes reasonable time?

ECS 120 Lesson 24 The Class N P, N P-complete Problems

Introduction to Complexity Theory

Artificial Intelligence. 3 Problem Complexity. Prof. Dr. Jana Koehler Fall 2016 HSLU - JK

P vs NP & Computational Complexity

Problems, and How Computer Scientists Solve Them Manas Thakur

Lecture 25: Cook s Theorem (1997) Steven Skiena. skiena

Intractable Problems. Time-Bounded Turing Machines Classes P and NP Polynomial-Time Reductions

CS154, Lecture 17: conp, Oracles again, Space Complexity

NP-Completeness. Until now we have been designing algorithms for specific problems

Computability and Complexity CISC462, Fall 2018, Space complexity 1

Review of unsolvability

Analysis of Algorithms. Unit 5 - Intractable Problems

NP Complete Problems. COMP 215 Lecture 20

Turing Machines and Time Complexity

BBM402-Lecture 11: The Class NP

CSC 1700 Analysis of Algorithms: P and NP Problems

Computational Complexity

The P-vs-NP problem. Andrés E. Caicedo. September 10, 2011

Space Complexity. The space complexity of a program is how much memory it uses.

Lecture 17: Cook-Levin Theorem, NP-Complete Problems

NP-Completeness. CptS 223 Advanced Data Structures. Larry Holder School of Electrical Engineering and Computer Science Washington State University

Limitations of Algorithm Power

Theory of Computation

Computational Models Lecture 11, Spring 2009

NP-Completeness and Boolean Satisfiability

P,NP, NP-Hard and NP-Complete

Computability Theory

CSE 3500 Algorithms and Complexity Fall 2016 Lecture 25: November 29, 2016

COMPLEXITY THEORY. Lecture 17: The Polynomial Hierarchy. TU Dresden, 19th Dec Markus Krötzsch Knowledge-Based Systems

P = k T IME(n k ) Now, do all decidable languages belong to P? Let s consider a couple of languages:

Definition: conp = { L L NP } What does a conp computation look like?

CSE 135: Introduction to Theory of Computation NP-completeness

Tractable & Intractable Problems

Design and Analysis of Algorithms

Harvard CS 121 and CSCI E-121 Lecture 22: The P vs. NP Question and NP-completeness

Theory of Computation CS3102 Spring 2014 A tale of computers, math, problem solving, life, love and tragic death

Comparison of several polynomial and exponential time complexity functions. Size n

CMSC 441: Algorithms. NP Completeness

Polynomial time reduction and NP-completeness. Exploring some time complexity limits of polynomial time algorithmic solutions

NP Completeness and Approximation Algorithms

Computational Complexity and Intractability: An Introduction to the Theory of NP. Chapter 9

SAT, NP, NP-Completeness

CS Lecture 29 P, NP, and NP-Completeness. k ) for all k. Fall The class P. The class NP

conp, Oracles, Space Complexity

CSE 105 THEORY OF COMPUTATION. Spring 2018 review class

DAA 8 TH UNIT DETAILS

NP and NP Completeness

Friday Four Square! Today at 4:15PM, Outside Gates

Easy Problems vs. Hard Problems. CSE 421 Introduction to Algorithms Winter Is P a good definition of efficient? The class P

Chapter 7: Time Complexity

Computer Science 385 Analysis of Algorithms Siena College Spring Topic Notes: Limitations of Algorithms

NP, polynomial-time mapping reductions, and NP-completeness

In complexity theory, algorithms and problems are classified by the growth order of computation time as a function of instance size.

Computational Complexity

CS154, Lecture 13: P vs NP

Problems and Solutions. Decidability and Complexity

CP405 Theory of Computation

Spring Lecture 21 NP-Complete Problems

Complexity: moving from qualitative to quantitative considerations

Complexity Theory. Knowledge Representation and Reasoning. November 2, 2005

Intro to Theory of Computation

CS Lecture 28 P, NP, and NP-Completeness. Fall 2008

Final Exam Comments. UVa - cs302: Theory of Computation Spring < Total

Theory of Computation CS3102 Spring 2015 A tale of computers, math, problem solving, life, love and tragic death

CS154, Lecture 15: Cook-Levin Theorem SAT, 3SAT

Lecture 8: Alternatation. 1 Alternate Characterizations of the Polynomial Hierarchy

Data Structures and Algorithms

The P versus NP Problem. Dean Casalena University of Cape Town CSLDEA001

arxiv: v1 [cs.cc] 28 Apr 2015

CS154, Lecture 13: P vs NP

CSC 8301 Design & Analysis of Algorithms: Lower Bounds

Summer School on Introduction to Algorithms and Optimization Techniques July 4-12, 2017 Organized by ACMU, ISI and IEEE CEDA.

Data Structures in Java

Complexity Theory. Jörg Kreiker. Summer term Chair for Theoretical Computer Science Prof. Esparza TU München

Computability and Complexity

NP-Completeness. NP-Completeness 1

CSCE 551 Final Exam, Spring 2004 Answer Key

Quantum Complexity Theory. Wim van Dam HP Labs MSRI UC Berkeley SQUINT 3 June 16, 2003

Complexity, P and NP

Exam Computability and Complexity

The Class NP. NP is the problems that can be solved in polynomial time by a nondeterministic machine.

NP-Completeness. f(n) \ n n sec sec sec. n sec 24.3 sec 5.2 mins. 2 n sec 17.9 mins 35.

CS 5114: Theory of Algorithms. Tractable Problems. Tractable Problems (cont) Decision Problems. Clifford A. Shaffer. Spring 2014

: Computational Complexity Lecture 3 ITCS, Tsinghua Univesity, Fall October 2007

Computational Complexity Theory

CS 350 Algorithms and Complexity

Lecture 19: Finish NP-Completeness, conp and Friends

/633 Introduction to Algorithms Lecturer: Michael Dinitz Topic: NP-Completeness I Date: 11/13/18

6.045: Automata, Computability, and Complexity (GITCS) Class 15 Nancy Lynch

1 Non-deterministic Turing Machine

Announcements. Problem Set 7 graded; will be returned at end of lecture. Unclaimed problem sets and midterms moved!

CS 350 Algorithms and Complexity

CS/COE

Time Complexity. Definition. Let t : n n be a function. NTIME(t(n)) = {L L is a language decidable by a O(t(n)) deterministic TM}

ECE 695 Numerical Simulations Lecture 2: Computability and NPhardness. Prof. Peter Bermel January 11, 2017

Lecture 4: NP and computational intractability

an efficient procedure for the decision problem. We illustrate this phenomenon for the Satisfiability problem.

Transcription:

COSE215: Theory of Computation Lecture 21 P, NP, and NP-Complete Problems Hakjoo Oh 2017 Spring Hakjoo Oh COSE215 2017 Spring, Lecture 21 June 11, 2017 1 / 11

Contents 1 The classes P and N P Reductions NP-complete problems 1 The slides are based on Siddhartha Sen s slides ( P, NP, and NP-Completeness ) Hakjoo Oh COSE215 2017 Spring, Lecture 21 June 11, 2017 2 / 11

Problems Solvable in Polynomial Time A Turing machine M is said to be of time complexity T (n) if whenever M is given an input w of length n, M halts after making at most T (n) moves, regardless of whether or not M accepts. E.g., T (n) = 5n 2, T (n) = 3 n + 5n 4 Polynomial time: T (n) = a 0 n k + a 1 n k 1 + + a k n + a k+1 We say a language L is in class P if there is some polynomial T (n) such that L = L(M) for some deterministic TM M of time complexity T (n). Problems solvable in polynomial time are called tractable. Many familiar problems in a course on data structures and algorithms have efficient solutions and are generally in P. E.g., finding a minimum-weight spanning tree (MWST) Hakjoo Oh COSE215 2017 Spring, Lecture 21 June 11, 2017 3 / 11

Nondeterministic Polynomial Time We say a language L is in the class N P (nondeterministic polynomial) if there is a nondeterministic TM M and a polynomial time complexity T (n) such that L = L(M), and when M is given an input of length n, there are no sequences of more than T (n) moves of M. Example: TSP (Travelling Salesman Problem) P N P because every deterministic TM is a nondeterministic TM. However, it appears that N P contains many problems not in P. A NTM has the ability to guess an exponential number of possible solutions to a problem and check each one in polynomial time in parallel. It is one of the deepest open questions whether P = N P, i.e., whether in fact everything that can be done in polynomial time by NTM can in fact be done by a DTM in polynomial time, perhaps with a higher-order polynomial. Hakjoo Oh COSE215 2017 Spring, Lecture 21 June 11, 2017 4 / 11

Implications of P = N P If P=NP, then the world would be a profoundly different place than we usually assume it to be. There would be no special value in creative leaps, no fundamental gap between solving a problem and recognizing the solution once its found. Everyone who could appreciate a symphony would be Mozart; everyone who could follow a step-by-step argument would be Gauss; everyone who could recognize a good investment strategy would be Warren Buffett. Scott Aaronson Hakjoo Oh COSE215 2017 Spring, Lecture 21 June 11, 2017 5 / 11

NP-Complete Problems NP-complete problems are the hardest problems in the NP class. If any NP-complete problem can be solved in polynomial time, then all problems in NP are solvable in polynomial time. How to compare easiness/hardness of problems? Hakjoo Oh COSE215 2017 Spring, Lecture 21 June 11, 2017 6 / 11

Problem Solving by Reduction L 1 : the language (problem) to solve L 2 : the problem for which we have an algorithm to solve Solve L 1 by reducing L 1 to L 2 (L 1 L 2 ) via function f: 1 Convert input x of L 1 to instance f(x) of L 2 x L 1 f(x) L 2 2 Apply the algorithm for L 2 to f(x) Running time = time to compute f + time to apply algorithm for L 2 We write L 1 P L 2 if f(x) is computable in polynomial time Hakjoo Oh COSE215 2017 Spring, Lecture 21 June 11, 2017 7 / 11

Reductions show easiness/hardness To show L 1 is easy, reduce it to something we know is easy L 1 easy Use algorithm for easy language to decide L 1 To show L 1 is hard, reduce something we know is hard to it (e.g., NP-complete problem) hard L 1 If L 1 was easy, hard would be easy too Hakjoo Oh COSE215 2017 Spring, Lecture 21 June 11, 2017 8 / 11

NP-Complete Problems We say L is NP-complete if 1 L is in N P 2 For every language L in N P, there is a polynomial time reduction of L to L (i.e., L P L) Hakjoo Oh COSE215 2017 Spring, Lecture 21 June 11, 2017 9 / 11

The Boolean Satisfiability Problem Boolean formulas: Example: The satisfiability problem (SAT): f T F f f f f f f = f x (y z) Given a boolean expression, is it satisfiable? Theorem (Cook) SAT is NP-complete. Hakjoo Oh COSE215 2017 Spring, Lecture 21 June 11, 2017 10 / 11

Summary Problems: Undecidable Decidable Tractable (P) Intractable Hakjoo Oh COSE215 2017 Spring, Lecture 21 June 11, 2017 11 / 11