1 / 40

6. The Most Difficult NP Problems: The Class NPC

6. The Most Difficult NP Problems: The Class NPC. Polynomial transformation: Given function such that iff . If the function is computable in time that is polynomial in the length of the encoding of , then is said to be polynomially transformable to .

tacey
Download Presentation

6. The Most Difficult NP Problems: The Class NPC

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 6. The Most Difficult NP Problems: The Class NPC • Polynomial transformation: Given function such that iff. If the function is computable in time that is polynomial in the length of the encoding of , then is said to be polynomially transformable to . (notation: ( in language term)) • Note that means that is no easier than in terms of polynomial time solvability. If we can solve in polynomial time (find ‘yes’, ‘no’ answer using deterministic algorithm), then we can answer whether any given instance of is ‘yes’ or ‘no’ in polynomial time. But, the converse may not hold.

  2. Polynomial reduction: is polynomially reducible to if algorithm for that uses algorithm for as a subroutine and runs in polynomial time assuming each call to the subroutine takes unit time. ( recall Opt and Feas for 0-1 IP problem) ( transformation is a special case of reduction) • Polynomial transformation also called Karp reduction,  (GJ). Polynomial reduction called Turing reduction, (GJ). • Prop: If is polynomially transformable (reducible) to , and , then . • Def:is a special case of if and . ( Use identity transformation .)

  3. Def: is said to be complete if all problems in can be polynomially reduced (transformed) to . The set of complete problems is denoted by . • complete problem is the hardest problem in since the existence of a polynomial time algorithm for any complete problem implies that all the problems in can be solved in polynomial time. • Prop 6.3: If is complete, then iff. ( ) Pf) and . poly time alg. for any problem in . Hence . Also . So .  • Prop 6.4: If is complete, and , then is complete. ( Be careful about the direction of the transformation.)

  4. Is ? • First complete problem found: Satisfiability problem (Cook, 1971) Given a set of Boolean variables and a collection of clauses over , is there a satisfying truth assignment for ? ( Is there a truth assignment to ? ) ( : and, : or ) ex) Given , a truth assignment is true, false, false • Thm 6.5: (Cook) The satisfiability problem (SAT) is complete. Pf) polynomial transformation of any NDTM into the satisfiability problem. (GJ, pp.38-44)

  5. Prop 6.6: 0-1 IP feasibility problem is complete. Pf) clearly in . Let each clause be . Then (SAT) is satisfiableiff is feasible. We have a function that transforms any instance of (SAT) to an in stance of 0-1 IP feasibility.  • Note that we transform an arbitrary instance of (SAT) to a (specific) instance of 0-1 IP feasibilty, which depends on the given instance of (SAT). The rationale is that if there exists an efficient algorithm to solve any instance of 0-1 IP feasibility, we can apply the algorithm to the transformed instance to solve any arbitrary instance of (SAT). So it is unlikely that such efficient algorithm for 0-1 IP feasibility exists since the existence of such algorithm implies that we can solve (SAT) easily and solve all problems in easily.

  6. Boundary between and : 0-1 matrix. • two 1’s in each column of (node-edge incidence matrix) : matching problem • Three 1’s in each column • One 1 in each row • Two 1’s in each row (edge-node incidence matrix) : node packing problem • Be careful about the distinction between the feasibility problem itself and the 0-1 IP formulation.

  7. Unweighted node packing problem (independent set, stable set): Given a graph such that and is a node packing? • Prop 6.7: The lower bound feasibility problem for unweighted node packing is complete. Pf) in . transform from (SAT) ex) 1 {1, 2} {3} 2 {2, 3} {4} 3 {4} {1, 2} 4 {3}  clauses  vars set {1, 3} = ‘true’, {2, 4} = ‘false’ (1, 1) (5, 3) (2, 1) (7, 1) (6, 3) (3, 4) (3, 2) (4, 3) (8, 2) (2, 2)

  8. Then the given instance of (SAT) has truth assignment iff node packing of size . • Note that is set depending on the given instance of (SAT). It is not an arbitrary number. • If we want to claim that IP feasibility formulation of node packing lower bound feasibility is complete, we need to transform the node packing to the IP formulation.

  9. Clique: Given is called a clique if . (complete subgraph of G) • Clique problem: Given and positive integer , a clique of size • Prop: Clique problem is complete Pf) in . Independent set (node packing) clique Given an instance of node packing construct . Set Then is an independent set for iff is a clique for . Hence has an independent set of size iff has a clique of size . 

  10. Vertex cover: Given is called a vertex cover if all edges in are incident to at least one vertex in . • Vertex cover problem:Given a vertex cover of size (complete) Pf) in . clique vertex cover Given an arbitrary instance of clique construct an instance of vertex cover. Construct and set . Then is a clique of size in is a vertex cover of size in . () nodes in not connected by edges in . edges in incident to at least one node in . vertex cover in . () every edge in is incident to at least one node in no edge in connects nodes in . clique in . 

  11. Relation between node packing (independent set), clique, vertex cover: • is a vertex cover for . • is a node packing for . • is a clique in .

  12. Six Basic NP-complete Problems (GJ) • 3-Satisfiability (3SAT) Instance: Collection of clauses on a finite set of variables such that for . Question : Is there a truth assignment for that satisfies all the clauses in • Dimensional Matching (3DM) Instance : A set where and are disjoint sets having the same number of elements. Question : Does contain a matching, that is, a subset such that and no two elements of agree in any coordinate ? (generalization of marriage problem.)

  13. Vertex Cover • Clique • Hamiltonian Circuit: Instance : A graph Question : Does contain a Hamiltonian circuit, that is, an ordering of the vertices of , where such that and for all • Partition: Instance : A finite set and a “size” for each . Question : Is there a subset such that

  14. Proving NP-completeness • Set partitioning feasibility problem : Given an matrix , is • Prop 6. 8: Set partitioning feasibility problem is complete. Pf) In . Lower bound feasibility problem for unweighted node packing Set partitioning feasibility problem Given an instance of node packing let be matrix defined as follows. ( is edge-node incidence matrix of .)

  15. feasible pick distinct columns of s node packing of size . Similarly, for converse. Hence node packing of set partitioning feasible with columns (variables)  • Prop 6. 9: The set partitioning feasibility feasibility problem in which matrix has, at most, three 1’s per column is complete.

  16. 2 • Ex) 1 3 4

  17. Subset sum problem: Given an integer , integral vector and integer , is • Prop 6.10: The subset sum problem is complete. Pf) in . Set partitioning feasibility problem subset sum. Given an 0-1 matrix , construct an instance of subset sum as follows. ( j-th column of A is representation of aj using (n+1) symbols.)

  18. 0-1 knapsack lower bound feasibility problem: Given an integer , integral vectors and and integers and , is (complete) Pf) in . Subset sum problem can be reformulated as . Hence it is a special case of 0-1 knapsack lower bound feasibility. Since special case is complete, more general case is complete. ( recall the definition of special case. It is identity transformation ( or any obvious one-to-one correspondence between the instances.) (special case also called “restriction” and one of the easiest and widely used proving techniques.) • Note that 0-1 knapsack is not a special case of integer knapsack.

  19. More examples of Restriction • Variants of Hamiltonian Circuit : • Hamiltonian Path: Same as HC except that we drop the requirement that the first and the last vertices in the sequence be joined by an edge. • Hamiltonian Path between Two Points: same as HP except that two points are given as input and the question is whether contains a HP beginning with and ending with . • All three problems complete • For directed graph? transform each undirected problem to a directed problem by replacing each edge of by two parallel arcs of opposite direction. Undirected version is a special case of directed version.

  20. Bounded Degree Spanning Tree : Instance : A graph and a positive integer . Question : Is there a spanning tree for in which no vertex has degree exceeding that is, a subset such that the graph is connected, and no vertex in is included in more than edges from Restrict to Hamiltonian Path by allowing only instances in which . HP is a special case of BDST with .

  21. Multiprocessor Scheduling: Instance : A finite set of ‘tasks’, a ‘length’ for each a number of ‘processors’, and a ‘deadline’ . Question : Is there a partition of into disjoint sets such that max Restrict to partition by allowing only instances in which and .

  22. Longest Path: Instance : Graph positive integer Question : Does contain a simple path (that is, a path encountering no vertex more that once) with or more edges ? Restrict to Hamiltonian Path, i.e. set • Set Packing: Instance : Collection of finite sets, positive integer Question : Does contain disjoint sets ? Restrict to Exact Cover by Sets, i.e. restrict for all and .

  23. Exact Cover by Sets (X3C): (complete) Instance : A finite set with and a collection of 3-element subsets of . Question : Does contain an exact cover for that is, a subcollection of such that every element of occurs in exactly one member of Note that 3DM is a restricted version of X3C, hence X3C is complete. Compare to NW p115, 117 in representing the problems.

  24. Proving Traveling Salesman Problem is complete. Instance : Set of cities, distance for each pair of cities , a positive integer . Question : Is there a tour of having length or less, i.e., a permutation of such that Pf) In . HC TSP Given construct an instance of TSP as follows. Let . Let if and if . Set . Then has a HC iff TSP has a tour with length . 

  25. If , then . ( i.e. there are problems of intermediate difficulty.) is called (Intermediate) • Note • Members in not equivalent in terms of polynomial transformation. ( infinite number of equivalent classes.) • Only artificial examples known. Have been looking for natural problems in . • Composite number, LP regarded as candidates in . • Composite Number : Given positive integer are there integers such that

  26. Note that composite number is in and its complementary problem (Primes) is to check the primality of a given prime number. There exists a short proof to check primality. Hence Composite Number is in . So it is unlikely that composite number is complete by Prop 6.12. Composite number was proven to be in in 2002. NP NPC NPI P

  27. CoNP NP NPC • Prop 6. 12: If then (It is unlikely that any problem in is complete) Pf) If there exists polynomial transformation such that for Since . For an instance in maintains ‘yes’ ‘no’ answer after the transformation. If a ‘no’ instance in is given, we can apply to it, and obtain an instance in which has ‘no’ answer. Since we can verify the ‘no’ by polynomial time NDTM. So ‘no’ instance in can be verified Similarly, for the other direction.  P

  28. Status of Open Problems in GJ • Source : Pulleyblank, MPS 2000 tutorial • 1. Graph Isomorphism open 2. Subgraph homeomorphism for a fixed graph 3. Graph genus complete 4. Chordal graph completion complete 5. Chromatic index complete 6. Spanning tree parity 7. Partial Order Dimension complete 8. Precedence constrained 3-processor schedu open 9. Linear Programming 10. Total Unimodularity 11. Composite number open () 12. Minimum length triangulation open

  29. NP-complete in the strong sense (strongly NP-complete) • Refer GJ. p90 - • Recall that algorithm for 0-1 knapsack problem (also subset sum). Though 0-1 knapsack feasibility is complete, is less formidable than . If is small (polynomial of ), the algorithm runs in polynomial time for the restricted case. called pseudo-polynomial time algorithm. • Q) pseudo-polynomial time algorithms for other complete problems involving numbers like ? e.g.) TSP feasibility, Multiprocessor scheduling. • Problems like clique, vertex cover do not have pseudo-polynomial time algorithms. • Some problems involving numbers do not have even pseudo-polynomial time algorithms.

  30. For each instance of decision problem , define the functions Length[]: length of encoding of . Max]: magnitude of largest number in . (not the size of encoding) • Def: An algorithm for is called a pseudo-polynomial time algorithm for if its time complexity function is bounded above by a polynomial function of Length[] and Max[]. (In NW, polynomial running time in unary encoding ) • Def: A problem is called a number problem if there exists no polynomial such that Max[] (Length[]) for all e.g) knapsack, partition

  31. Let be subproblem of restricted to instances such that Max[](Length[]) . Then if pseudo-polynomial time algorithm for solvable in polynomial time. • Def: A decision problem is complete in the strong sense (strongly complete)if is in and there exists a polynomial function for which is complete. It is the problem class for which there might not exist even pseudo-polynomial time algorithms. If a problem is not a number problem and complete, then it is automatically strongly complete. • NW: Feasibility problem is called strongly complete if the existence of a pseudo-polynomial time algorithm for it implies .

  32. Ex) 0-1 IP feasibility with coefficients 0, +1, -1 (transformation from satisfiability, size of numbers in r.h.s. also small) TSP: HC TSP. Edge weights 1 or 2 . Hence, all instances with this transformation satisfy Max[I](Length[]) and complete. So TSP is strongly complete (Length[] 3-Partition: Instance: A finite set of elements, a bound and a ‘size’ for each such that satisfies and such that . Question : Can be partitioned into disjoint sets such that, for

  33. Multiprocessor Scheduling Sequencing within intervals: Instance: A finite set of ‘tasks’ and, for each an integer ‘release time’ a ‘deadline’ and a ‘length’ Question: Does there exist a feasibleschedule for , that is, a function such that, for each and, if then either or

  34. Proving strong completeness by considering restricted problem may be tedious. Use pseudo-polynomial transformation from a strongly complete problem. • Def: A pseudo-polynomial transformation from to is a function : such that • For all if and only if • can be computed in time polynomial in the two variables Max[] and Length[], • a polynomial such that, for all (Length’[]) Length[] ( size of transformed length does not shrink too much.) • a two variable polynomial such that, for all Max’[] (Max[], Length[]) ( magnitude of the largest number does not blow up exponentially)

  35. Lemma: If is complete in the strong sense, and there exists a pseudo-polynomial transformation from to then is complete in the strong sense. • Note that the transformation from set partitioning feasibility (which is strongly complete) to subset sum is not a pseudo-polynomial transformation. Max’[] ( is not bounded by any poly function of Length[] ( ). Hence the existence of pseudo-polynomial time algorithm for subset sum cannot be ruled out. Also, if is complete and and if there exists a pseudo-polynomial time algorithm for , it does not necessarily imply the existence of a pseudo-polynomial time algorithm for .

  36. NP-hard Problems • GJ Chapter 5 • Search problem : Given an instance return string , such that or decide no such string exists. (: set of solutions for ) ( Decision problem may be regarded as a special case of search problem by defining {‘yes’} if and if ) • Def: A polynomial time Turing reduction (or simply Turing reduction) from a search problem to a search problem is an algorithm that solves by using a hypothetical subroutine for solving such that, if were a polynomial time algorithm for , then would be a polynomial time algorithm for (the subroutine may be used many times and and need not be feasibility problems)

  37. Def: A search problem is hard if there exists an complete problem such that (Turing reducible) ( is at least as hard as complete problem and is search problem (optimization problem) • Recall (0-1 IP FEAS) (0-1 IP OPT) • Def:A search problem is called easy if there exists a such that ( search problem is no harder than complete problems. Recall (0-1 IP OPT) (0-1 IP FEAS) )

  38. A search problem is called equivalent if both hard and easy. (has the same degree of difficulty as an complete problem in terms of polynomial time solvability.) To show that an optimization problem is difficult to solve (hard), it is enough to show that the corresponding feasibility problem is complete and the optimization problem is Turing reducible from the feasibility problem (usually trivial). Some people use the term complete for optimization problems too.

  39. Optimization and Separation • Relates the complexity of a class of optimization problem over certain polyhedra with the separation problem for the polyhedra. • Optimization, separation trivial if is given explicitly. But if polyhedron is given as conv() where is set of feasible solutions, the story is different. ex) for node packing is nontrivial if is fractional. • Separation problem: Given is If not, find an inequality satisfied by all points in but violated by the point .

  40. Thm: Optimization problem over a class of polyhedra is polynomially solvable if and only if the separation problem for the polyhedra is polynomiallly solvable.

More Related