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

Size: px
Start display at page:

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

Transcription

1 Discrete Optimization 2010 Lecture 10 P, N P, and N PCompleteness Marc Uetz University of Twente m.uetz@utwente.nl Lecture 9: sheet 1 / 31 Marc Uetz Discrete Optimization

2 Outline 1 N P and co-n P 2 N P-completeness 3 Clique is N P-complete Lecture 9: sheet 2 / 31 Marc Uetz Discrete Optimization

3 !"#$%&"'()"#*+'%,*#$%&-".'$#/%0%1'2"-*34#/ Some Problems with Poly-Time Algorithms!!"#"$%$&'()##"#*&+,--&.!'+/&0#&-1*-23-"*45-16&%#1",-75-1&*,)(4! 8,"$9 :;*0,"54$<& =.! > :;*0,"54$ =." ;0*&"/!!)A"$%$&B;03&.!B/&"#&)&1",-75-16&7)()7"5)5-1&*,)(4! '40,5-95&:%*$-#5"#*&8)54&:;*0,"54$<& =.! > "/! C"*4-95&;)D-;&8,-E;0328%94&:;*0,"54$< =.! > " FG> /! '40,5-95GH0#*-95&8)54&.'8/&0#&-1*-23-"*45-1&1",-75-1&*,)(4! )7I7;"7&1"*,)(4< =."/! =.! > /! ),D"5,),I&1"*,)(4M&);;&()",9&.B;0I12N),94);;/< =.! O /! '0,5"#*&! #%$D-,9! P%DD;-&'0,5< =.! > /!!-,*-&'0,5< =.! ;0*&!/! H"#-),&8,0*,)$$"#*&.H8/! Q;;"(90"1&!-5401&.?4)74"I)#R9 +4-0,-$/ =..!S"/ T! H.#$%$&/ > /! '"$(;-A&:;*0,"54$ #05 (0;I#0$");&5"$-U (in.v05"7-<&b0,&*,)(4&(,0d;-$96&! case of LP, A Q m n, L( "9&54-&#%$D-,&0E&#01-96&" ) = encoding length of 54-&#%$D-,&0E&),79M&E0,& A, b, c) H"#-),&8,0*,)$$"#*6&! )#1&" ),-&54-&$)5,"A&1"$-#9"0#9<&# "9&)# ""! $)5,"A/ Lecture 9: sheet 3 / 31 Marc Uetz Discrete Optimization

4 !"#$%&'"()$#*%+,-."/- &")0-,#$ 1)2"',-.#* Some Problems without Poly-Time Algorithms!!"#$%&'()*+#&%,-#(*."/0&%-*1!+.2! 3(4%)%"*5'(%#"*."/)"#--'()! 6#7'-8-*9&':8%*18(;'"%<4%;*)"#=>2! 6#7'-8-*3(;%=%(;%(4*+%4*18(;'"%<4%;*)"#=>2! 6#?%,=#( C(#=,#<?*."/0&%-! D'(*.#<?'()*."/0&%-! +#4',E'#0'&'4F! G*G*G* Lecture 9: sheet 4 / 31 Marc Uetz Discrete Optimization

5 Outline 1 N P and co-n P 2 N P-completeness 3 Clique is N P-complete Lecture 9: sheet 5 / 31 Marc Uetz Discrete Optimization

6 Problem class N P: Nondeterministic Polynomial Time Given: Decision problem P, I encoding length of instance I P Definition Algorithm A is nondeterministic polynomial time algorithm for P if For all Yes instances I, poly-length certificate z(i ) (i.e., z(i ) p( I ) for some polyn. p), and A(I, z(i )) = Yes For all No instances I, and any poly-length input z ( fake certificate ), A(I, z) = No A(I, z) is a poly-time algorithm for any poly-length z Definition P N P : P has nondeterministic poly-time algorithm Yes instances of P have a polynomial certificate that can be verified in polynomial time Lecture 9: sheet 6 / 31 Marc Uetz Discrete Optimization

7 Example of N P-problem TSP: Given graph G = (V, E) with V = n, integer edge weights d e 0 and k N: exist Hamiltonian cycle of total length k? Theorem TSP N P Proof: Encoding length TSP: Ω(n + log U), with U = max e d e Certificate Yes instance: The set of edges of the tour, T E O( n ) Certificate checking: Check if the following exhausts all nodes: start with any e = {u, v} T, in T \ {e} look for edge e incident with v, and iterate with e O( n 2 ) Check if e T d e k O( n 2 log U ) Lecture 9: sheet 7 / 31 Marc Uetz Discrete Optimization

8 Problem class co-n P: Complement-N P Given: Decision problem P, I encoding length of instance I P Definition Algorithm A is nondeterministic polynomial time algorithm for complement problem P if For all No instances I, poly-length certificate z(i ) (i.e., z(i ) p( I ) for some polyn. p), and A(I, z(i )) = Yes For all Yes instances I, and any poly-length input z ( fake certificate ), A(I, z) = No A(I, z) is a poly-time algorithm for any poly-length z Definition P co-n P: No instances of P have a polynomial certificate that can be verified in polynomial time P N P Lecture 9: sheet 8 / 31 Marc Uetz Discrete Optimization

9 Example of co-n P Problem TUM: Given integer matrix A Z m n : is A totally unimodular? Theorem TUM con P Proof Encoding length A: Ω(n + m) Certificate No instance: Square submatrix B of A with det(b) {0, ±1} O( nm ) Certifcate checking: Compute det(b) this is non-trivial, because well-known Laplace formula det(b) = j b ij( 1) i+j det(b i, j ) requires Ω(n!) time possible via computing LU decomposition of B, where B = LU, with L = lower triangular, U = upper triangular O( n 3 ) Lecture 9: sheet 9 / 31 Marc Uetz Discrete Optimization

10 P, N P, and co-n P Theorem P N P and P co-n P TSP N P P co-n P TUM MST Open conjectures P N P, worth $ claymath.org/millennium/p vs NP/ P = N P co-n P, worth world-fame and recognition as scientist Lecture 9: sheet 10 / 31 Marc Uetz Discrete Optimization

11 Proof P N P,co-N P Given Problem Q P. To show: Q N P i.e., for all Yes instances I Q exists polynomial length certificate z(i ), and an algorithm A that verifies the certificate in poly-time, so A(I, z(i )) = Yes I = Yes. Proof: We know Q P, so Q has a poly-time algorithm A Q with A Q (I ) = Yes I = Yes Now use z(i ) =, and define A(I, ) := A Q (I ) To see P co-n P, replace all underlined Yes by No, and let A(I, ) := A Q (I ) Lecture 9: sheet 11 / 31 Marc Uetz Discrete Optimization

12 Outline 1 N P and co-n P 2 N P-completeness 3 Clique is N P-complete Lecture 9: sheet 12 / 31 Marc Uetz Discrete Optimization

13 Completeness Informal Definition Given a class of decision problems X, problem P X is complete for that class if it is among the most difficult problems of X Needed: Formalization of most difficult, or at least as difficult as polynomial transformations and reductions between problems Lecture 9: sheet 13 / 31 Marc Uetz Discrete Optimization

14 Reduction (Turing Reduction) Definition Given two problems P and Q, say P polynomially reduces to Q (P α Q), if the following is true: Assuming a poly-time algorithm for Q, there is a poly-time algorithm for P. Intuition: Q is at least as hard as P (as to poly-time solvability) Definition Problems P, Q are polynomially equivalent if P α Q and Q α P Example: Q = decision problem and P = optimization problem for matching are polynomially equivalent (same for TSP) Lecture 9: sheet 14 / 31 Marc Uetz Discrete Optimization

15 Transformation (Karp or Many-One Reduction)!"#$%&'"(#)*'$%+,#-%'.+/#" )*'$%7 Definition Given decision problems P and Q, say P polynomially transforms to Q!"#$%$&$'%()*$+"%)&,')-".'/%$&$'%)0-'12"34)P if the following is true: There is a polynomial 5%6)Q7)&8"% time algorithm P 0'29%'3$5229 &-5%4#'-34)&')Q $#)&8")#'22',$%/)$4)&-:"();8"-")"<$4&4)5)0'29%'3$52)&$3") (the transformation) T : P Q, such that 52/'-$&83)=&8")&-5%4#'-35&$'%>)T() ()P! Q7)4:.8)&85&) instance $%4&5%.")I I P " = P $4)?@AB # $%4&5%.");=)I instance T >)" (I ) Q $4)?@AB = Yes 1!"#!"# &'()*+,'-(&.,)//! $% $% 0 note: T need not be injective neither surjective Lecture 9: sheet 15 / 31 Marc Uetz Discrete Optimization

16 Example of a transformation P!"#$%&'( P = Clique )%*(+"),-./"G!0V,E12"! 3$%&'("C " V 4%5/""6C6"# k 7 GivenQ G!"8+9(.(+9(+5":(5 = (V, E), k, is there a clique C V of size C k? )%*(+"),-./"G!0V,E12"! %+9(.(+9(+5";(5"S " V 4%5/""6S6"# k 7 Q = Independent Set Given G = (V, E), k, is there a indep. set S V of size S k? <(=%+(">,-+;=?,@-5%?+" >,-+;=?,@-5%?+"TA" A"P $ Q BC" T A"G $ G c Define4/(,("""G T : P c Q!"0V,E by T c (G) 1"3?@.$(@(+5"?="GA""""e := G c, where G c = %(V E, c E& c ) e and! E0G1""" e E c e E! T is polynomial time transformation, time O( n 2 ) clique C k in G indep. set S k in T (G) = G c Lecture 9: sheet 16 / 31 Marc Uetz Discrete Optimization

17 Reductions and Transformations Theorem Let decision problems P, Q be given. If P polynomially transforms to Q P α Q Proof. To show: If Q is poly-time solvable, so is P Assume a poly-time algorithm for Q, A Q. We know, poly-time transformation T : P Q. Poly-time algorithm for P: given instance I P compute T (I ) Q return Yes if A Q (T (I )) = Yes, No otherwise Lecture 9: sheet 17 / 31 Marc Uetz Discrete Optimization

18 Problem Class N P-complete Definition Given decision problem Q, then Q is N P-complete if 1 Q N P 2 P N P : P polynomially transforms to Q (Q is N P-hard) In words: Q is at least as hard as any problem in N P (as to poly-time solvability) Theorem If N P-complete problem X has a poly-time algorithm, P=N P. Proof: P N P, poly-time transf. T P : P X, X is poly-time solvable by A X, so A X T P yields poly-time algorithm for P Lecture 9: sheet 18 / 31 Marc Uetz Discrete Optimization

19 How N P-completeness helps us Garey & Johnson (1979): Computers and Intractability Lecture 9: sheet 19 / 31 Marc Uetz Discrete Optimization

20 On N P-completeness Is definition practical? need existence of T : P Q, P N P! Remark Transformations are transitive: given poly-time T 1 : P Q, T 2 : Q R, yield poly-time transf. T : P R, T := T 2 T 1. Theorem (Cook 1971) There exists an N P-complete problem, namely Satisfiability (SAT). Since 1971, showing that problem Q is N P-complete is easy show Q NP show poly-time transformation T : SAT Q (Transitivity may use any N P-complete problem instead of SAT.) Lecture 9: sheet 20 / 31 Marc Uetz Discrete Optimization

21 Satisfiability (SAT)!"#$!%$"&$'$#()*!"#+ SAT: Is a formula F in conjunctive normal form satisfiable?!"##$%&'()&*+&,$%- x boolean variables x 1,.... /(0 /(x, x n, each n 1(((x j! 23&$-%/(4*5%6( x j {false, true}!7$&5-%- C clauses C 1,.. /(0 /(C., C m, m /(((%&89(C each C i is i 9&-(&(3#*:(&-(3#$$#;- disjunction of certain literals C i <(4*5%(+3(&4($%&-4(#'%( $+4%*&$(+-(4*5% 7$&5-% =+4%*&$ =+4%*&$(>?%@&4+#'(#3(x A 1(4*5%(+3(x A <(3&$-%B F = C 1 C m = true : all C i = true! " &(4*549(&--+@':%'4(3#*( 4*549(&--+@':%'4(3#*(x. /(0/( /(x -589(49&4(C<&$$(8$&5-%- n &*%(4*5%1 Satisfiability problem: x {false, true} n such that F = true?!de5+f&$%'4$g/ x j! 2H/.6( Cook s theorem: Any N P problem can be equivalently reformulated as a SAT problem Lecture 9: sheet 21 / 31 Marc Uetz Discrete Optimization

22 !"#$%&'()$*$!"+,-./0#)#$1'-20#.($3456$!'45(7-'.4)&-5(8 The First Six N P-complete problems SATISFIABILITY!""#$%&'()*+, %&'()*+,$%-%- 3 - SATISFIABILITY 3-DIMENSIONAL MATCHING VERTEX COVER PARTITION HAMILTONIAN CYCLE CLIQUE 3-SAT? SAT with exactly 3 literals per clause Lecture 9: sheet 22 / 31 Marc Uetz Discrete Optimization

23 Clique is N P-complete Clique Given G = (V, E), is there a clique C V of size C k? 1 Clique N P Certificate for Yes instances: clique C itself (note C n, verifiable in O( n 2 ) time) 2 Give a poly-time transformation: T : 3-SAT Clique, where m = #clauses, n = #variables in 3-SAT, so that F 3-SAT = Yes G = T (F ) Clique = Yes F satisfiable G has clique of size m (Our graph will have 7m nodes) Lecture 9: sheet 23 / 31 Marc Uetz Discrete Optimization

24 Lecture 9: sheet 24 / 31 Marc Uetz Discrete Optimization

25 Clique is N P-complete The transformation For each clause C i : 7 nodes that correspond to all 7 partial truth assignments that make C i true (partial truth assignment? only 3 variables appear in clause C i, all other variables remain undecided, marked d figure) O( mn ) time introduce an edge between any two partial truth assignments if they are compatibe (don t contradict each other on a truth value of any variable) figure O( m 2 n ) time The proof (main idea) Any clique in G can only have one node per clause C i Thus a clique of size m is equivalent with a (partial) truth assignment that makes all m clauses C i true Lecture 9: sheet 25 / 31 Marc Uetz Discrete Optimization

26 The Simplest N P-complete problem: Partition Given Natural numbers a i 0, i = 1,..., n, with n i=1 a i = 2B (that is to say, i a i is even). Question Does there exist a subset S {1,..., n} with Theorem Partition is N P-complete Proof N P-hardness: Literature a i = a i? i S i S Lecture 9: sheet 26 / 31 Marc Uetz Discrete Optimization

27 N P-hard Optimization Problems Definition We call an optimization problem Q N P-hard if the corresponding decision problem is N P-complete. (Note: a poly-time algorithm for solving Q would yield P=N P) Lecture 9: sheet 27 / 31 Marc Uetz Discrete Optimization

28 Knapsack Problem Given n items with weights w j 0 and value v j 0 a knapsack with total (weight) capacity W Problem find subset S of items with weight W and maximal value Theorem The Knapsack problem is N P-hard (Exercise). Lecture 9: sheet 28 / 31 Marc Uetz Discrete Optimization

29 Solving the Knapsack Problem weights w j : values v j : v 1 = 2 v 2 = 3 v 3 = 4 capacity W = 4 Construct directed graph G = (V, A): nodes u jk, k = w j,..., W, edges (u ik, u jl ) with lengths v j i < j and l k = w j item 1 2 size v = W u 11 u 12 u 13 u 14 v 2 v 2 s v 2 u 22 u 23 u 24 t 3 v 3 v 3 u 33 u 34 length 0 Lecture 9: sheet 29 / 31 Marc Uetz Discrete Optimization

30 Solving the Knapsack Problem!"#$%&'%()*%"'(+,%-.*/-%0(1#23-%-#2! Observations!"#$%&'(!"#$%&'%(%$)(*+,#-'. )*(&!"%(+#$! /+-(0123(12#43(5+(.67+(%$5"-$%$8(,60+(*%5+*. any (s, t)-path traverses some rows of the digraph,.9)'(-'%-(0123(".(%,(9&& thereby 9&& 569,0 collecting :6$(-'+(.'6$-+.-(&%-'(:$67(.(-6(2(12#4;.3< the corresponding items! ='+(,60+(*%5+*.(0123(%$+(.'6$-+.-(&%-'(*+,#-'.(":(%,0(6,*8(": by definition, all these items fit in the knapsack, w i W 01>3(! 01,3?) length of path = total value,%- :6$(%**(12@>3#A of items collected along the path longest (s, t)-path = optimal solution Knapsack! $ "! " How to compute! longest paths in digraphs? " Same * as shortest paths only with -inequality + 2 reversed: (&) d(s, w) ) d(s, $ v) + c) vw %&' (digraph is acyclic,! so we even have a linear time algorithm) $ # #! # " ) 2> > Lecture 9: sheet 30 / 31 Marc Uetz Discrete Optimization

31 Solving the Knapsack Problem Knapsack is N P-hard Longest Path is polynomially solvable, so P And we have a transformation T : Knapsack Longest Path Hence, can we conclude that P=N P and claim $ from the Clay Mathematics Institute? Lecture 9: sheet 31 / 31 Marc Uetz Discrete Optimization

Discrete Optimization 2010 Lecture 8 Lagrangian Relaxation / P, N P and co-n P

Discrete Optimization 2010 Lecture 8 Lagrangian Relaxation / P, N P and co-n P Discrete Optimization 2010 Lecture 8 Lagrangian Relaxation / P, N P and co-n P Marc Uetz University of Twente m.uetz@utwente.nl Lecture 8: sheet 1 / 32 Marc Uetz Discrete Optimization Outline 1 Lagrangian

More information

1. Introduction Recap

1. Introduction Recap 1. Introduction Recap 1. Tractable and intractable problems polynomial-boundness: O(n k ) 2. NP-complete problems informal definition 3. Examples of P vs. NP difference may appear only slightly 4. Optimization

More information

NP and Computational Intractability

NP and Computational Intractability NP and Computational Intractability 1 Polynomial-Time Reduction Desiderata'. Suppose we could solve X in polynomial-time. What else could we solve in polynomial time? don't confuse with reduces from Reduction.

More information

Correctness of Dijkstra s algorithm

Correctness of Dijkstra s algorithm Correctness of Dijkstra s algorithm Invariant: When vertex u is deleted from the priority queue, d[u] is the correct length of the shortest path from the source s to vertex u. Additionally, the value d[u]

More information

Lecture 4: NP and computational intractability

Lecture 4: NP and computational intractability Chapter 4 Lecture 4: NP and computational intractability Listen to: Find the longest path, Daniel Barret What do we do today: polynomial time reduction NP, co-np and NP complete problems some examples

More information

NP and Computational Intractability

NP and Computational Intractability NP and Computational Intractability 1 Review Basic reduction strategies. Simple equivalence: INDEPENDENT-SET P VERTEX-COVER. Special case to general case: VERTEX-COVER P SET-COVER. Encoding with gadgets:

More information

Limitations of Algorithm Power

Limitations of Algorithm Power Limitations of Algorithm Power Objectives We now move into the third and final major theme for this course. 1. Tools for analyzing algorithms. 2. Design strategies for designing algorithms. 3. Identifying

More information

Algorithms and Theory of Computation. Lecture 22: NP-Completeness (2)

Algorithms and Theory of Computation. Lecture 22: NP-Completeness (2) Algorithms and Theory of Computation Lecture 22: NP-Completeness (2) Xiaohui Bei MAS 714 November 8, 2018 Nanyang Technological University MAS 714 November 8, 2018 1 / 20 Set Cover Set Cover Input: a set

More information

NP-Complete Reductions 1

NP-Complete Reductions 1 x x x 2 x 2 x 3 x 3 x 4 x 4 CS 4407 2 22 32 Algorithms 3 2 23 3 33 NP-Complete Reductions Prof. Gregory Provan Department of Computer Science University College Cork Lecture Outline x x x 2 x 2 x 3 x 3

More information

Polynomial-Time Reductions

Polynomial-Time Reductions Reductions 1 Polynomial-Time Reductions Classify Problems According to Computational Requirements Q. Which problems will we be able to solve in practice? A working definition. [von Neumann 1953, Godel

More information

1.1 P, NP, and NP-complete

1.1 P, NP, and NP-complete CSC5160: Combinatorial Optimization and Approximation Algorithms Topic: Introduction to NP-complete Problems Date: 11/01/2008 Lecturer: Lap Chi Lau Scribe: Jerry Jilin Le This lecture gives a general introduction

More information

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

NP-Completeness. Andreas Klappenecker. [based on slides by Prof. Welch] NP-Completeness Andreas Klappenecker [based on slides by Prof. Welch] 1 Prelude: Informal Discussion (Incidentally, we will never get very formal in this course) 2 Polynomial Time Algorithms Most of the

More information

NP-Complete Reductions 2

NP-Complete Reductions 2 x 1 x 1 x 2 x 2 x 3 x 3 x 4 x 4 12 22 32 CS 447 11 13 21 23 31 33 Algorithms NP-Complete Reductions 2 Prof. Gregory Provan Department of Computer Science University College Cork 1 Lecture Outline NP-Complete

More information

Computational Intractability 2010/4/15. Lecture 2

Computational Intractability 2010/4/15. Lecture 2 Computational Intractability 2010/4/15 Professor: David Avis Lecture 2 Scribe:Naoki Hatta 1 P and NP 1.1 Definition of P and NP Decision problem it requires yes/no answer. Example: X is a set of strings.

More information

Polynomial-time Reductions

Polynomial-time Reductions Polynomial-time Reductions Disclaimer: Many denitions in these slides should be taken as the intuitive meaning, as the precise meaning of some of the terms are hard to pin down without introducing the

More information

Lecture 18: More NP-Complete Problems

Lecture 18: More NP-Complete Problems 6.045 Lecture 18: More NP-Complete Problems 1 The Clique Problem a d f c b e g Given a graph G and positive k, does G contain a complete subgraph on k nodes? CLIQUE = { (G,k) G is an undirected graph with

More information

Introduction to Complexity Theory

Introduction to Complexity Theory Introduction to Complexity Theory Read K & S Chapter 6. Most computational problems you will face your life are solvable (decidable). We have yet to address whether a problem is easy or hard. Complexity

More information

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

Easy Problems vs. Hard Problems. CSE 421 Introduction to Algorithms Winter Is P a good definition of efficient? The class P Easy Problems vs. Hard Problems CSE 421 Introduction to Algorithms Winter 2000 NP-Completeness (Chapter 11) Easy - problems whose worst case running time is bounded by some polynomial in the size of the

More information

NP-Complete problems

NP-Complete problems NP-Complete problems NP-complete problems (NPC): A subset of NP. If any NP-complete problem can be solved in polynomial time, then every problem in NP has a polynomial time solution. NP-complete languages

More information

Chapter 34: NP-Completeness

Chapter 34: NP-Completeness Graph Algorithms - Spring 2011 Set 17. Lecturer: Huilan Chang Reference: Cormen, Leiserson, Rivest, and Stein, Introduction to Algorithms, 2nd Edition, The MIT Press. Chapter 34: NP-Completeness 2. Polynomial-time

More information

4/12/2011. Chapter 8. NP and Computational Intractability. Directed Hamiltonian Cycle. Traveling Salesman Problem. Directed Hamiltonian Cycle

4/12/2011. Chapter 8. NP and Computational Intractability. Directed Hamiltonian Cycle. Traveling Salesman Problem. Directed Hamiltonian Cycle Directed Hamiltonian Cycle Chapter 8 NP and Computational Intractability Claim. G has a Hamiltonian cycle iff G' does. Pf. Suppose G has a directed Hamiltonian cycle Γ. Then G' has an undirected Hamiltonian

More information

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

Theory of Computation CS3102 Spring 2014 A tale of computers, math, problem solving, life, love and tragic death Theory of Computation CS3102 Spring 2014 A tale of computers, math, problem solving, life, love and tragic death Nathan Brunelle Department of Computer Science University of Virginia www.cs.virginia.edu/~njb2b/theory

More information

CS 301: Complexity of Algorithms (Term I 2008) Alex Tiskin Harald Räcke. Hamiltonian Cycle. 8.5 Sequencing Problems. Directed Hamiltonian Cycle

CS 301: Complexity of Algorithms (Term I 2008) Alex Tiskin Harald Räcke. Hamiltonian Cycle. 8.5 Sequencing Problems. Directed Hamiltonian Cycle 8.5 Sequencing Problems Basic genres. Packing problems: SET-PACKING, INDEPENDENT SET. Covering problems: SET-COVER, VERTEX-COVER. Constraint satisfaction problems: SAT, 3-SAT. Sequencing problems: HAMILTONIAN-CYCLE,

More information

8. INTRACTABILITY I. Lecture slides by Kevin Wayne Copyright 2005 Pearson-Addison Wesley. Last updated on 2/6/18 2:16 AM

8. INTRACTABILITY I. Lecture slides by Kevin Wayne Copyright 2005 Pearson-Addison Wesley. Last updated on 2/6/18 2:16 AM 8. INTRACTABILITY I poly-time reductions packing and covering problems constraint satisfaction problems sequencing problems partitioning problems graph coloring numerical problems Lecture slides by Kevin

More information

NP-Complete Problems. More reductions

NP-Complete Problems. More reductions NP-Complete Problems More reductions Definitions P: problems that can be solved in polynomial time (typically in n, size of input) on a deterministic Turing machine Any normal computer simulates a DTM

More information

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

NP-Completeness. f(n) \ n n sec sec sec. n sec 24.3 sec 5.2 mins. 2 n sec 17.9 mins 35. NP-Completeness Reference: Computers and Intractability: A Guide to the Theory of NP-Completeness by Garey and Johnson, W.H. Freeman and Company, 1979. NP-Completeness 1 General Problems, Input Size and

More information

CS 583: Algorithms. NP Completeness Ch 34. Intractability

CS 583: Algorithms. NP Completeness Ch 34. Intractability CS 583: Algorithms NP Completeness Ch 34 Intractability Some problems are intractable: as they grow large, we are unable to solve them in reasonable time What constitutes reasonable time? Standard working

More information

NP-Completeness. Subhash Suri. May 15, 2018

NP-Completeness. Subhash Suri. May 15, 2018 NP-Completeness Subhash Suri May 15, 2018 1 Computational Intractability The classical reference for this topic is the book Computers and Intractability: A guide to the theory of NP-Completeness by Michael

More information

CS 350 Algorithms and Complexity

CS 350 Algorithms and Complexity CS 350 Algorithms and Complexity Winter 2019 Lecture 15: Limitations of Algorithmic Power Introduction to complexity theory Andrew P. Black Department of Computer Science Portland State University Lower

More information

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

Computational Complexity and Intractability: An Introduction to the Theory of NP. Chapter 9 1 Computational Complexity and Intractability: An Introduction to the Theory of NP Chapter 9 2 Objectives Classify problems as tractable or intractable Define decision problems Define the class P Define

More information

CS 350 Algorithms and Complexity

CS 350 Algorithms and Complexity 1 CS 350 Algorithms and Complexity Fall 2015 Lecture 15: Limitations of Algorithmic Power Introduction to complexity theory Andrew P. Black Department of Computer Science Portland State University Lower

More information

IE418 Integer Programming

IE418 Integer Programming IE418: Integer Programming Department of Industrial and Systems Engineering Lehigh University 23rd February 2005 The Ingredients Some Easy Problems The Hard Problems Computational Complexity The ingredients

More information

8.5 Sequencing Problems

8.5 Sequencing Problems 8.5 Sequencing Problems Basic genres. Packing problems: SET-PACKING, INDEPENDENT SET. Covering problems: SET-COVER, VERTEX-COVER. Constraint satisfaction problems: SAT, 3-SAT. Sequencing problems: HAMILTONIAN-CYCLE,

More information

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

CHAPTER 3 FUNDAMENTALS OF COMPUTATIONAL COMPLEXITY. E. Amaldi Foundations of Operations Research Politecnico di Milano 1 CHAPTER 3 FUNDAMENTALS OF COMPUTATIONAL COMPLEXITY E. Amaldi Foundations of Operations Research Politecnico di Milano 1 Goal: Evaluate the computational requirements (this course s focus: time) to solve

More information

More NP-Complete Problems

More NP-Complete Problems CS 473: Algorithms, Spring 2018 More NP-Complete Problems Lecture 23 April 17, 2018 Most slides are courtesy Prof. Chekuri Ruta (UIUC) CS473 1 Spring 2018 1 / 57 Recap NP: languages/problems that have

More information

Computational Complexity

Computational Complexity Computational Complexity Algorithm performance and difficulty of problems So far we have seen problems admitting fast algorithms flow problems, shortest path, spanning tree... and other problems for which

More information

SAT, Coloring, Hamiltonian Cycle, TSP

SAT, Coloring, Hamiltonian Cycle, TSP 1 SAT, Coloring, Hamiltonian Cycle, TSP Slides by Carl Kingsford Apr. 28, 2014 Sects. 8.2, 8.7, 8.5 2 Boolean Formulas Boolean Formulas: Variables: x 1, x 2, x 3 (can be either true or false) Terms: t

More information

Agenda. What is a complexity class? What are the important complexity classes? How do you prove an algorithm is in a certain class

Agenda. What is a complexity class? What are the important complexity classes? How do you prove an algorithm is in a certain class Complexity Agenda What is a complexity class? What are the important complexity classes? How do you prove an algorithm is in a certain class Complexity class A complexity class is a set All problems within

More information

NP-Completeness. NP-Completeness 1

NP-Completeness. NP-Completeness 1 NP-Completeness Reference: Computers and Intractability: A Guide to the Theory of NP-Completeness by Garey and Johnson, W.H. Freeman and Company, 1979. NP-Completeness 1 General Problems, Input Size and

More information

Chapter 8. NP and Computational Intractability

Chapter 8. NP and Computational Intractability Chapter 8 NP and Computational Intractability Slides by Kevin Wayne. Copyright 2005 Pearson-Addison Wesley. All rights reserved. Acknowledgement: This lecture slide is revised and authorized from Prof.

More information

Complexity, P and NP

Complexity, P and NP Complexity, P and NP EECS 477 Lecture 21, 11/26/2002 Last week Lower bound arguments Information theoretic (12.2) Decision trees (sorting) Adversary arguments (12.3) Maximum of an array Graph connectivity

More information

SAT, NP, NP-Completeness

SAT, NP, NP-Completeness CS 473: Algorithms, Spring 2018 SAT, NP, NP-Completeness Lecture 22 April 13, 2018 Most slides are courtesy Prof. Chekuri Ruta (UIUC) CS473 1 Spring 2018 1 / 57 Part I Reductions Continued Ruta (UIUC)

More information

Chapter 2. Reductions and NP. 2.1 Reductions Continued The Satisfiability Problem (SAT) SAT 3SAT. CS 573: Algorithms, Fall 2013 August 29, 2013

Chapter 2. Reductions and NP. 2.1 Reductions Continued The Satisfiability Problem (SAT) SAT 3SAT. CS 573: Algorithms, Fall 2013 August 29, 2013 Chapter 2 Reductions and NP CS 573: Algorithms, Fall 2013 August 29, 2013 2.1 Reductions Continued 2.1.1 The Satisfiability Problem SAT 2.1.1.1 Propositional Formulas Definition 2.1.1. Consider a set of

More information

P P P NP-Hard: L is NP-hard if for all L NP, L L. Thus, if we could solve L in polynomial. Cook's Theorem and Reductions

P P P NP-Hard: L is NP-hard if for all L NP, L L. Thus, if we could solve L in polynomial. Cook's Theorem and Reductions Summary of the previous lecture Recall that we mentioned the following topics: P: is the set of decision problems (or languages) that are solvable in polynomial time. NP: is the set of decision problems

More information

Design and Analysis of Algorithms

Design and Analysis of Algorithms Design and Analysis of Algorithms CSE 5311 Lecture 25 NP Completeness Junzhou Huang, Ph.D. Department of Computer Science and Engineering CSE5311 Design and Analysis of Algorithms 1 NP-Completeness Some

More information

Discrete Optimization 2010 Lecture 12 TSP, SAT & Outlook

Discrete Optimization 2010 Lecture 12 TSP, SAT & Outlook Discrete Optimization 2010 Lecture 12 TSP, SAT & Outlook Marc Uetz University of Twente m.uetz@utwente.nl Lecture 12: sheet 1 / 29 Marc Uetz Discrete Optimization Outline TSP Randomization Outlook 1 Approximation

More information

COP 4531 Complexity & Analysis of Data Structures & Algorithms

COP 4531 Complexity & Analysis of Data Structures & Algorithms COP 4531 Complexity & Analysis of Data Structures & Algorithms Lecture 18 Reductions and NP-completeness Thanks to Kevin Wayne and the text authors who contributed to these slides Classify Problems According

More information

Lecture 19: Finish NP-Completeness, conp and Friends

Lecture 19: Finish NP-Completeness, conp and Friends 6.045 Lecture 19: Finish NP-Completeness, conp and Friends 1 Polynomial Time Reducibility f : Σ* Σ* is a polynomial time computable function if there is a poly-time Turing machine M that on every input

More information

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

Summer School on Introduction to Algorithms and Optimization Techniques July 4-12, 2017 Organized by ACMU, ISI and IEEE CEDA. Summer School on Introduction to Algorithms and Optimization Techniques July 4-12, 2017 Organized by ACMU, ISI and IEEE CEDA NP Completeness Susmita Sur-Kolay Advanced Computing and Microelectronics Unit

More information

ECS122A Handout on NP-Completeness March 12, 2018

ECS122A Handout on NP-Completeness March 12, 2018 ECS122A Handout on NP-Completeness March 12, 2018 Contents: I. Introduction II. P and NP III. NP-complete IV. How to prove a problem is NP-complete V. How to solve a NP-complete problem: approximate algorithms

More information

NP Completeness. CS 374: Algorithms & Models of Computation, Spring Lecture 23. November 19, 2015

NP Completeness. CS 374: Algorithms & Models of Computation, Spring Lecture 23. November 19, 2015 CS 374: Algorithms & Models of Computation, Spring 2015 NP Completeness Lecture 23 November 19, 2015 Chandra & Lenny (UIUC) CS374 1 Spring 2015 1 / 37 Part I NP-Completeness Chandra & Lenny (UIUC) CS374

More information

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

Computational Complexity. IE 496 Lecture 6. Dr. Ted Ralphs Computational Complexity IE 496 Lecture 6 Dr. Ted Ralphs IE496 Lecture 6 1 Reading for This Lecture N&W Sections I.5.1 and I.5.2 Wolsey Chapter 6 Kozen Lectures 21-25 IE496 Lecture 6 2 Introduction to

More information

NP Complete Problems. COMP 215 Lecture 20

NP Complete Problems. COMP 215 Lecture 20 NP Complete Problems COMP 215 Lecture 20 Complexity Theory Complexity theory is a research area unto itself. The central project is classifying problems as either tractable or intractable. Tractable Worst

More information

CSE 548: (Design and) Analysis of Algorithms

CSE 548: (Design and) Analysis of Algorithms 1 / 38 CSE 548: (Design and) Analysis of Algorithms NP and Complexity Classes R. Sekar 2 / 38 Search and Optimization Problems Many problems of our interest are search problems with exponentially (or even

More information

NP Completeness and Approximation Algorithms

NP Completeness and Approximation Algorithms Winter School on Optimization Techniques December 15-20, 2016 Organized by ACMU, ISI and IEEE CEDA NP Completeness and Approximation Algorithms Susmita Sur-Kolay Advanced Computing and Microelectronic

More information

Introduction. Pvs.NPExample

Introduction. Pvs.NPExample Introduction Computer Science & Engineering 423/823 Design and Analysis of Algorithms Lecture 09 NP-Completeness (Chapter 34) Stephen Scott (Adapted from Vinodchandran N. Variyam) sscott@cse.unl.edu I

More information

Spring Lecture 21 NP-Complete Problems

Spring Lecture 21 NP-Complete Problems CISC 320 Introduction to Algorithms Spring 2014 Lecture 21 NP-Complete Problems 1 We discuss some hard problems: how hard? (computational complexity) what makes them hard? any solutions? Definitions Decision

More information

8.5 Sequencing Problems. Chapter 8. NP and Computational Intractability. Hamiltonian Cycle. Hamiltonian Cycle

8.5 Sequencing Problems. Chapter 8. NP and Computational Intractability. Hamiltonian Cycle. Hamiltonian Cycle Chapter 8 NP and Computational Intractability 8.5 Sequencing Problems Basic genres. Packing problems: SET-PACKING, INDEPENDENT SET. Covering problems: SET-COVER, VERTEX-COVER. Constraint satisfaction problems:

More information

Discrete Optimization 2010 Lecture 12 TSP, SAT & Outlook

Discrete Optimization 2010 Lecture 12 TSP, SAT & Outlook TSP Randomization Outlook Discrete Optimization 2010 Lecture 12 TSP, SAT & Outlook Marc Uetz University of Twente m.uetz@utwente.nl Lecture 12: sheet 1 / 29 Marc Uetz Discrete Optimization Outline TSP

More information

No Harder Than. We want these transformations to effectively be a problem-hardness version of #, which we will call No Harder Than.

No Harder Than. We want these transformations to effectively be a problem-hardness version of #, which we will call No Harder Than. No Harder Than We want these transformations to effectively be a problem-hardness version of #, which we will call No Harder Than. If we can reduce problem B to problem A appropriately, then we say that

More information

Chapter 8. NP and Computational Intractability. Slides by Kevin Wayne. Copyright 2005 Pearson-Addison Wesley. All rights reserved.

Chapter 8. NP and Computational Intractability. Slides by Kevin Wayne. Copyright 2005 Pearson-Addison Wesley. All rights reserved. Chapter 8 NP and Computational Intractability Slides by Kevin Wayne. Copyright 2005 Pearson-Addison Wesley. All rights reserved. 1 8.5 Sequencing Problems Basic genres.! Packing problems: SET-PACKING,

More information

There are two types of problems:

There are two types of problems: Np-complete Introduction: There are two types of problems: Two classes of algorithms: Problems whose time complexity is polynomial: O(logn), O(n), O(nlogn), O(n 2 ), O(n 3 ) Examples: searching, sorting,

More information

Chapter 3: Proving NP-completeness Results

Chapter 3: Proving NP-completeness Results Chapter 3: Proving NP-completeness Results Six Basic NP-Complete Problems Some Techniques for Proving NP-Completeness Some Suggested Exercises 1.1 Six Basic NP-Complete Problems 3-SATISFIABILITY (3SAT)

More information

Algorithm Design and Analysis

Algorithm Design and Analysis Algorithm Design and Analysis LECTURE 26 Computational Intractability Polynomial Time Reductions Sofya Raskhodnikova S. Raskhodnikova; based on slides by A. Smith and K. Wayne L26.1 What algorithms are

More information

CS 6505, Complexity and Algorithms Week 7: NP Completeness

CS 6505, Complexity and Algorithms Week 7: NP Completeness CS 6505, Complexity and Algorithms Week 7: NP Completeness Reductions We have seen some problems in P and NP, and we ve talked about space complexity. The Space Hierarchy Theorem showed us that there are

More information

CS21 Decidability and Tractability

CS21 Decidability and Tractability CS21 Decidability and Tractability Lecture 18 February 16, 2018 February 16, 2018 CS21 Lecture 18 1 Outline the complexity class NP 3-SAT is NP-complete NP-complete problems: independent set, vertex cover,

More information

Polynomial-time reductions. We have seen several reductions:

Polynomial-time reductions. We have seen several reductions: Polynomial-time reductions We have seen several reductions: Polynomial-time reductions Informal explanation of reductions: We have two problems, X and Y. Suppose we have a black-box solving problem X in

More information

P, NP, NP-Complete, and NPhard

P, NP, NP-Complete, and NPhard P, NP, NP-Complete, and NPhard Problems Zhenjiang Li 21/09/2011 Outline Algorithm time complicity P and NP problems NP-Complete and NP-Hard problems Algorithm time complicity Outline What is this course

More information

Essential facts about NP-completeness:

Essential facts about NP-completeness: CMPSCI611: NP Completeness Lecture 17 Essential facts about NP-completeness: Any NP-complete problem can be solved by a simple, but exponentially slow algorithm. We don t have polynomial-time solutions

More information

Theory of Computation Chapter 9

Theory of Computation Chapter 9 0-0 Theory of Computation Chapter 9 Guan-Shieng Huang May 12, 2003 NP-completeness Problems NP: the class of languages decided by nondeterministic Turing machine in polynomial time NP-completeness: Cook

More information

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

CS 320, Fall Dr. Geri Georg, Instructor 320 NP 1 NP CS 320, Fall 2017 Dr. Geri Georg, Instructor georg@colostate.edu 320 NP 1 NP Complete A class of problems where: No polynomial time algorithm has been discovered No proof that one doesn t exist 320

More information

COMP Analysis of Algorithms & Data Structures

COMP Analysis of Algorithms & Data Structures COMP 3170 - Analysis of Algorithms & Data Structures Shahin Kamali Computational Complexity CLRS 34.1-34.4 University of Manitoba COMP 3170 - Analysis of Algorithms & Data Structures 1 / 50 Polynomial

More information

NP and NP Completeness

NP and NP Completeness CS 374: Algorithms & Models of Computation, Spring 2017 NP and NP Completeness Lecture 23 April 20, 2017 Chandra Chekuri (UIUC) CS374 1 Spring 2017 1 / 44 Part I NP Chandra Chekuri (UIUC) CS374 2 Spring

More information

Intro to Theory of Computation

Intro to Theory of Computation Intro to Theory of Computation LECTURE 25 Last time Class NP Today Polynomial-time reductions Adam Smith; Sofya Raskhodnikova 4/18/2016 L25.1 The classes P and NP P is the class of languages decidable

More information

Chapter 3. Complexity of algorithms

Chapter 3. Complexity of algorithms Chapter 3 Complexity of algorithms In this chapter, we see how problems may be classified according to their level of difficulty. Most problems that we consider in these notes are of general character,

More information

Algorithm Design and Analysis

Algorithm Design and Analysis Algorithm Design and Analysis LECTURES 30-31 NP-completeness Definition NP-completeness proof for CIRCUIT-SAT Adam Smith 11/3/10 A. Smith; based on slides by E. Demaine, C. Leiserson, S. Raskhodnikova,

More information

Non-Deterministic Time

Non-Deterministic Time Non-Deterministic Time Master Informatique 2016 1 Non-Deterministic Time Complexity Classes Reminder on DTM vs NDTM [Turing 1936] (q 0, x 0 ) (q 1, x 1 ) Deterministic (q n, x n ) Non-Deterministic (q

More information

CS Fall 2011 P and NP Carola Wenk

CS Fall 2011 P and NP Carola Wenk CS3343 -- Fall 2011 P and NP Carola Wenk Slides courtesy of Piotr Indyk with small changes by Carola Wenk 11/29/11 CS 3343 Analysis of Algorithms 1 We have seen so far Algorithms for various problems Running

More information

4/30/14. Chapter Sequencing Problems. NP and Computational Intractability. Hamiltonian Cycle

4/30/14. Chapter Sequencing Problems. NP and Computational Intractability. Hamiltonian Cycle Chapter 8 NP and Computational Intractability Slides by Kevin Wayne. Copyright 2005 Pearson-Addison Wesley. All rights reserved. 1 2 Hamiltonian Cycle 8.5 Sequencing Problems HAM-CYCLE: given an undirected

More information

NP-COMPLETE PROBLEMS. 1. Characterizing NP. Proof

NP-COMPLETE PROBLEMS. 1. Characterizing NP. Proof T-79.5103 / Autumn 2006 NP-complete problems 1 NP-COMPLETE PROBLEMS Characterizing NP Variants of satisfiability Graph-theoretic problems Coloring problems Sets and numbers Pseudopolynomial algorithms

More information

1 Primals and Duals: Zero Sum Games

1 Primals and Duals: Zero Sum Games CS 124 Section #11 Zero Sum Games; NP Completeness 4/15/17 1 Primals and Duals: Zero Sum Games We can represent various situations of conflict in life in terms of matrix games. For example, the game shown

More information

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

CS154, Lecture 15: Cook-Levin Theorem SAT, 3SAT CS154, Lecture 15: Cook-Levin Theorem SAT, 3SAT Definition: A language B is NP-complete if: 1. B NP 2. Every A in NP is poly-time reducible to B That is, A P B When this is true, we say B is NP-hard On

More information

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

Limits to Approximability: When Algorithms Won't Help You. Note: Contents of today s lecture won t be on the exam Limits to Approximability: When Algorithms Won't Help You Note: Contents of today s lecture won t be on the exam Outline Limits to Approximability: basic results Detour: Provers, verifiers, and NP Graph

More information

Chapter 11. Approximation Algorithms. Slides by Kevin Wayne Pearson-Addison Wesley. All rights reserved.

Chapter 11. Approximation Algorithms. Slides by Kevin Wayne Pearson-Addison Wesley. All rights reserved. Chapter 11 Approximation Algorithms Slides by Kevin Wayne. Copyright @ 2005 Pearson-Addison Wesley. All rights reserved. 1 P and NP P: The family of problems that can be solved quickly in polynomial time.

More information

Complexity Theory VU , SS The Polynomial Hierarchy. Reinhard Pichler

Complexity Theory VU , SS The Polynomial Hierarchy. Reinhard Pichler Complexity Theory Complexity Theory VU 181.142, SS 2018 6. The Polynomial Hierarchy Reinhard Pichler Institut für Informationssysteme Arbeitsbereich DBAI Technische Universität Wien 15 May, 2018 Reinhard

More information

Outline. Complexity Theory EXACT TSP. The Class DP. Definition. Problem EXACT TSP. Complexity of EXACT TSP. Proposition VU 181.

Outline. Complexity Theory EXACT TSP. The Class DP. Definition. Problem EXACT TSP. Complexity of EXACT TSP. Proposition VU 181. Complexity Theory Complexity Theory Outline Complexity Theory VU 181.142, SS 2018 6. The Polynomial Hierarchy Reinhard Pichler Institut für Informationssysteme Arbeitsbereich DBAI Technische Universität

More information

Data Structures in Java

Data Structures in Java Data Structures in Java Lecture 21: Introduction to NP-Completeness 12/9/2015 Daniel Bauer Algorithms and Problem Solving Purpose of algorithms: find solutions to problems. Data Structures provide ways

More information

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

6.045: Automata, Computability, and Complexity (GITCS) Class 15 Nancy Lynch 6.045: Automata, Computability, and Complexity (GITCS) Class 15 Nancy Lynch Today: More Complexity Theory Polynomial-time reducibility, NP-completeness, and the Satisfiability (SAT) problem Topics: Introduction

More information

Algorithms. NP -Complete Problems. Dong Kyue Kim Hanyang University

Algorithms. NP -Complete Problems. Dong Kyue Kim Hanyang University Algorithms NP -Complete Problems Dong Kyue Kim Hanyang University dqkim@hanyang.ac.kr The Class P Definition 13.2 Polynomially bounded An algorithm is said to be polynomially bounded if its worst-case

More information

NP Completeness and Approximation Algorithms

NP Completeness and Approximation Algorithms Chapter 10 NP Completeness and Approximation Algorithms Let C() be a class of problems defined by some property. We are interested in characterizing the hardest problems in the class, so that if we can

More information

P and NP. Warm Up: Super Hard Problems. Overview. Problem Classification. Tools for classifying problems according to relative hardness.

P and NP. Warm Up: Super Hard Problems. Overview. Problem Classification. Tools for classifying problems according to relative hardness. Overview Problem classification Tractable Intractable P and NP Reductions Tools for classifying problems according to relative hardness Inge Li Gørtz Thank you to Kevin Wayne, Philip Bille and Paul Fischer

More information

Algorithm Design and Analysis

Algorithm Design and Analysis Algorithm Design and Analysis LECTURE 31 P and NP Self-reducibility NP-completeness Adam Smith 12/1/2008 S. Raskhodnikova; based on slides by K. Wayne Central ideas we ll cover Poly-time as feasible most

More information

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

NP-Completeness. CptS 223 Advanced Data Structures. Larry Holder School of Electrical Engineering and Computer Science Washington State University NP-Completeness CptS 223 Advanced Data Structures Larry Holder School of Electrical Engineering and Computer Science Washington State University 1 Hard Graph Problems Hard means no known solutions with

More information

CS/COE

CS/COE CS/COE 1501 www.cs.pitt.edu/~nlf4/cs1501/ P vs NP But first, something completely different... Some computational problems are unsolvable No algorithm can be written that will always produce the correct

More information

A An Overview of Complexity Theory for the Algorithm Designer

A An Overview of Complexity Theory for the Algorithm Designer A An Overview of Complexity Theory for the Algorithm Designer A.1 Certificates and the class NP A decision problem is one whose answer is either yes or no. Two examples are: SAT: Given a Boolean formula

More information

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

Lecture #14: NP-Completeness (Chapter 34 Old Edition Chapter 36) Discussion here is from the old edition. Lecture #14: 0.0.1 NP-Completeness (Chapter 34 Old Edition Chapter 36) Discussion here is from the old edition. 0.0.2 Preliminaries: Definition 1 n abstract problem Q is a binary relations on a set I of

More information

CSI 4105 MIDTERM SOLUTION

CSI 4105 MIDTERM SOLUTION University of Ottawa CSI 4105 MIDTERM SOLUTION Instructor: Lucia Moura Feb 6, 2010 10:00 am Duration: 1:50 hs Closed book Last name: First name: Student number: There are 4 questions and 100 marks total.

More information

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

NP-Completeness. Dr. B. S. Panda Professor, Department of Mathematics IIT Delhi, Hauz Khas, ND-16 NP-Completeness Dr. B. S. Panda Professor, Department of Mathematics IIT Delhi, Hauz Khas, ND-16 bspanda1@gmail.com 1 Decision Problem A problem whose answer is either yes or no ( 1 or 0) Examples: HC

More information

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

CSE 3500 Algorithms and Complexity Fall 2016 Lecture 25: November 29, 2016 CSE 3500 Algorithms and Complexity Fall 2016 Lecture 25: November 29, 2016 Intractable Problems There are many problems for which the best known algorithms take a very long time (e.g., exponential in some

More information