CMPT307: Complexity Classes: P and N P Week 13-1

Similar documents
CS 320, Fall Dr. Geri Georg, Instructor 320 NP 1

1. Introduction Recap

NP-problems continued

NP-completeness. Chapter 34. Sergey Bereg

BBM402-Lecture 11: The Class NP

Formal definition of P

Algorithms and Theory of Computation. Lecture 19: Class P and NP, Reduction

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

Chapter 34: NP-Completeness

P is the class of problems for which there are algorithms that solve the problem in time O(n k ) for some constant k.

Non-Approximability Results (2 nd part) 1/19

NP-Complete Problems. Complexity Class P. .. Cal Poly CSC 349: Design and Analyis of Algorithms Alexander Dekhtyar..

Complexity, P and NP

NP-Complete problems

NP-Completeness. NP-Completeness 1

Lecture #14: NP-Completeness (Chapter 34 Old Edition Chapter 36) Discussion here is from the old edition.

Limits to Approximability: When Algorithms Won't Help You. Note: Contents of today s lecture won t be on the exam

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

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

Intro to Theory of Computation

Computational Complexity. IE 496 Lecture 6. Dr. Ted Ralphs

NP-problems continued

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

NP and Computational Intractability

34.1 Polynomial time. Abstract problems

About the relationship between formal logic and complexity classes

Computational Intractability 2010/4/15. Lecture 2

Chapter 2 : Time complexity

Computational Complexity

Lecture 19: Finish NP-Completeness, conp and Friends

Show that the following problems are NP-complete

conp = { L L NP } (1) This problem is essentially the same as SAT because a formula is not satisfiable if and only if its negation is a tautology.

CSCE 551 Final Exam, Spring 2004 Answer Key

CMSC 441: Algorithms. NP Completeness

Q = Set of states, IE661: Scheduling Theory (Fall 2003) Primer to Complexity Theory Satyaki Ghosh Dastidar

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

Spring Lecture 21 NP-Complete Problems

Geometric Steiner Trees

1 Computational Problems

P versus NP. Math 40210, Fall November 10, Math (Fall 2015) P versus NP November 10, / 9

ECS122A Handout on NP-Completeness March 12, 2018

1.1 P, NP, and NP-complete

Notes for Lecture Notes 2

NP-Completeness. ch34 Hewett. Problem. Tractable Intractable Non-computable computationally infeasible super poly-time alg. sol. E.g.

Introduction to Complexity Theory

Turing Machines and Time Complexity

6-1 Computational Complexity

NP-Completeness. Andreas Klappenecker. [based on slides by Prof. Welch]

P and NP. Or, how to make $1,000,000.

CS311 Computational Structures. NP-completeness. Lecture 18. Andrew P. Black Andrew Tolmach. Thursday, 2 December 2010

Essential facts about NP-completeness:

Combinatorial Optimization

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

The Complexity Classes P and NP. Andreas Klappenecker [partially based on slides by Professor Welch]

A An Overview of Complexity Theory for the Algorithm Designer

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

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

Computability Theory

P versus NP. Math 40210, Spring September 16, Math (Spring 2012) P versus NP September 16, / 9

FORMAL LANGUAGES, AUTOMATA AND COMPUTATION

The Complexity of Maximum. Matroid-Greedoid Intersection and. Weighted Greedoid Maximization

The Cook-Levin Theorem

Correctness of Dijkstra s algorithm

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

Problem Complexity Classes

from notes written mostly by Dr. Matt Stallmann: All Rights Reserved

Quantum Computing Lecture 8. Quantum Automata and Complexity

Preliminaries and Complexity Theory

Discrete Optimization 2010 Lecture 10 P, N P, and N PCompleteness

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

Theory of Computer Science

IE418 Integer Programming

CS154, Lecture 13: P vs NP

NP and NP Completeness

CS5371 Theory of Computation. Lecture 19: Complexity IV (More on NP, NP-Complete)

NP-Complete Reductions 1

Lecture Notes 4. Issued 8 March 2018

Theory of Computer Science. Theory of Computer Science. E1.1 Motivation. E1.2 How to Measure Runtime? E1.3 Decision Problems. E1.

Umans Complexity Theory Lectures

NP-Completeness. NP-Completeness 1

K-center Hardness and Max-Coverage (Greedy)

Introduction. Pvs.NPExample

CHAPTER 3 FUNDAMENTALS OF COMPUTATIONAL COMPLEXITY. E. Amaldi Foundations of Operations Research Politecnico di Milano 1

CS5371 Theory of Computation. Lecture 18: Complexity III (Two Classes: P and NP)

COMP/MATH 300 Topics for Spring 2017 June 5, Review and Regular Languages

Theory of Computation Time Complexity

NP Complete Problems. COMP 215 Lecture 20

CS151 Complexity Theory. Lecture 1 April 3, 2017

NP-Completeness. Dr. B. S. Panda Professor, Department of Mathematics IIT Delhi, Hauz Khas, ND-16

NP-Completeness. Subhash Suri. May 15, 2018

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

CS Fall 2011 P and NP Carola Wenk

COP 4531 Complexity & Analysis of Data Structures & Algorithms

CS154, Lecture 13: P vs NP

Intro to Theory of Computation

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

Computability and Complexity Theory

Theory of Computation

PCP Theorem and Hardness of Approximation

Transcription:

CMPT307: Complexity Classes: P and N P Week 13-1 Xian Qiu Simon Fraser University xianq@sfu.ca

Strings and Languages an alphabet Σ is a finite set of symbols {0, 1}, {T, F}, {a, b,..., z}, N a string x is a finite sequence of symbols from some alphabet 10011010010, asdfghjkl, ɛ (empty string) a language L over an alphabet Σ is a set of strings made up of symbols from Σ Σ = the language of all strings over Σ Σ = {0, 1}, Σ = {ɛ, 0, 1, 01, 10, 11, 000,...} 2 of 14

Decision Problems Hamiltonian-Cycle given: undirected graph G = (V, E) question: does G contain a Hamiltonian cycle? we can characterize a decision problem by its yes-instances { } G is an undirected graph L = G G contains a Hamiltonian cycle binary encoding Σ = {0, 1} a decision problem Q can be viewed as a language L over Σ such that L = {x Σ Q(x) = 1} Hamiltonian Cycle: given x Σ, x L? 3 of 14

Decision Problems Tsp given: undirected graph G = (V, E) and distance function c : E Z + question: does there exist a Hamiltonian cycle in G of total length k? Prime given a natural number n, is n a prime number? Path given: undirected graph G = (V, E) and s, t V and an integer k > 0 question: does there exist an s-t path with no more than k edges? 4 of 14

Class P given language L and x Σ = {0, 1}, is x L? algorithm A accepts a string x Σ if the output A(x) = 1 { P = L } A is a polynomial time algorithm x L A accepts x P is the set of decision problems which can be solved in polynomial time Path P what about Tsp? poly-time algorithm not known, but a proof can be verified in poly-time 5 of 14

A Proof System statement: x L or x L prover: writes down a proof y verifier: checks the statement/proof, accepting or rejecting input x verifier V y proof work tape output 6 of 14

Class N P verifier V: polynomial time algorithm prover P: arbitrarily powerful Class N P (non-deterministic polynomial-time) a language L N P if and only if x L, P can write a proof y of length poly( x ) that V accepts x L, no matter what poly( x )-length proof P writes, V rejects a certificate is a proof y such that V accepts x N P is a class of decision problems which admit short and checkable certificate P N P 7 of 14

Examples Hamiltonian-Cycle N P P writes down a proof y (of polynomial size in G ) V checks y and returns yes if y is a cycle and y is Hamiltonian a certificate is a Hamiltotian cycle short: Hamiltotian cycle has size O(n) checkable: V can verify a Hamiltonian cycle in O(n) 8 of 14

Examples Vertex-Cover N P input: undirected graph G and integer k > 0 question: does exist a vertex cover of G with size k? C V is a vertex cover if C covers E a certificate is a vertex set C s.t. C k and C covers E V can check whether C covers E in poly-time 9 of 14

Examples Prime N P? yes, but a certificate is non-trivial Pratt, SIAM J. on Computing, 1975 co-prime: is n N not a prime number? co-prime consists of all no-instances of Prime the language of co-prime is the complement of the language of Prime a short, checkable certificate is a number d N s.t. n d = 0 co-prime N P 10 of 14

Class co-n P let L be the complement of L co-n P = { L L N P } co-hamiltonian-cycle does G not contain a Hamiltonian cycle? the language of co-hamiltonian-cycle is the set of graphs which do not have a Hamiltonian cycle co-hamiltonian-cycle N P? Prime co-n P unknown 11 of 14

Polynomial Time Reduction L 1, L 2 = languages L 1 is polynomially reducible to L 2 if poly-time computable function f : {0, 1} {0, 1} x L 1 f(x) L 2 {0, 1} f {0, 1} L 1 L 2 denoted by L 1 P L 2 12 of 14

NP-completeness assume L 1 P L 2 and consider decision problems P : x 1 L 1? Q : x 2 L 2? P is polynomially reducible to Q Q is as hard as P a language L {0, 1} is NP-complete if 1. L N P and 2. L P L for every L N P if L is NP-complete, then the associated decision problem is the hardest among those in N P L is NP-hard if 2 is satisfied (1 not necessarily) 13 of 14

NP-completeness I can t find an efficient algorithm, but neither can all these famous people. Garey & Johnson (1979): Computers and Intractability 14 of 14