Topics in Complexity Theory

Size: px
Start display at page:

Download "Topics in Complexity Theory"

Transcription

1 Topics in Complexity Theory

2 Announcements Final exam this Friday from 12:15PM-3:15PM Please let us know immediately after lecture if you want to take the final at an alternate time and haven't yet told us. Final exam review session today after lecture in lieu of normal problem session. Problem Set 7 graded, but unfortunately we can't hand them back today. We'll get them returned ASAP.

3 Approximation Algorithms

4 Decision vs. Function Problems All of the problems we have encountered this quarter are decision problems with yes/no answers. Many interesting questions do not have yes/no answers: What is 1 + 1? How many steps does it take this TM to halt on this string? What is the shortest path from u to v? These questions are called function problems and require some object to be found.

5 NP-Hard Function Problems Some function problems are NP-hard: there is a polynomial-time reduction from any problem in NP to those problems. Need a slightly different definition of a reduction in this case, but we'll skip that for now. Examples: What is the largest independent set in a graph? What is the length of the longest path in a graph? What is the minimum number of colors required to color a graph? A polynomial-time solver for any of these could be used to build a polynomial-time decider for any problem in NP.

6 NP-Hard Function Problems The maximum independent set problem (MAX-INDSET) is Given a graph G, find an independent set S in G of the largest possible size. MAX-INDSET is NP-hard by a reduction from independent set: M = On input G, k : Find a maximum independent set in G, call it S. If S k, accept; otherwise, reject.

7 NP-Hard Function Problems Because they can be used to solve any problem in NP, NP-hard function problems are believed to be computationally infeasible. If any NP-hard function problem has a polynomialtime solution, then P = NP. Since the P = NP question is still open, no NP-hard function problems are known to have polynomial-time solutions.

8 Approximation Algorithms An approximation algorithm is an algorithm for yielding a solution that is close to the correct solution to a problem. The definition of close depends on the problem: Maximum independent set: Find an independent set that is not much smaller than the maximum independent set. Longest path: Find a long path that is not much smaller than the longest path. Graph coloring: Find a coloring of the graph that does not use many more colors than the optimal coloring.

9 How Good is an Approximation? Approximation algorithms are only useful if there is some connection between the approximate answer and the real answer. We say that an approximation algorithm is a k-approximation if its answer is always within a factor of k of the optimal solution. A 2-approximation to the graph coloring problem always finds a coloring that uses at most twice the optimal number of colors. A 2/3-approximation to the longest path problem always finds a path that is at least 2/3 as long as the optimal path.

10 Why Approximations Matter A classic NP-hard problem is job scheduling. Given a set of tasks and a set of workers to perform the tasks, how do you distribute tasks to workers to minimize the total time required (assuming the workers work in parallel?) Applications to manufacturing, operating systems, etc. Although finding an optimal solution is NP-hard, there are polynomial-time algorithms for finding 4/3-approximate solutions. If we just need a good enough answer, the NPhardness of job scheduling is not a deterrent to its use.

11 A Hamiltonian cycle in an undirected graph G is a simple cycle that visits every node in G.

12 A Hamiltonian cycle in an undirected graph G is a simple cycle that visits every node in G.

13 A Hamiltonian cycle in an undirected graph G is a simple cycle that visits every node in G.

14 A Hamiltonian cycle in an undirected graph G is a simple cycle that visits every node in G.

15 A Hamiltonian cycle in an undirected graph G is a simple cycle that visits every node in G.

16 Hamiltonian Cycles The undirected Hamiltonian cycle problem is Given an undirected graph G, does G contain a Hamiltonian cycle? As a formal language: UHAMCYCLE = { G G is an undirected graph containing a Hamiltonian cycle } Important fact: UHAMCYCLE is NP-complete. Reduction from UHAMPATH.

17 Given a complete, undirected, weighted graph G, the traveling salesman problem (TSP) is to find a Hamiltonian cycle in G of least total cost.

18 Given a complete, undirected, weighted graph G, the traveling salesman problem (TSP) is to find a Hamiltonian cycle in G of least total cost.

19 Given a complete, undirected, weighted graph G, the traveling salesman problem (TSP) is to find a Hamiltonian cycle in G of least total cost.

20 Cost: Given a complete, undirected, weighted graph G, the traveling salesman problem (TSP) is to find a Hamiltonian cycle in G of least total cost.

21 Given a complete, undirected, weighted graph G, the traveling salesman problem (TSP) is to find a Hamiltonian cycle in G of least total cost.

22 Cost: Given a complete, undirected, weighted graph G, the traveling salesman problem (TSP) is to find a Hamiltonian cycle in G of least total cost.

23 Given a complete, undirected, weighted graph G, the traveling salesman problem (TSP) is to find a Hamiltonian cycle in G of least total cost.

24 Cost: Given a complete, undirected, weighted graph G, the traveling salesman problem (TSP) is to find a Hamiltonian cycle in G of least total cost.

25 Cost: 39 (This is the optimal solution) 15 Given a complete, undirected, weighted graph G, the traveling salesman problem (TSP) is to find a Hamiltonian cycle in G of least total cost.

26 TSP, Formally Given as input A complete, undirected graph G, and a set of edge weights, which are positive integers, the TSP is to find a Hamiltonian cycle in G with least total weight. Note that since G is complete, there has to be at least one Hamiltonian cycle. The challenge is finding the least-cost cycle.

27 TSP There are many variations on TSP: Directed versus undirected graphs. Complete versus incomplete graphs. Finding a path versus finding a cycle. Nonnegative weights versus arbitrary weights. All of these problems are known to be NP-hard. The best-known exact algorithms have horrible runtimes: O(n 2 2 n ).

28 TSP There are many variations on TSP: Directed versus undirected graphs. Complete versus incomplete graphs. Finding a path versus finding a cycle. Nonnegative weights versus arbitrary weights. All of these problems are known to be NP-hard. The best-known exact algorithms have horrible runtimes: O(n 2 2 n ).

29 TSP is NP-Hard To show that TSP is NP-hard, we reduce the undirected Hamiltonian cycle problem to TSP.

30 TSP is NP-Hard To show that TSP is NP-hard, we reduce the undirected Hamiltonian cycle problem to TSP.

31 TSP is NP-Hard To show that TSP is NP-hard, we reduce the undirected Hamiltonian cycle problem to TSP.

32 TSP is NP-Hard To show that TSP is NP-hard, we reduce the undirected Hamiltonian cycle problem to TSP.

33 TSP is NP-Hard To show that TSP is NP-hard, we reduce the undirected Hamiltonian cycle problem to TSP. Cost 1 Cost 2

34 TSP is NP-Hard To show that TSP is NP-hard, we reduce the undirected Hamiltonian cycle problem to TSP. Cost 1 Cost 2 If there is a Hamiltonian cycle in the original graph, there is a TSP solution of cost n in the new graph (where n is the number of nodes) If there is no Hamiltonian path, the TSP solution has cost at least n.

35 TSP is NP-Hard To show that TSP is NP-hard, we reduce the undirected Hamiltonian cycle problem to TSP. Cost 1 Cost 2 If there is a Hamiltonian cycle in the original graph, there is a TSP solution of cost n in the new graph (where n is the number of nodes) If there is no Hamiltonian cycle, the TSP solution has cost at least n + 1.

36 Answering TSP TSP has great practical importance, and we want to be able to answer it. Determining the shortest subway routes to link stations in a ring. Determining the fastest way to move a mechanical drill so it can drill in the appropriate locations. Because TSP is NP-hard, obtaining an exact answer is impractically hard. Can we approximate it?

37 Approximating TSP An approximation algorithm to TSP is a k-approximation if it finds a Hamiltonian cycle whose cost is at most k times the optimal solution. If the optimal solution has cost 10, a 2-approximation would return a Hamiltonian cycle of cost between 10 and 20, inclusive. If the optimal solution has cost 10, a 3-approximation would return a Hamiltonian cycle of cost between 10 and 30, inclusive. For what values of k is there an efficient k-approximation to TSP?

38 Theorem: If P NP, then there is no polynomial-time k-approximation to TSP for any natural number k.

39 Hardness of Approximation The proof that TSP is hard to approximate is based on a beautiful construction: If we could obtain a k-approximation to TSP in polynomial-time, we would have a polynomial-time algorithm for UHAMCYCLE. Since UHAMCYCLE is NP-complete, this is a contradiction if P NP.

40 The Construction Proof Sketch: Suppose, for the sake of contradiction, that there is a k-approximation to TSP for some k.

41 The Construction Proof Sketch: Suppose, for the sake of contradiction, that there is a k-approximation to TSP for some k.

42 The Construction Proof Sketch: Suppose, for the sake of contradiction, that there is a k-approximation to TSP for some k.

43 The Construction Proof Sketch: Suppose, for the sake of contradiction, that there is a k-approximation to TSP for some k. Cost 1 Cost??

44 The Construction Proof Sketch: Suppose, for the sake of contradiction, that there is a k-approximation to TSP for some k. If the original graph of n nodes has a Hamiltonian cycle, the TSP solution has cost n. The k-approximation algorithm thus must hand back a Hamiltonian cycle of cost at most kn. Cost 1 Cost?? What if we made the cost of the red edges so large that any solution using them must cost more than this?

45 The Construction Proof Sketch: Suppose, for the sake of contradiction, that there is a k-approximation to TSP for some k. If the original graph of n nodes has a Hamiltonian cycle, the TSP solution has cost n. The k-approximation algorithm thus must hand back a Hamiltonian cycle of cost at most kn. Cost 1 Cost?? What if we made the cost of the red edges so large that any solution using them must cost more than this?

46 The Construction Proof Sketch: Suppose, for the sake of contradiction, that there is a k-approximation to TSP for some k. If the original graph of n nodes has a Hamiltonian cycle, the TSP solution has cost n. The k-approximation algorithm thus must hand back a Hamiltonian cycle of cost at most kn. Cost 1 Cost?? What if we made the cost of the red edges so large that any solution using them must cost more than this?

47 The Construction Proof Sketch: Suppose, for the sake of contradiction, that there is a k-approximation to TSP for some k. If the original graph of n nodes has a Hamiltonian cycle, the TSP solution has cost n. The k-approximation algorithm thus must hand back a Hamiltonian cycle of cost at most kn. Cost 1 Cost kn + 1 What if we made the cost of the red edges so large that any solution using them must cost more than this?

48 The Construction Proof Sketch: Suppose, for the sake of contradiction, that there is a k-approximation to TSP for some k. Cost 1 Cost kn + 1

49 The Construction Proof Sketch: Suppose, for the sake of contradiction, that there is a k-approximation to TSP for some k. If the k-approximation hands back a solution of cost at most kn, the original graph has a Hamiltonian cycle. Cost 1 Cost kn + 1 If the k-approximation hands back a solution of cost at least kn + 1, the original graph has no Hamiltonian cycles.

50 The Construction Proof Sketch: Suppose, for the sake of contradiction, that there is a k-approximation to TSP for some k. If the k-approximation hands back a solution of cost at most kn, the original graph has a Hamiltonian cycle. Cost 1 Cost kn + 1 If the k-approximation hands back a solution of cost at least kn + 1, the original graph has no Hamiltonian cycles.

51 What Just Happened?

52 Cost of optimal TSP solution What Just Happened?

53 What Just Happened? Cost of optimal TSP solution Cost of a yes answer.

54 What Just Happened? Cost of the best possible no answer. Cost of optimal TSP solution Cost of a yes answer.

55 What Just Happened? Cost of the best possible no answer. Cost of optimal TSP solution k times the cost of a yes answer. Cost of a yes answer.

56 What Just Happened? Cost of the best possible no answer. Cost of optimal TSP solution k times the cost of a yes answer. Cost of a yes answer.

57 What Just Happened? Cost of the best possible no answer. Cost of optimal TSP solution k times the cost of a yes answer. Cost of a yes answer.

58 What Just Happened? Create an enormous gap between the TSP answer for yes and no instances of the Hamiltonian cycle problem. Make the gap so large that the worst possible k-approximate answer to a yes instance is distinguishable from the best possible no instance. Decide whether there is a Hamiltonian cycle by measuring this difference.

59 The PCP Theorem

60 Approximating 3SAT 3SAT is one of the canonical NP-complete problems. What would it mean to approximate a 3SAT answer?

61 Approximating 3SAT The MAX-3SAT problem is Given a 3CNF formula φ, find a satisfying assignment the maximizes the number of satisfied clauses. Idea: If we can satisfy the entire formula, then MAX- 3SAT finds a satisfying assignment. If not, MAX-3SAT finds the best assignment that it can. There is a known randomized 7/8-approximation algorithm for MAX-3SAT. Is it possible to do better?

62 The 3-CNF Value If φ is a 3-CNF formula, the value of φ (denoted val(φ)) is the fraction of the clauses of φ that can be simultaneously satisfied by any assignment. If φ is satisfiable, val(φ) = 1. All of the clauses are satisfiable. If φ is unsatisfiable, val(φ) < 1. Some (but not all) clauses can be satisfied.

63 The PCP Theorem For any language L NP, There exists a poly-time reduction f from L to MAX-3SAT so For any string w: If w L, then val(f( w)) = 1. If w L, then val(f( w)) 7/8.

64 The PCP Theorem For any language L NP, There exists a poly-time reduction f from L to MAX-3SAT so For any string w: If w L, then val(f( w)) = 1. If the original answer is yes, the 3-CNF formula is satisfiable. If w L, then val(f( w)) 7/8.

65 The PCP Theorem For any language L NP, There exists a poly-time reduction f from L to MAX-3SAT so For any string w: If w L, then val(f( w)) = 1. If the original answer is yes, the 3-CNF formula is satisfiable. If w L, then val(f( w)) 7/8. If the original answer is no, at most 7/8 of the clauses can be satisfied.

66 What Does This Mean? Our proof that (unless P = NP) TSP cannot be efficiently approximated works by building up a gap between yes answers and no answers. The PCP theorem states that any problem in NP can be reduced to MAX-3SAT such that All of the clauses are satisfiable if the original answer is yes. At most 7/8 of the clauses are satisfiable if the answer is no. This gap of 1/8 of the clauses is large enough to preclude approximations beyond the known 7/8-approximation.

67 Theorem: If P NP, then for any r > 7/8, there is no polynomial-time r-approximation to MAX-3SAT.

68 MAX-3SAT is Inapproximable Theorem: If P NP, then for any r > 7/8, there is no polynomial-time r-approximation to MAX-3SAT.

69 MAX-3SAT is Inapproximable Theorem: If P NP, then for any r > 7/8, there is no polynomial-time r-approximation to MAX-3SAT. Fraction of Satisfiable Clauses

70 MAX-3SAT is Inapproximable Fraction satisfiable in a yes answer Theorem: If P NP, then for any r > 7/8, there is no polynomial-time r-approximation to MAX-3SAT. Fraction of Satisfiable Clauses

71 MAX-3SAT is Inapproximable Fraction satisfiable in a yes answer 7/8 Fraction satisfiable in a no answer Theorem: If P NP, then for any r > 7/8, there is no polynomial-time r-approximation to MAX-3SAT. Fraction of Satisfiable Clauses

72 MAX-3SAT is Inapproximable Fraction satisfiable in a yes answer r times the fraction satisfiable in a yes answer 7/8 Fraction satisfiable in a no answer Theorem: If P NP, then for any r > 7/8, there is no polynomial-time r-approximation to MAX-3SAT. Fraction of Satisfiable Clauses

73 MAX-3SAT is Inapproximable Fraction satisfiable in a yes answer r times the fraction satisfiable in a yes answer 7/8 Fraction satisfiable in a no answer Theorem: If P NP, then for any r > 7/8, there is no polynomial-time r-approximation to MAX-3SAT. Fraction of Satisfiable Clauses

74 Effects on Approximability Assuming P NP, there is a limit to how well we can approximate 3SAT. Look at our reduction from 3SAT to INDSET: ( x y z ) ( x y z ) ( x y z )

75 Effects on Approximability Assuming P NP, there is a limit to how well we can approximate 3SAT. Look at our reduction from 3SAT to INDSET: ( x y z ) ( x y z ) ( x y z )

76 Effects on Approximability Assuming P NP, there is a limit to how well we can approximate 3SAT. Look at our reduction from 3SAT to INDSET: ( x y z ) ( x y z ) ( x y z ) y y y x z x z x z

77 Effects on Approximability Many reductions preserve the size of some difficult-toapproximate quantity. Assuming if P NP: Because MAX-3SAT is not efficiently 7/8-approximable, MAX-INDSET is not efficiently 7/8-approximable either. Because MAX-INDSET is not efficiently 7/8-approximable, MAX-CLIQUE is not efficiently 7/8-approximable. Because MAX-INDSET is not efficiently ρ-approximable, MAX-SETPACK is not efficiently 7/8-approximable. Not all reductions have this property; some NP-hard problems can be efficiently approximated to very high precision.

78 Oh, and a proof of the PCP theorem?

79 Oh, and a proof of the PCP theorem?

80 Summary of Approximability While many NP-hard problems can be efficiently approximated, certain NP-hard problems cannot unless P = NP. Efficiently approximating some NP-hard problems too well would solve NP-complete problems. The PCP theorem states that the gap between yes and no answers can be so large that approximating the solution would essentially solve the problem.

81 Beyond P and NP

82 co-np P NP

83 The Class co-np The complexity class co-np is the set of languages whose complements are in NP. Formally, L co-np iff L NP. Intuition: A language is in NP iff it can be verified efficiently. A language is in co-np iff it can be refuted efficiently.

84 Problems in co-np The problem Is φ satisfiable? (SAT) is a classic NP problem. We can easily verify that φ is satisfiable given a satisfying assignment. Finding that satisfying assignment might be hard. The problem Is φ a tautology? (TAUT) is a classic co-np problem. We can easily refute that φ is a tautology given an unsatisfying assignment. Finding that unsatisfying assignment might be hard.

85 Problems in co-np The problem does a graph contain a k-clique? is in NP. Can just check that a candidate clique is a k-clique. Finding that k-clique might be hard. The problem does a graph not contain a k- clique? is in co-np. If we are given a k-clique in a graph, we can refute that a graph does not contain a k-clique. Finding that k-clique might be hard.

86 NP co-np It is unknown whether NP = co-np. If P = NP, then NP = co-np. If NP co-np, then P NP. If P NP, it is possible that NP = co-np. co-np P NP

87 Beyond P, NP, and co-np

88 L NP iff poly-time verifier V for L. What is a poly-time verifier? w L iff V is a poly-time verifier for L iff poly-sized x. V accepts w, x in poly-time. Notation: p x means poly-sized x. V is a poly-time verifier for L iff w L iff p x. V accepts w, x in poly-time. Since V runs in polynomial time, this means that L( V) P. Consequently: L NP iff L' P. w L iff p x. w, x L'.

89 L NP iff poly-time verifier V for L. What is a poly-time verifier? w L iff V is a poly-time verifier for L iff poly-sized x. V accepts w, x in poly-time. Notation: p x means poly-sized x. V is a poly-time verifier for L iff w L iff p x. V accepts w, x in poly-time. Since V runs in polynomial time, this means that L( V) P. Consequently: L NP iff L' P. w L iff p x. w, x L'.

90 L NP iff poly-time verifier V for L. What is a poly-time verifier? w L iff V is a poly-time verifier for L iff poly-sized x. V accepts w, x in poly-time. Notation: p x means poly-sized x. V is a poly-time verifier for L iff w L iff p x. V accepts w, x in poly-time. Since V runs in polynomial time, this means that L( V) P. Consequently: L NP iff L' P. w L iff p x. w, x L'.

91 L NP iff poly-time verifier V for L. What is a poly-time verifier? w L iff V is a poly-time verifier for L iff poly-sized x. V accepts w, x in poly-time. Notation: p x means poly-sized x. V is a poly-time verifier for L iff w L iff p x. V accepts w, x in poly-time. Since V runs in polynomial time, this means that L( V) P. Consequently: L NP iff L' P. w L iff p x. w, x L'.

92 L NP iff poly-time verifier V for L. What is a poly-time verifier? w L iff V is a poly-time verifier for L iff poly-sized x. V accepts w, x in poly-time. Notation: p x means poly-sized x. V is a poly-time verifier for L iff w L iff p x. V accepts w, x in poly-time. Since V runs in polynomial time, this means that L( V) P. Consequently: L NP iff L' P. w L iff p x. w, x L'.

93 L NP iff poly-time verifier V for L. What is a poly-time verifier? w L iff V is a poly-time verifier for L iff poly-sized x. V accepts w, x in poly-time. Notation: p x means poly-sized x. V is a poly-time verifier for L iff w L iff p x. V accepts w, x in poly-time. Since V runs in polynomial time, this means that L( V) P. Consequently: L NP iff L' P. w L iff p x. w, x L'.

94 L NP iff poly-time verifier V for L. What is a poly-time verifier? w L iff V is a poly-time verifier for L iff poly-sized x. V accepts w, x in poly-time. Notation: p x means poly-sized x. V is a poly-time verifier for L iff w L iff p x. V accepts w, x in poly-time. Since V runs in polynomial time, this means that L( V) P. Consequently: L NP iff L' P. w L iff p x. w, x L'.

95 L co-np iff L NP. Consequently: L co-np iff L' P. w L iff p x. w, x L' Equivalently: L co-np iff L' P. w L iff p x. w, x L' P is closed under complementation. L co-np iff L' P. w L iff p x. w, x L'

96 L co-np iff L NP. Consequently: L co-np iff L' P. w L iff p x. w, x L' Equivalently: L co-np iff L' P. w L iff p x. w, x L' P is closed under complementation. L co-np iff L' P. w L iff p x. w, x L'

97 L co-np iff L NP. Consequently: L co-np iff L' P. w L iff p x. w, x L' Equivalently: L co-np iff L' P. w L iff p x. w, x L' P is closed under complementation. L co-np iff L' P. w L iff p x. w, x L'

98 L co-np iff L NP. Consequently: L co-np iff L' P. w L iff p x. w, x L' Equivalently: L co-np iff L' P. w L iff p x. w, x L' P is closed under complementation. L co-np iff L' P. w L iff p x. w, x L'

99 L co-np iff L NP. Consequently: L co-np iff L' P. w L iff p x. w, x L' Equivalently: L co-np iff L' P. w L iff p x. w, x L' P is closed under complementation. L co-np iff L' P. w L iff p x. w, x L'

100 L co-np iff L NP. Consequently: L co-np iff L' P. w L iff p x. w, x L' Equivalently: L co-np iff L' P. w L iff p x. w, x L' P is closed under complementation. L co-np iff L' P. w L iff p x. w, x L'

101 L co-np iff L NP. Consequently: L co-np iff L' P. w L iff p x. w, x L' Equivalently: L co-np iff L' P. w L iff p x. w, x L' P is closed under complementation. L co-np iff L' P. w L iff p x. w, x L'

102 L co-np iff L NP. Consequently: L co-np iff L' P. w L iff p x. w, x L' Equivalently: L co-np iff L' P. w L iff p x. w, x L' P is closed under complementation. L co-np iff L' P. w L iff p x. w, x L'

103 L co-np iff L NP. Consequently: L co-np iff L' P. w L iff p x. w, x L' Equivalently: L co-np iff L' P. w L iff p x. w, x L' P is closed under complementation. Thus L co-np iff L' P. w L iff p x. w, x L'

104 L P iff there is a poly-time decider for L. L NP iff L' P. w L iff p x. w, x L' L co-np iff L' P. w L iff p x. w, x L'

105 The Polynomial Hierarchy Let Σ 0 P = P Let Π 0 P = P P Σ n+1 = { L L' P Π n+1 = { L L' Π np. w L iff p x. w, x L' } Σ np. w L iff p x. w, x L' } Examples: Σ 1 P = NP Π 1 P = co-np

106 The Polynomial Hierarchy Let Σ 0 P = P Let Π 0 P = P P Σ n+1 = { L L' P Π n+1 = { L L' Π np. w L iff p x. w, x L' } Σ np. w L iff p x. w, x L' } Examples: Σ 1 P = NP Π 1 P = co-np

107 The Polynomial Hierarchy Let Σ 0 P = P Let Π 0 P = P P Σ n+1 = { L L' P Π n+1 = { L L' Π np. w L iff p x. w, x L' } Σ np. w L iff p x. w, x L' } Examples: Σ 1 P = NP Π 1 P = co-np

108 The Polynomial Hierarchy

109 The Polynomial Hierarchy P

110 The Polynomial Hierarchy P Σ 1 P

111 The Polynomial Hierarchy Π 1 P P Σ 1 P

112 The Polynomial Hierarchy Π 1 P P Σ 1 P Σ 2 P

113 The Polynomial Hierarchy Π 2 P Π 1 P P Σ 1 P Σ 2 P

114 The Polynomial Hierarchy Π 2 P Π 1 P P Σ 1 P Σ 2 P Σ 3 P

115 The Polynomial Hierarchy Π 3 P Π 2 P Π 1 P P Σ 1 P Σ 2 P Σ 3 P

116 Um, what? Consider the following decision problem: Is there exactly one k-clique in a graph G? This problem is not known to be in either NP nor co-np. However, it is in Σ 2 P and Π 2P. G, k L iff clique. sets of k nodes. The clique is a valid k-clique and no other set is. G, k L iff sets of k nodes. clique. The clique is a valid k-clique and no other set is.

117 Generalizing Our Questions Under our new terminology: P P NP is the same as Σ 0 Σ 1P. P P co-np is the same as Π 0 Π 1P. P NP co-np is the same as Σ 1 Π 1P. More generally, for any natural number n, we do not know the following: Is Σ n P = Σ n+1p? Is Π n P = Π n+1p? Is Σ n P = Π np?

118 There are many infinite hierarchies of problems that we can solve. Complexity theory is all about the connections between those classes.

119 Next Time The Big Picture A quick recap of everything. Where to Go from Here What's next in CS theory?

Approximation Algorithms

Approximation Algorithms Approximation Algorithms Announcements Problem Set 9 due right now. Final exam this Monday, Hewlett 200 from 12:15PM- 3:15PM Please let us know immediately after lecture if you want to take the final at

More information

Topics in Complexity

Topics in Complexity Topics in Complexity Please evaluate this course on Axess! Your feedback really does make a difference. Applied Complexity Theory Complexity theory has enormous practical relevance across various domains

More information

Announcements. Friday Four Square! Problem Set 8 due right now. Problem Set 9 out, due next Friday at 2:15PM. Did you lose a phone in my office?

Announcements. Friday Four Square! Problem Set 8 due right now. Problem Set 9 out, due next Friday at 2:15PM. Did you lose a phone in my office? N P NP Completeness Announcements Friday Four Square! Today at 4:15PM, outside Gates. Problem Set 8 due right now. Problem Set 9 out, due next Friday at 2:15PM. Explore P, NP, and their connection. Did

More information

NP-Completeness Part II

NP-Completeness Part II NP-Completeness Part II Please evaluate this course on Axess. Your comments really do make a difference. Announcements Problem Set 8 due tomorrow at 12:50PM sharp with one late day. Problem Set 9 out,

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

NP-Completeness Part II

NP-Completeness Part II NP-Completeness Part II Recap from Last Time NP-Hardness A language L is called NP-hard iff for every L' NP, we have L' P L. A language in L is called NP-complete iff L is NP-hard and L NP. The class NPC

More information

NP-Completeness Part II

NP-Completeness Part II NP-Completeness Part II Outline for Today Recap from Last Time What is NP-completeness again, anyway? 3SAT A simple, canonical NP-complete problem. Independent Sets Discovering a new NP-complete problem.

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

CS103 Handout 22 Fall 2012 November 30, 2012 Problem Set 9

CS103 Handout 22 Fall 2012 November 30, 2012 Problem Set 9 CS103 Handout 22 Fall 2012 November 30, 2012 Problem Set 9 In this final problem set of the quarter, you will explore the limits of what can be computed efficiently. What problems do we believe are computationally

More information

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

Friday Four Square! Today at 4:15PM, Outside Gates P and NP Friday Four Square! Today at 4:15PM, Outside Gates Recap from Last Time Regular Languages DCFLs CFLs Efficiently Decidable Languages R Undecidable Languages Time Complexity A step of a Turing

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

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

Recap from Last Time

Recap from Last Time NP-Completeness Recap from Last Time Analyzing NTMs When discussing deterministic TMs, the notion of time complexity is (reasonably) straightforward. Recall: One way of thinking about nondeterminism is

More information

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

NP-Completeness. ch34 Hewett. Problem. Tractable Intractable Non-computable computationally infeasible super poly-time alg. sol. E.g. NP-Completeness ch34 Hewett Problem Tractable Intractable Non-computable computationally infeasible super poly-time alg. sol. E.g., O(2 n ) computationally feasible poly-time alg. sol. E.g., O(n k ) No

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

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

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

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

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

Algorithms and Theory of Computation. Lecture 19: Class P and NP, Reduction Algorithms and Theory of Computation Lecture 19: Class P and NP, Reduction Xiaohui Bei MAS 714 October 29, 2018 Nanyang Technological University MAS 714 October 29, 2018 1 / 26 Decision Problems Revisited

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

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

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

Complexity Theory Part II

Complexity Theory Part II Complexity Theory Part II Time Complexity The time complexity of a TM M is a function denoting the worst-case number of steps M takes on any input of length n. By convention, n denotes the length of the

More information

Intro to Theory of Computation

Intro to Theory of Computation Intro to Theory of Computation LECTURE 24 Last time Relationship between models: deterministic/nondeterministic Class P Today Class NP Sofya Raskhodnikova Homework 9 due Homework 0 out 4/5/206 L24. I-clicker

More information

NP-Completeness I. Lecture Overview Introduction: Reduction and Expressiveness

NP-Completeness I. Lecture Overview Introduction: Reduction and Expressiveness Lecture 19 NP-Completeness I 19.1 Overview In the past few lectures we have looked at increasingly more expressive problems that we were able to solve using efficient algorithms. In this lecture we introduce

More information

Classes of Problems. CS 461, Lecture 23. NP-Hard. Today s Outline. We can characterize many problems into three classes:

Classes of Problems. CS 461, Lecture 23. NP-Hard. Today s Outline. We can characterize many problems into three classes: Classes of Problems We can characterize many problems into three classes: CS 461, Lecture 23 Jared Saia University of New Mexico P is the set of yes/no problems that can be solved in polynomial time. Intuitively

More information

Approximation Preserving Reductions

Approximation Preserving Reductions Approximation Preserving Reductions - Memo Summary - AP-reducibility - L-reduction technique - Complete problems - Examples: MAXIMUM CLIQUE, MAXIMUM INDEPENDENT SET, MAXIMUM 2-SAT, MAXIMUM NAE 3-SAT, MAXIMUM

More information

CSCI3390-Lecture 18: Why is the P =?NP Problem Such a Big Deal?

CSCI3390-Lecture 18: Why is the P =?NP Problem Such a Big Deal? CSCI3390-Lecture 18: Why is the P =?NP Problem Such a Big Deal? The conjecture that P is different from NP made its way on to several lists of the most important unsolved problems in Mathematics (never

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

Lecture 15 - NP Completeness 1

Lecture 15 - NP Completeness 1 CME 305: Discrete Mathematics and Algorithms Instructor: Professor Aaron Sidford (sidford@stanford.edu) February 29, 2018 Lecture 15 - NP Completeness 1 In the last lecture we discussed how to provide

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

UC Berkeley CS 170: Efficient Algorithms and Intractable Problems Handout 22 Lecturer: David Wagner April 24, Notes 22 for CS 170

UC Berkeley CS 170: Efficient Algorithms and Intractable Problems Handout 22 Lecturer: David Wagner April 24, Notes 22 for CS 170 UC Berkeley CS 170: Efficient Algorithms and Intractable Problems Handout 22 Lecturer: David Wagner April 24, 2003 Notes 22 for CS 170 1 NP-completeness of Circuit-SAT We will prove that the circuit satisfiability

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

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

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

Lecturer: Shuchi Chawla Topic: Inapproximability Date: 4/27/2007

Lecturer: Shuchi Chawla Topic: Inapproximability Date: 4/27/2007 CS880: Approximations Algorithms Scribe: Tom Watson Lecturer: Shuchi Chawla Topic: Inapproximability Date: 4/27/2007 So far in this course, we have been proving upper bounds on the approximation factors

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 16: Time Complexity and P vs NP

Lecture 16: Time Complexity and P vs NP 6.045 Lecture 16: Time Complexity and P vs NP 1 Time-Bounded Complexity Classes Definition: TIME(t(n)) = { L there is a Turing machine M with time complexity O(t(n)) so that L = L(M) } = { L L is a language

More information

Intractable Problems Part One

Intractable Problems Part One Intractable Problems Part One Announcements Problem Set Five due right now. Solutions will be released at end of lecture. Correction posted for Guide to Dynamic Programming, sorry about that! Please evaluate

More information

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

Non-Approximability Results (2 nd part) 1/19 Non-Approximability Results (2 nd part) 1/19 Summary - The PCP theorem - Application: Non-approximability of MAXIMUM 3-SAT 2/19 Non deterministic TM - A TM where it is possible to associate more than one

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

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

Lecture 13, Fall 04/05

Lecture 13, Fall 04/05 Lecture 13, Fall 04/05 Short review of last class NP hardness conp and conp completeness Additional reductions and NP complete problems Decision, search, and optimization problems Coping with NP completeness

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

CS21 Decidability and Tractability

CS21 Decidability and Tractability CS21 Decidability and Tractability Lecture 20 February 23, 2018 February 23, 2018 CS21 Lecture 20 1 Outline the complexity class NP NP-complete probelems: Subset Sum NP-complete problems: NAE-3-SAT, max

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

NP-Complete Reductions 3

NP-Complete Reductions 3 x 1 x 1 x 2 x 2 x 3 x 3 x 4 x 4 12 22 32 CS 4407 1 13 21 23 31 33 Algorithms NP-Complete Reductions 3 Prof. Gregory Provan Department of Computer Science University College Cork 1 HARDEST PROBLEMS IN NP

More information

Algorithms, Lecture 3 on NP : Nondeterminis7c Polynomial Time

Algorithms, Lecture 3 on NP : Nondeterminis7c Polynomial Time Algorithms, Lecture 3 on NP : Nondeterminis7c Polynomial Time Last week: Defined Polynomial Time Reduc7ons: Problem X is poly 7me reducible to Y X P Y if can solve X using poly computa7on and a poly number

More information

Lecture 20: conp and Friends, Oracles in Complexity Theory

Lecture 20: conp and Friends, Oracles in Complexity Theory 6.045 Lecture 20: conp and Friends, Oracles in Complexity Theory 1 Definition: conp = { L L NP } What does a conp computation look like? In NP algorithms, we can use a guess instruction in pseudocode:

More information

15-451/651: Design & Analysis of Algorithms October 31, 2013 Lecture #20 last changed: October 31, 2013

15-451/651: Design & Analysis of Algorithms October 31, 2013 Lecture #20 last changed: October 31, 2013 15-451/651: Design & Analysis of Algorithms October 31, 2013 Lecture #20 last changed: October 31, 2013 In the last lecture, we defined the class NP and the notion of NP-completeness, and proved that the

More information

1 Reductions and Expressiveness

1 Reductions and Expressiveness 15-451/651: Design & Analysis of Algorithms November 3, 2015 Lecture #17 last changed: October 30, 2015 In the past few lectures we have looked at increasingly more expressive problems solvable using efficient

More information

Lecture 18: PCP Theorem and Hardness of Approximation I

Lecture 18: PCP Theorem and Hardness of Approximation I Lecture 18: and Hardness of Approximation I Arijit Bishnu 26.04.2010 Outline 1 Introduction to Approximation Algorithm 2 Outline 1 Introduction to Approximation Algorithm 2 Approximation Algorithm Approximation

More information

NP-Completeness Part I

NP-Completeness Part I NP-Completeness Part I Outline for Today Recap from Last Time Welcome back from break! Let's make sure we're all on the same page here. Polynomial-Time Reducibility Connecting problems together. NP-Completeness

More information

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

Complexity Theory. Jörg Kreiker. Summer term Chair for Theoretical Computer Science Prof. Esparza TU München Complexity Theory Jörg Kreiker Chair for Theoretical Computer Science Prof. Esparza TU München Summer term 2010 Lecture 19 Hardness of Approximation 3 Recap Recap: optimization many decision problems we

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

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

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

Complexity Classes V. More PCPs. Eric Rachlin

Complexity Classes V. More PCPs. Eric Rachlin Complexity Classes V More PCPs Eric Rachlin 1 Recall from last time Nondeterminism is equivalent to having access to a certificate. If a valid certificate exists, the machine accepts. We see that problems

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

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

CS154, Lecture 18: 1

CS154, Lecture 18: 1 CS154, Lecture 18: 1 CS 154 Final Exam Wednesday December 12, 12:15-3:15 pm STLC 111 You re allowed one double-sided sheet of notes Exam is comprehensive (but will emphasize post-midterm topics) Look for

More information

NP-Completeness Part One

NP-Completeness Part One NP-Completeness Part One Recap from Last Time The Limits of Efficient Computation P NP R P and NP Refresher The class P consists of all problems decidable in polynomial time. The class NP consists of all

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

3130CIT Theory of Computation

3130CIT Theory of Computation GRIFFITH UNIVERSITY School of Computing and Information Technology 3130CIT Theory of Computation Final Examination, Semester 2, 2006 Details Total marks: 120 (40% of the total marks for this subject) Perusal:

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

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

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

CS154, Lecture 13: P vs NP

CS154, Lecture 13: P vs NP CS154, Lecture 13: P vs NP The EXTENDED Church-Turing Thesis Everyone s Intuitive Notion of Efficient Algorithms Polynomial-Time Turing Machines More generally: TM can simulate every reasonable model of

More information

HW11. Due: December 6, 2018

HW11. Due: December 6, 2018 CSCI 1010 Theory of Computation HW11 Due: December 6, 2018 Attach a fully filled-in cover sheet to the front of your printed homework. Your name should not appear anywhere; the cover sheet and each individual

More information

Complexity Classes IV

Complexity Classes IV Complexity Classes IV NP Optimization Problems and Probabilistically Checkable Proofs Eric Rachlin 1 Decision vs. Optimization Most complexity classes are defined in terms of Yes/No questions. In the case

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

PCP Theorem and Hardness of Approximation

PCP Theorem and Hardness of Approximation PCP Theorem and Hardness of Approximation An Introduction Lee Carraher and Ryan McGovern Department of Computer Science University of Cincinnati October 27, 2003 Introduction Assuming NP P, there are many

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

Chapter 2 : Time complexity

Chapter 2 : Time complexity Dr. Abhijit Das, Chapter 2 : Time complexity In this chapter we study some basic results on the time complexities of computational problems. concentrate our attention mostly on polynomial time complexities,

More information

Notes for Lecture 2. Statement of the PCP Theorem and Constraint Satisfaction

Notes for Lecture 2. Statement of the PCP Theorem and Constraint Satisfaction U.C. Berkeley Handout N2 CS294: PCP and Hardness of Approximation January 23, 2006 Professor Luca Trevisan Scribe: Luca Trevisan Notes for Lecture 2 These notes are based on my survey paper [5]. L.T. Statement

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

CS154, Lecture 13: P vs NP

CS154, Lecture 13: P vs NP CS154, Lecture 13: P vs NP The EXTENDED Church-Turing Thesis Everyone s Intuitive Notion of Efficient Algorithms Polynomial-Time Turing Machines More generally: TM can simulate every reasonable model of

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

Recap from Last Time

Recap from Last Time P and NP Recap from Last Time The Limits of Decidability In computability theory, we ask the question What problems can be solved by a computer? In complexity theory, we ask the question What problems

More information

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

CS5371 Theory of Computation. Lecture 19: Complexity IV (More on NP, NP-Complete) CS5371 Theory of Computation Lecture 19: Complexity IV (More on NP, NP-Complete) Objectives More discussion on the class NP Cook-Levin Theorem The Class NP revisited Recall that NP is the class of language

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

Data Structures and Algorithms

Data Structures and Algorithms Data Structures and Algorithms Session 21. April 13, 2009 Instructor: Bert Huang http://www.cs.columbia.edu/~bert/courses/3137 Announcements Homework 5 due next Monday I m out of town Wed to Sun for conference

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

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

Finish K-Complexity, Start Time Complexity

Finish K-Complexity, Start Time Complexity 6.045 Finish K-Complexity, Start Time Complexity 1 Kolmogorov Complexity Definition: The shortest description of x, denoted as d(x), is the lexicographically shortest string such that M(w) halts

More information

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

CS154, Lecture 17: conp, Oracles again, Space Complexity CS154, Lecture 17: conp, Oracles again, Space Complexity Definition: conp = { L L NP } What does a conp computation look like? In NP algorithms, we can use a guess instruction in pseudocode: Guess string

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

Lecture 2 (Notes) 1. The book Computational Complexity: A Modern Approach by Sanjeev Arora and Boaz Barak;

Lecture 2 (Notes) 1. The book Computational Complexity: A Modern Approach by Sanjeev Arora and Boaz Barak; Topics in Theoretical Computer Science February 29, 2016 Lecturer: Ola Svensson Lecture 2 (Notes) Scribes: Ola Svensson Disclaimer: These notes were written for the lecturer only and may contain inconsistent

More information

BBM402-Lecture 11: The Class NP

BBM402-Lecture 11: The Class NP BBM402-Lecture 11: The Class NP Lecturer: Lale Özkahya Resources for the presentation: http://ocw.mit.edu/courses/electrical-engineering-andcomputer-science/6-045j-automata-computability-andcomplexity-spring-2011/syllabus/

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

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

NP-Complete Problems. Complexity Class P. .. Cal Poly CSC 349: Design and Analyis of Algorithms Alexander Dekhtyar.. .. Cal Poly CSC 349: Design and Analyis of Algorithms Alexander Dekhtyar.. Complexity Class P NP-Complete Problems Abstract Problems. An abstract problem Q is a binary relation on sets I of input instances

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

CSC 373: Algorithm Design and Analysis Lecture 15

CSC 373: Algorithm Design and Analysis Lecture 15 CSC 373: Algorithm Design and Analysis Lecture 15 Allan Borodin February 13, 2013 Some materials are from Stephen Cook s IIT talk and Keven Wayne s slides. 1 / 21 Announcements and Outline Announcements

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

Complexity Theory Part Two

Complexity Theory Part Two Complexity Theory Part Two Recap from Last Time The Complexity Class P The complexity class P (for polynomial time) contains all problems that can be solved in polynomial time. Formally: P = { L There

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

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