NP-Completeness. NP-Completeness 1

Size: px
Start display at page:

Download "NP-Completeness. NP-Completeness 1"

Transcription

1 NP-Completeness Reference: Computers and Intractability: A Guide to the Theory of NP-Completeness by Garey and Johnson, W.H. Freeman and Company, NP-Completeness 1 General Problems, Input Size and Time Complexity Time complexity of algorithms : polynomial time algorithm ("efficient algorithm") v.s. exponential time algorithm ("inefficient algorithm") f(n) \ n n sec sec sec n sec 24.3 sec 5.2 mins 2 n sec 17.9 mins 35.7 yrs NP-Completeness 2 1

2 Hard and easy Problems Sometimes the dividing line between easy and hard problems is a fine one. For example Find the shortest path in a graph from X to Y. (easy) Find the longest path in a graph from X to Y. (with no cycles) (hard) View another way as yes/no problems Is there a simple path from X to Y with weight <= M? (easy) Is there a simple path from X to Y with weight >= M? (hard) First problem can be solved in polynomial time. All known algorithms for the second problem (could) take exponential time. NP-Completeness 3 Decision problem: The solution to the problem is "yes" or "no". Most optimization problems can be phrased as decision problems (still have the same time complexity). Example : Assume we have a decision algorithm X for 0/1 Knapsack problem with capacity M, i.e. Algorithm X returns Yes or No to the question is there a solution with profit P subject to knapsack capacity M? NP-Completeness 4 2

3 We can repeatedly run algorithm X for various profits(p values) to find an optimal solution. Example : Use binary search to get the optimal profit, maximum of lg p i runs. (where M is the capacity of the knapsack optimization problem) Min Bound Optimal Profit Max Bound 0 Search for the optimal solution p i NP-Completeness 5 The Classes of P and NP The class P and Deterministic Turing Machine Given a decision problem X, if there is a polynomial time Deterministic Turing Machine program that solves X, then X is belong to P Informally, there is a polynomial time algorithm to solve the problem NP-Completeness 6 3

4 The class NP and Non-deterministic Turing Machine Given a decision problem X, if there is a polynomial time Non-deterministic Turing machine program that solves X, then X belongs to NP Given a decision problem X. For every instance I of X, (a) guess solution S for I, and (b) check is S a solution to I?. If (a) and (b) can be done in polynomial time, then X belongs to NP. NP-Completeness 7 Obvious : P NP, i.e. A problem in P does not need guess solution. The correct solution can be computed in polynomial time. NP P Some problems which are in NP, but may not in P : 0/1 Knapsack Problem PARTITION Problem : Given a finite set of positive integers Z. Question : Is there a subset Z' of Z such that Sum of all numbers in Z' = Sum of all numbers in Z-Z'? i.e. Z' = (Z-Z') NP-Completeness 8 4

5 One of the most important open problem in theoretical compute science : Is P=NP? Most likely No. Currently, there are many known problems in NP, and there is no solution to show anyone of them in P. NP-Completeness 9 NP-Complete Problems Stephen Cook introduced the notion of NP- Complete Problems. This makes the problem P = NP? much more interesting to study. The following are several important things presented by Cook : NP-Completeness 10 5

6 1. Polynomial Transformation (" ") L1 L2 : There is a polynomial time transformation that transforms arbitrary instance of L1 to some instance of L2. If L1 L2 then L2 is in P implies L1 is in P (or L1 is not in P implies L2 is not in P) If L1 L2 and L2 L3 then L1 L3 NP-Completeness Focus on the class of NP decision problems only. Many intractable problems, when phrased as decision problems, belong to this class. L NP 3. L is NP-Complete if L NP and for all other L' NP, L' L If a problem in NP-complete can be solved in polynomial time then all problems in NP can be solved in polynomial time. If a problem in NP cannot be solved in polynomial time then all problems in NP-complete cannot be solved in polynomial time. Note that an NP-complete problem is one of those hardest problems in NP. NP-Completeness 12 6

7 So, if an NP-complete problem is in P then P=NP if P!= NP then all NP-complete problems are in NP-P Question : how can we obtain the first NP-complete problem L? 4. Cook Theorem : SATISFIABILITY is NP- Complete. (The first NP-Complete problem) Instance : Given a set of variables, U, and a collection of clauses, C, over U. Question : Is there a truth assignment for U that satisfies all clauses in C? NP-Completeness 13 Example : U = {x 1, x 2 } C 1 = {(x 1, x 2 ), ( x 1, x 2 )} = (x 1 OR x 2 ) AND ( x 1 OR x 2 ) if x 1 = x 2 = True C 1 = True C 2 = (x 1, x 2 ) (x 1, x 2 ) ( x 1 ) not satisfiable x i = not x i OR = logical or AND = logical and This problem is also called CNF-Satisfiability since the expression is in CNF Conjunctive Normal Form (the product of sums). NP-Completeness 14 7

8 With the Cook Theorem, we have the following property : Lemma : If L1 and L2 belong to NP, L1 is NP-complete, and L1 L2 then L2 is NPcomplete. i.e. L1, L2 NP and for all other L' NP, L' L1 and L1 L2 L' L2 NP-Completeness 15 So now, to prove a problem L to be NPcomplete problem, we need to show L is in NP select a known NP-complete problem L' construct a polynomial time transformation f from L' to L prove the correctness of f (i.e. L has a solution if and only if L has a solution) and that f is a polynomial transformation NP-Completeness 16 8

9 P: Problems solvable by deterministic algorithms in polynomial time NP: Problems solved by non-deterministic algorithms in polynomial time A group of problems, including all of the ones we have discussed NP-Complete (Satisfiability, 0/1 Knapsack, Longest Path, Partition) have an additional important property: NP If any of them can be solved P in polynomial time, then they all can! These problems are called NP-complete problems. NP-Completeness 17 Some NP-complete problems : SATISFIABILITY 0/1 Knapsack PARTITION Two-Processor Non-Preemptive Schedule Length CLIQUE : An undirected graph G=(V, E) and a positive integer J V Question : Does G contain a clique (complete subgraph) of size J or more? NP-Completeness 18 9

10 Proving NP-Completeness Results Example 1 : Show that the PARTITION problem is NP-complete. Given a known NPC problem - Sum of Subset Problem (SS), show that PARTITION problem is NPC. SS Problem Instance : Let A = {a 1, a 2,, a n } be a set of n positive numbers. Question : Given M, is there a subset A' A such that A' = M NP-Completeness 19 PARTITION Problem Instance : Given a finite set of m positive integers Z. Question : Is there a subset Z' Z such that Z' = (Z-Z') PARTITION is in NP guess a subset Z' verify Z' = (Z-Z')? O(m) O(m) Total O(m) NP-Completeness 20 10

11 SS PARTITION Given an arbitrary instance of SS, i.e. A = {a 1, a 2,, a n } and M, Construct an instance of PARTITION as follows : B={b 1, b 2,, b n, b n+1, b n+2 } of m = n+2 positive numbers where b i = a i for 1 i n b n+1 = M + 1 b n+2 = A + (1 M) Note : b i = 2 A + 2. Also, the transformation can be done in polynomial time (based on input size of A & M) NP-Completeness 21 To show the transformation is correct : The SS problem has a solution if and only if the PARTITION problem has a solution. If SS problem has a solution, then the PARTITION problem has a solution assume A' is the solution for SS problem then Z' = A' {b n+2 } and Z-Z' =A-A' {b n+1 } Z' = M + A + (1 M) = A + 1 = (Z-Z') NP-Completeness 22 11

12 If the PARTITION problem has a solution then the SS problem has a solution if Z' is the solution then Z' = A + 1 exactly one of b n+2 or b n+1 Z' if b n+2 Z' then Z' { b n+2 } = A' and A' = M if b n+1 Z', then use Z - Z' to obtain A' NP-Completeness 23 Example 2 : Show that the Traveling Salesman (TS) Problem is NP-complete. Given a known NPC problem - Hamiltonian Circuit (HC), show that TS problem is NPC. Hamiltonian Circuit (HC) problem Instance : Give an undirected graph G=(V, E) Question : Does G contain a Hamiltonian circuit, i.e. a sequence < v 1, v 2,, v n > of all vertices in V which is a simple cycle. NP-Completeness 24 12

13 Traveling Salesman (TS) Problem Instance : Give an undirected complete graph G=(V, E) with distance d(i,j) 0 for each edge (i,j) for i j and a positive integer B. Question : Is there a tour of all cities (a simple cycle with all vertices) having total distance no more than B. TS is in NP guess a tour, i.e. sequence of all vertices verify that it is a cycle covering all vertices and total distance B O( V ) O( V ) NP-Completeness 25 HC TS Given arbitrary instance of HC, i.e. G=(V, E). Construct an instance of TS as follows : G = (V, E ), where (u,v) E for all u, v V and u v d(u,v) = 0 if (u,v) E d(u,v) = 1 if (u,v) E and B = 0 Note : The transformation can be done in polynomial time (based on input size of V and E) NP-Completeness 26 13

14 To show the transformation is correct : The HC problem has a solution if and only if the TS problem has a solution. If HC problem has a solution, then TS problem has a solution Assume a < v 1, v 2,, v n > is the solution for HC It is a simple cycle which contains all vertices Each edge (u,v) in this cycle has d(u,v) = 0 Total distance is 0 Solution for TS If TS problem has a solution then HC problem has a solution Obvious to see. NP-Completeness 27 Example 3 : Show that the Vertex Cover (VC) Problem is NP-complete. Given 3SAT problem is NPC, show that VC problem is NPC. 3SAT Problem Instance : Given a set of variables U = {u 1, u 2,, u n } and a collection of clauses C = {c 1, c 2,, c m } over U such that c i = 3 for 1 i m. Question : Is there a truth assignment for U that satisfies all clauses in C? Note : 3SAT problem is a restricted problem of SATISFIABILITY problem. NP-Completeness 28 14

15 Vertex Cover (VC) Problem Instance : Given an undirected graph G=(V, E) and a positive integer K V Question : Is there a vertex cover of size K or less for G, i.e. a subset V V such that V K and, for each (u,v) E, at least one of u or v V. VC is in NP guess a set of vertices V V verify that V K and, for each (u,v) E, u V or v V O( V ) O( V + E ) NP-Completeness 29 3SAT VC Given arbitrary instance of 3SAT, i.e. U = {u 1, u 2,, u n } and C = {c 1, c 2,, c m }. Construct an instance of VC as follows : G = (V, E ) and K = n+2m V = V u V c V u ={u 1t, u 1f, u 2t, u 2f,, u nt, u nf } and V c = {a 11, a 12, a 13 } {a 21, a 22, a 23 } {a m1, a m2, a m3 } NP-Completeness 30 15

16 E = E u E c E uc E u ={(u 1t, u 1f ), (u 2t, u 2f ),, (u nt, u nf )} E c = {(a 11, a 12 ), (a 12, a 13 ), (a 13, a 11 )} {(a m1, a m2 ), (a m2, a m3 ), (a m3, a m1 )} Assume c i = (x i, y i, z i ) for 1 i m, find the corresponding vertices, x i, y i, z i, in V u E uc = {(x 1, a 11 ), (y 1, a 12 ), (z 1, a 13 )} {(x m, a m1 ), (y m, a m2 ), (z m, a m3 )} NP-Completeness 31 V = 2n+3m and E = n+3m+3m The transformation can be done in polynomial time (based on input size n and m) Example : U = {u 1, u 2, u 3, u 4 } and C = {{u 1, u 3, u 4 }, E {u 1, u 2, u 4 }} u u 1t u 1f u 2t u 2f u 3t u 3f u 4t u 4f E E uc E c a 11 a 12 a 13 a 21 a 22 a 23 NP-Completeness 32 16

17 Major Property : if there is a vertex cover set V K = n+2m, then a) V = n+ 2m, and b) V must include exactly 1 vertex in {u it, u if } for 1 i n from V u and at exactly 2 vertices in {a i1, a i2, a i3 } for 1 i m from V c, i.e. n vertices from V u and 2m vertices from V c Look at edges in E u and E c, a vertex cover set V must include at least 1 vertex {u it, u if } for 1 i n, and at least 2 vertices from {a i1, a i2, a i3 } for 1 i m. Since V K V = K NP-Completeness 33 To show the transformation is correct : The 3SAT problem has a solution if and only if the VC problem has a solution. If VC problem has a solution then 3SAT problem has a solution From the above property, V contains n vertices from V u and 2m vertices from V c From V u, the truth assignment for {u 1, u 2,, u n } in 3SAT is u i = T if u it V u i = F if u if V for 1 i n NP-Completeness 34 17

18 To see that this is a solution for 3SAT : we must show that for each c i = (x i, y i, z i ), there is at least one variable i {x i, y i, z i } which set c i to TRUE, 1 i n From the above property, exactly 2 vertices from {a i1, a i2, a i3 } in V, for 1 i m only cover 2 edges from {(x i, a i1 ), (y i, a i2 ), (z i, a i3 )} from E uc assume the edge (x i, a i1 ) is not covered by 2 vertices from {a i1, a i2, c i3 } then x i V since V is a vertex cover set x i set the clause c i to True for 1 i n NP-Completeness 35 If the 3SAT problem has a solution, then the VC problem has a solution The vertex cover set V with exactly n+2m vertices can be obtained as follows : From the truth assignment for {u 1, u 2,, u n } in 3SAT, we get n vertices from V u, i.e. u it V if u i = T; otherwise u if V for 1 i n This covers all edges in E u and at least one edge in {(x i, a i1 ), (y i, a i2 ), (z i, a i3 )} for 1 i m From V c, include 2 vertices from each {a i1, a i2, a i3 } into V, for 1 i m. These 2 vertices cover all edges {(a i1, a i2 ), (a i2, a i3 ), (a i3, a i1 )} and also cover edges in E uc that are not covered previously. NP-Completeness 36 18

19 Example 4 : Show that the Square Packing (SP) Problem is NP-complete. Motivation : truck loading, processor allocation problem in a partitionable mesh connected system, the design of VLSI chips and etc. Square Packing Problem Given a packing square S and a set of packed squares L = {s 1, s 2,..., s n }. Question : is there and orthogonal packing of L into S? Note : orthogonal packing the sides of squares are parallel to the vertical and horizontal axes NP-Completeness 37 3-Partition Problem Given a list A = {a 1, a 2,..., a 3z } of 3z positive integers such that sum of all numbers is zb and B/4 < a i < B/2 for each 1 i 3z. Question : Can A be partitioned into z groups such that the sum of all numbers in each group is B. Note : each group must have exactly 3 numbers Proof : Refer to the following research paper Leung, Tam, Wong, and Chin, Packing Squares into a Square, Journal of Parallel and Distributed Computing, NP-Completeness 38 19

20 Coping with NP-Completeness Problem NP-hard Problem Note : Refer to Chapter 5 of Garey and Johnson If L' L and L' is an NP-complete problem then L is called NP-hard problem. All NPC problems are NP-hard. NP-Completeness 39 There are some NP-hard decision problems that are not in NP. Example : K th Largest Subset Problem is not in NP Instance : Given a set of positive integers A = {a 1, a 2,, a n }, and two non-negative numbers, B A and K 2 A. Question : Are there at least K distinct subsets A A such that each subset has total sum >= B. Note : PARTITION problem K th Largest Subset Problem NP-Completeness 40 20

21 Pseudo-polynomial time algorithm Note : Refer to Chapter 4 of Garey and Johnson Some NP-complete problem may be solved in "polynomial" time (based on input size and magnitude). Example : PARTITION problem NP-Completeness 41 Dynamic Programming Algorithm : assume B = (sum of n integers)/2 construct a table of size (approx.) n x B fill in the table row by row for each row, add a new element mark sum of all possible subsets if there is a subset with sum = B, stop. Time Complexity : O(nB) NP-Completeness 42 21

22 NP-completeness in the strong sense Note : Refer to Chapter 4 of Garey and Johnson If L is NP-complete problem in the strong sense, then L cannot be solved by a pseudo-polynomial time algorithm unless P=NP L is NP-complete in the strong sense if L' L, L' is NP-complete in the strong sense and L is in NP Example : 3-partition problem is NPC in the strong sense. NP-Completeness 43 Solving more restricted problems If we restricted the problem L to problem L' i.e. L' is a special/restricted case of L, then we may solve L' in polynomial time. For example : PARTITION problem if we assume that each input integer a i n, where n is the number of input integers, then the pseudo polynomial time algorithm becomes polynomial time algorithm, i.e. O(n 3 ) NP-Completeness 44 22

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

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

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

Computers and Intractability. The Bandersnatch problem. The Bandersnatch problem. The Bandersnatch problem. A Guide to the Theory of NP-Completeness

Computers and Intractability. The Bandersnatch problem. The Bandersnatch problem. The Bandersnatch problem. A Guide to the Theory of NP-Completeness Computers and Intractability A Guide to the Theory of NP-Completeness The Bible of complexity theory Background: Find a good method for determining whether or not any given set of specifications for a

More information

Computers and Intractability

Computers and Intractability Computers and Intractability A Guide to the Theory of NP-Completeness The Bible of complexity theory M. R. Garey and D. S. Johnson W. H. Freeman and Company, 1979 The Bandersnatch problem Background: Find

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

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

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

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

Computational complexity theory

Computational complexity theory Computational complexity theory Introduction to computational complexity theory Complexity (computability) theory deals with two aspects: Algorithm s complexity. Problem s complexity. References S. Cook,

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

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 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

CMSC 441: Algorithms. NP Completeness

CMSC 441: Algorithms. NP Completeness CMSC 441: Algorithms NP Completeness Intractable & Tractable Problems Intractable problems: As they grow large, we are unable to solve them in reasonable time What constitutes reasonable time? Standard

More information

NP-completeness. Chapter 34. Sergey Bereg

NP-completeness. Chapter 34. Sergey Bereg NP-completeness Chapter 34 Sergey Bereg Oct 2017 Examples Some problems admit polynomial time algorithms, i.e. O(n k ) running time where n is the input size. We will study a class of NP-complete problems

More information

Computational complexity theory

Computational complexity theory Computational complexity theory Introduction to computational complexity theory Complexity (computability) theory deals with two aspects: Algorithm s complexity. Problem s complexity. References S. Cook,

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

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

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

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

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

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

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-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

Unit 1A: Computational Complexity

Unit 1A: Computational Complexity Unit 1A: Computational Complexity Course contents: Computational complexity NP-completeness Algorithmic Paradigms Readings Chapters 3, 4, and 5 Unit 1A 1 O: Upper Bounding Function Def: f(n)= O(g(n)) if

More information

Undecidable Problems. Z. Sawa (TU Ostrava) Introd. to Theoretical Computer Science May 12, / 65

Undecidable Problems. Z. Sawa (TU Ostrava) Introd. to Theoretical Computer Science May 12, / 65 Undecidable Problems Z. Sawa (TU Ostrava) Introd. to Theoretical Computer Science May 12, 2018 1/ 65 Algorithmically Solvable Problems Let us assume we have a problem P. If there is an algorithm solving

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

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-Completeness. Until now we have been designing algorithms for specific problems

NP-Completeness. Until now we have been designing algorithms for specific problems NP-Completeness 1 Introduction Until now we have been designing algorithms for specific problems We have seen running times O(log n), O(n), O(n log n), O(n 2 ), O(n 3 )... We have also discussed lower

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

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

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

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

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

CS311 Computational Structures. NP-completeness. Lecture 18. Andrew P. Black Andrew Tolmach. Thursday, 2 December 2010 CS311 Computational Structures NP-completeness Lecture 18 Andrew P. Black Andrew Tolmach 1 Some complexity classes P = Decidable in polynomial time on deterministic TM ( tractable ) NP = Decidable in polynomial

More information

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

In complexity theory, algorithms and problems are classified by the growth order of computation time as a function of instance size. 10 2.2. CLASSES OF COMPUTATIONAL COMPLEXITY An optimization problem is defined as a class of similar problems with different input parameters. Each individual case with fixed parameter values is called

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

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

4. How to prove a problem is NPC

4. How to prove a problem is NPC The reducibility relation T is transitive, i.e, A T B and B T C imply A T C Therefore, to prove that a problem A is NPC: (1) show that A NP (2) choose some known NPC problem B define a polynomial transformation

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

Admin NP-COMPLETE PROBLEMS. Run-time analysis. Tractable vs. intractable problems 5/2/13. What is a tractable problem?

Admin NP-COMPLETE PROBLEMS. Run-time analysis. Tractable vs. intractable problems 5/2/13. What is a tractable problem? Admin Two more assignments No office hours on tomorrow NP-COMPLETE PROBLEMS Run-time analysis Tractable vs. intractable problems We ve spent a lot of time in this class putting algorithms into specific

More information

NP-Complete Problems and Approximation Algorithms

NP-Complete Problems and Approximation Algorithms NP-Complete Problems and Approximation Algorithms Efficiency of Algorithms Algorithms that have time efficiency of O(n k ), that is polynomial of the input size, are considered to be tractable or easy

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

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

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

Computational Complexity

Computational Complexity Computational Complexity Problems, instances and algorithms Running time vs. computational complexity General description of the theory of NP-completeness Problem samples 1 Computational Complexity What

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

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

Tractable & Intractable Problems

Tractable & Intractable Problems Tractable & Intractable Problems We will be looking at : What is a P and NP problem NP-Completeness The question of whether P=NP The Traveling Salesman problem again Programming and Data Structures 1 Polynomial

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

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

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

Tractability. Some problems are intractable: as they grow large, we are unable to solve them in reasonable time What constitutes reasonable time? Tractability Some problems are intractable: as they grow large, we are unable to solve them in reasonable time What constitutes reasonable time?» Standard working definition: polynomial time» On an input

More information

CSC 1700 Analysis of Algorithms: P and NP Problems

CSC 1700 Analysis of Algorithms: P and NP Problems CSC 1700 Analysis of Algorithms: P and NP Problems Professor Henry Carter Fall 2016 Recap Algorithmic power is broad but limited Lower bounds determine whether an algorithm can be improved by more than

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

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

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

an efficient procedure for the decision problem. We illustrate this phenomenon for the Satisfiability problem. 1 More on NP In this set of lecture notes, we examine the class NP in more detail. We give a characterization of NP which justifies the guess and verify paradigm, and study the complexity of solving search

More information

Automata Theory CS Complexity Theory I: Polynomial Time

Automata Theory CS Complexity Theory I: Polynomial Time Automata Theory CS411-2015-17 Complexity Theory I: Polynomial Time David Galles Department of Computer Science University of San Francisco 17-0: Tractable vs. Intractable If a problem is recursive, then

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

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

Algorithms Design & Analysis. Approximation Algorithm

Algorithms Design & Analysis. Approximation Algorithm Algorithms Design & Analysis Approximation Algorithm Recap External memory model Merge sort Distribution sort 2 Today s Topics Hard problem Approximation algorithms Metric traveling salesman problem A

More information

2 COLORING. Given G, nd the minimum number of colors to color G. Given graph G and positive integer k, is X(G) k?

2 COLORING. Given G, nd the minimum number of colors to color G. Given graph G and positive integer k, is X(G) k? 2 COLORING OPTIMIZATION PROBLEM Given G, nd the minimum number of colors to color G. (X(G)?) DECISION PROBLEM Given graph G and positive integer k, is X(G) k? EQUIVALENCE OF OPTIMAIZTION AND DE- CISION

More information

CSCI3390-Lecture 17: A sampler of NP-complete problems

CSCI3390-Lecture 17: A sampler of NP-complete problems CSCI3390-Lecture 17: A sampler of NP-complete problems 1 List of Problems We now know that if L is any problem in NP, that L P SAT, and thus SAT is NP-hard. Since SAT is also in NP we find that SAT is

More information

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

CS Lecture 29 P, NP, and NP-Completeness. k ) for all k. Fall The class P. The class NP CS 301 - Lecture 29 P, NP, and NP-Completeness Fall 2008 Review Languages and Grammars Alphabets, strings, languages Regular Languages Deterministic Finite and Nondeterministic Automata Equivalence of

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

Instructor N.Sadagopan Scribe: P.Renjith. Lecture- Complexity Class- P and NP

Instructor N.Sadagopan Scribe: P.Renjith. Lecture- Complexity Class- P and NP Indian Institute of Information Technology Design and Manufacturing, Kancheepuram Chennai 600 127, India An Autonomous Institute under MHRD, Govt of India http://www.iiitdm.ac.in COM 501 Advanced Data

More information

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

Harvard CS 121 and CSCI E-121 Lecture 22: The P vs. NP Question and NP-completeness Harvard CS 121 and CSCI E-121 Lecture 22: The P vs. NP Question and NP-completeness Harry Lewis November 19, 2013 Reading: Sipser 7.4, 7.5. For culture : Computers and Intractability: A Guide to the Theory

More information

Graph Theory and Optimization Computational Complexity (in brief)

Graph Theory and Optimization Computational Complexity (in brief) Graph Theory and Optimization Computational Complexity (in brief) Nicolas Nisse Inria, France Univ. Nice Sophia Antipolis, CNRS, I3S, UMR 7271, Sophia Antipolis, France September 2015 N. Nisse Graph Theory

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

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

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

P is the class of problems for which there are algorithms that solve the problem in time O(n k ) for some constant k. Complexity Theory Problems are divided into complexity classes. Informally: So far in this course, almost all algorithms had polynomial running time, i.e., on inputs of size n, worst-case running time

More information

Computability and Complexity Theory

Computability and Complexity Theory Discrete Math for Bioinformatics WS 09/10:, by A Bockmayr/K Reinert, January 27, 2010, 18:39 9001 Computability and Complexity Theory Computability and complexity Computability theory What problems can

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

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

Discrete Optimization 2010 Lecture 10 P, N P, and N PCompleteness 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 Outline 1 N P and co-n P 2 N P-completeness

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

Outline. 1 NP-Completeness Theory. 2 Limitation of Computation. 3 Examples. 4 Decision Problems. 5 Verification Algorithm

Outline. 1 NP-Completeness Theory. 2 Limitation of Computation. 3 Examples. 4 Decision Problems. 5 Verification Algorithm Outline 1 NP-Completeness Theory 2 Limitation of Computation 3 Examples 4 Decision Problems 5 Verification Algorithm 6 Non-Deterministic Algorithm 7 NP-Complete Problems c Hu Ding (Michigan State University)

More information

DESIGN AND ANALYSIS OF ALGORITHMS. Unit 6 Chapter 17 TRACTABLE AND NON-TRACTABLE PROBLEMS

DESIGN AND ANALYSIS OF ALGORITHMS. Unit 6 Chapter 17 TRACTABLE AND NON-TRACTABLE PROBLEMS DESIGN AND ANALYSIS OF ALGORITHMS Unit 6 Chapter 17 TRACTABLE AND NON-TRACTABLE PROBLEMS http://milanvachhani.blogspot.in COMPLEXITY FOR THE IMPATIENT You are a senior software engineer in a large software

More information

Unit 6 Chapter 17 TRACTABLE AND NON-TRACTABLE PROBLEMS

Unit 6 Chapter 17 TRACTABLE AND NON-TRACTABLE PROBLEMS DESIGN AND ANALYSIS OF ALGORITHMS Unit 6 Chapter 17 TRACTABLE AND NON-TRACTABLE PROBLEMS http://milanvachhani.blogspot.in COMPLEXITY FOR THE IMPATIENT You are a senior software engineer in a large software

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

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

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

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

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

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

The Complexity of Maximum. Matroid-Greedoid Intersection and. Weighted Greedoid Maximization Department of Computer Science Series of Publications C Report C-2004-2 The Complexity of Maximum Matroid-Greedoid Intersection and Weighted Greedoid Maximization Taneli Mielikäinen Esko Ukkonen University

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

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

Notes for Lecture 21

Notes for Lecture 21 U.C. Berkeley CS170: Intro to CS Theory Handout N21 Professor Luca Trevisan November 20, 2001 Notes for Lecture 21 1 Tractable and Intractable Problems So far, almost all of the problems that we have studied

More information

INTRO TO COMPUTATIONAL COMPLEXITY

INTRO TO COMPUTATIONAL COMPLEXITY MA/CSSE 473 Day 38 Problems Decision Problems P and NP Polynomial time algorithms INTRO TO COMPUTATIONAL COMPLEXITY 1 The Law of the Algorithm Jungle Polynomial good, exponential bad! The latter is obvious,

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

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

Data Structures and Algorithms (CSCI 340)

Data Structures and Algorithms (CSCI 340) University of Wisconsin Parkside Fall Semester 2008 Department of Computer Science Prof. Dr. F. Seutter Data Structures and Algorithms (CSCI 340) Homework Assignments The numbering of the problems refers

More information

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

COMP/MATH 300 Topics for Spring 2017 June 5, Review and Regular Languages COMP/MATH 300 Topics for Spring 2017 June 5, 2017 Review and Regular Languages Exam I I. Introductory and review information from Chapter 0 II. Problems and Languages A. Computable problems can be expressed

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

NP-Completeness. NP-Completeness 1

NP-Completeness. NP-Completeness 1 NP-Completeness x x x 2 x 2 x 3 x 3 x 4 x 4 2 22 32 3 2 23 3 33 NP-Completeness Outline and Reading P and NP ( 3.) Definition of P Definition of NP Alternate definition of NP NP-completeness ( 3.2) Definition

More information

Show that the following problems are NP-complete

Show that the following problems are NP-complete Show that the following problems are NP-complete April 7, 2018 Below is a list of 30 exercises in which you are asked to prove that some problem is NP-complete. The goal is to better understand the theory

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

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

NP-Completeness Theory

NP-Completeness Theory NP-Completeness Theory The topics we discussed so far are positive results: Given a problem, how to design efficient algorithms for solving it. NP-Completeness (NPC for sort) Theory is negative results.

More information

VIII. NP-completeness

VIII. NP-completeness VIII. NP-completeness 1 / 15 NP-Completeness Overview 1. Introduction 2. P and NP 3. NP-complete (NPC): formal definition 4. How to prove a problem is NPC 5. How to solve a NPC problem: approximate algorithms

More information

Giving a step-by-step reduction from SAT to TSP and giving some remarks on Neil Tennant's Changes of Mind

Giving a step-by-step reduction from SAT to TSP and giving some remarks on Neil Tennant's Changes of Mind Faculty of Mathematics and Natural Sciences Giving a step-by-step reduction from SAT to TSP and giving some remarks on Neil Tennant's Changes of Mind Bachelor Thesis Mathematics July 2014 Student: M.M.

More information

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

Artificial Intelligence. 3 Problem Complexity. Prof. Dr. Jana Koehler Fall 2016 HSLU - JK Artificial Intelligence 3 Problem Complexity Prof. Dr. Jana Koehler Fall 2016 Agenda Computability and Turing Machines Tractable and Intractable Problems P vs. NP Decision Problems Optimization problems

More information