# Notes on NP Completeness

Save this PDF as:

Size: px
Start display at page:

## Transcription

1 Notes on NP Completeness Rich Schwartz November 10, Overview Here are some notes which I wrote to try to understand what NP completeness means. Most of these notes are taken from Appendix B in Douglas West s graph theory book, and also from wikipedia. There s nothing remotely original about these notes. I just wanted all this material to filter through my brain and onto paper. I also wanted to collect everything together in a way I like. Here s what these notes do. Define the class P, using deterministic Turing machines. Define the class NP and the notion of NP completeness, using nondeterministic Turing machines. Prove the Cook-Levin Theorem: SAT is NP complete. Prove that 3-SAT is NP complete. Prove that graph 3-colorability is NP complete. Prove that the problem of finding a maximal independent set, or a minimal vertex covering, in a graph is NP complete. Prove that finding a directed or undirected Hamiltonian path or cycle in a directed or undirected graph is NP complete. Prove that the traveling salesman problem is NP complete. Prove that the problem of finding an interior lattice point in an integer polytope is NP complete. 1

2 2 The Class P 2.1 Deterministic Turing Machines Informally, a deterministic Turing Machine (DTM) is a finite machine which hovers over an infinite tape, writing and erasing symbols on the tape accordingtoacombinationofwhatiswrittenonthetapeanditsowninternalstate. This idealizes how we might do a calculation. At any given step we ll modify what we have written according to a combination of what is underneath our pen and what we are thinking. Formally, the tape is a bi-infinite union of squares, arranged along (say) the x-axis. One symbol is to be written in each square, and the machine, at any given time, is focused (or hovers) on one of the squares. The Turing machine itself is a quintuple (A,S,S 0,F,T), where A is a finite alphabet, with some distinguished blank state. S is a finite set of internal states of the machine. S 0 S is the initial state of the machine. F S is a finite subset of ending or accepting states. T : A S A S { 1,1} is the transition function. If the machine finds itself hovering over a letter a and in a state s, then it computes T(a,s) = (a,s,±1). It replaces a with a, changes to state s, and moves one unit left or right depending on the sign of ±1. An input (or problem) for the machine is a finite string written on the paper, and a positioning of the head of the machine that is, where it is initially hovering. Since the tape is infinite, the finite string is padded out with blanks so that every square on the bi-infinite tape has a symbol. 2.2 Polytime Decision Problems A decision problem is simply a problem which says yes or no for an infinite family of inputs. The problem is Turing computable if there is a pair of DTMs with the following property. For each input, one or the other of the machines arrives at an accept state in finite time. In the first case, the answer to the problem is yes, and in the second case the answer is no. 2

3 One could also formulate this in terms of a single Turing machine, in which the accept states are divided into yes states and no states. Here are some examples of computable decision problems. Does a graph have an Eulerian circuit? Does a graph have a Hamiltonian cycle? Can a graph be embedded in the plane. Can one 3-color a graph. In each instance of one of these problems, one takes a specific graph and inputs it into the DTMs, and then lets the computation run. Typically, one would encode the graph as an incidence matrix, and then string out the entries of the matrix so that they fit on the tape. More informally, one performs some finite algorithm on the graph which leads to an answers. The decision problem is called polytime if there is a polynomial P such that both DTMs run in at most P(n) steps, given a problem encoded with a length n finite string. Informally, n denotes the size of the instance of the problem. Since the definition is insensitive to the details of P, it often suffices to have a very rough description of size. For intsance, for graphs, the size could be either the number of edges or the number of vertices, and the same problems would be counted as polytime. The set P denotes the set of polytime decision problems. The decision problem for Eulerian circuits is in P because one just checks whether or not all vertices in a given graph have even degree. Such a calculation is certainly a polynomial in the size of the graph. The decision problem for Hamiltonian cycles seems not to be in P. One waytophrasethefamousp NPconjectureissimplythatThe Hamiltonian cycle problem is not in P. However, this way of phrasing it ignores many details and makes the P NP problem seem kind of random. 3 The Class NP 3.1 Non-Deterministic Turing Machines Given a set Y, let 2 Y denote the set of subsets of Y. Say that a set function from X to Y is a map f : X 2 Y. A set function from X to Y is a special 3

4 case of a relation between X and Y. The set up for a non-deterministic Turing machine (NTM) is exactly the same as for a DTM, except for one point. The map T : A S A S {0,1}, is replaced by a set map from A S into A S {0,1}. We still denote this set map by T. One can think of a NTM in a deterministic way: Given an input to the machine, the machine makes a tree of calculations. At every step of the calculation, the machine makes all transitions allowed by the set map T. The calculation is a success if one of the branches of the tree ends up in F, the set of accept states. One could build an auxillary DTM which makes a breadth-first-search through the calculation tree produced by the NTM. However, for an infinite (growing) family of inputs, the NTM might stop in polytime whereas the DTM might require exponential time. One way to think of a successful calculation on an NTM is that some oracle feeds the machine a list of choices to make at each stage or maybe the machine just gets lucky and then the machine is capable of following these steps and getting to an accept state. 3.2 Non-Deterministic Polytime Problems A decision problem is said to be a nondeterministic polytime problem if there is an NTM, Ω, and a polynomial P with the following properties. If an instance of the problem has size n, then the answer to the decision problem is yes if and only if Ω lands in an accept state after at most P(n) steps. We say that the machine is allowed to run for P(n) steps on an input of size n. The Hamiltonian circuit decision problem is a classic problem in NP. We can make an NTM which tries every path in a graph of length at most n 2. The machine then rejects paths as soon as the revisit a vertex without having hit all the vertices. The set NP denotes the set of nondeterministic polytime decision problems. The famous P NP conjecture is that there exists a problem in NP that does not belong to P. 4

5 3.3 Reduction Suppose that X and Y stand for two decision problems. A reduction from X to Y is a two-part algorithm. The first part of the algorithm converts any given instance x of X into an instance of y of Y such that that The number of steps of the conversion is bounded by a polynomial function of x. The size of y is bounded by a polynomial function of x. Thesecondpartofthealgorithmconvertsanygivensolutionofy toasolution of x in such a way that the number of steps in the conversion is bounded by a polynomial in the size of y. By algorithm, we mean a pair of auxilliary DTMs which do the jobs. In case there is a reduction from X to Y, we ll write X Y. Essentially a reduction from X to Y is a procedure whereby one can use a solution to Y to create an essentially equally efficient solution for X. For instance, if Y P and X Y, then X P as well. A decision problem is called NP hard if every problem in NP reduces to it. An NP hard problem may or may not belong to NP. The decision problem is called NP-complete if it is NP-hard and it belongs to NP. It is a nontrivial result that NP complete problems actually exist. 4 Satisfiability (SAT) 4.1 The Cook-Levin Theorem In particular, Here is one more example of a problem in NP. Let stand for or. A simple clause is an expression of the form ±a 1... ±a n, where a i is a boolean variable and a i is its negation. That is a i is true if and only if a i is false. The clause is true if and only if at least one of the variables is true. For instance a 1 a 2 is true if and only if (non-exclusively) either a 1 is false or a 2 is true. A compound clause is an expression of the form C 1 &...&C k, where each C i is a simple clause. The compound clause is true if and only every one of the component simple clauses is true. The satisfiability problem (SAT) asks the following: Given a compound clause, is there a truth-assignment for the variables which makes the whole thing true? One certainly make 5

6 a DTM which checks in polytime whether or not a given truth-assignment works for a given clause. One can then build a NTM whose first step is to write down all possible truth-assignments, and whose remaining steps follow the deterministic calculation for each truth-assignment. Hence, SAT is in NP. Theorem 4.1 (Cook-Levin) Any decision problem in NP reduces to SAT. Hence SAT is NP-complete. Proof: Suppose that: X NP and Ω = (A,S,S 0,F,T) is a nondeterministic Turing machine solving X. Let x be an instance of X, with input size n. Let N = p(n) be a bound on the length Ω is allowed to run on N. The convention is that, if some computational branch of Ω reaches an accept state before N steps, it just stays there until N steps are reached. We want to convert x into an instance of SAT. The basic idea is to encode the entire working of Ω on x into a compount clause which is satisfied if and only if the Ω reaches an accept state. We introduce the following variables. A ijk. This variable is true iff letter i is written in square j at step k of the calculation. H ik. This variable is true iff Ω is hovering over square i at step k of the calculation. S ik. This variable is true iff Ω is in state i at step k of the calculation. We think of a variable assignment as specifying a single branch of the computation tree. These clauses enforce the initial set-up. S 00. This means that Ω starts in state S 0. H 00. This means that Ω initially hovers over square 0. S i,x(i),0. Here x(i) denotes the letter of the input written in square i. Here i p(n). The truth of these variables encodes the fact that x is the input to Ω. These clauses enforce the basic properties of any Turing machine. S ijk S i jk. This means that the two letters S i and S i cannot both be written in square j at step k. In short, there is only one letter per square. 6

7 H ik H i k. This means that Ω cannot hover at 2 distinct squares. S ik S i k. This means that Ω cannot be in 2 states at once. (A ijk &A ij,k+1 ) H ik. This means that the tape can only change in a spot where Ω is focused. This expression is a compound clause because (a&b) c is the same as (a c)&(b c). (A ijk &H jk &S lk ) (A i,j,k+1&h j,k+1&s l,k+1). The expression on the right is taken over all triples related to triple on the left by the set function T. Together with the other clauses, this enforces the condition that Ω makes a legal transition at each step. This expression is a compound clause because (setting B = b i ), the expression (a 1 &a 2 &a 3 ) B is equivalent to a 1 a 2 a 2 B. This last clause enforces the condition that the computation arrives in an accept state. F 1N... F kn, where F 1,...,F k are the accept states. Here N = p(n). If some computational branch of Ω reaches an accept state in at most N steps, then we can assign truth values to the variables so that the compound clause is satisfied. Conversely, if we have a truth-assignment which satisfies the compound clause, we simply use it as a guide for running a branch of Ω. The conversions back and forth involve only q(n) steps, where q is another polynomial in n which depends only on p. This completes the proof. 4.2 Reduction to 3-SAT Say that a 3-clause is an compound clause of the form (a 1 b 1 c 1 )&(a 2 b 2 c 2 )&...(a n b n c n ). 3 SAT is the decision problem which asks whether or not the truth values of variables can be set in order to satisfies a given 3-clause. I believe that this theorem is due to Karp. In fact, all the reductions I m going to explain below are due to Karp. Theorem SAT is NP complete. 7

8 Proof: Since SAT is in NP, and 3-SAT is a sub-problem of SAT, we know that 3-SAT is in NP. To finish the proof, we just have to show that SAT reduces to 3-SAT. The first step is to observe that is logically equivalent to the 3-clause (a b) c (a c c)&(b c c)&(a b c). Now, observe that the simple clause a 1... a n is equivalent to the clause (b a 3... a n )& ( (a 1 a 2 ) b ). Herebissomeentirelynewvariable. Thelengthoftheoriginalclauseisnand the maximum length of the simple clauses in the replacement is max(3, n 1). Continuing to make substitutions like this, we produce an equivalent clause in which the maximum length is 3. 5 Graph Colorings 5.1 Basic Definitions Aproper coloring ofagraphisacolor-assignmentoftheverticesofthegraph, so that vertices incident to a common edge have different colors. A graph is k-colorable if it has a coloring with k colors. The k-coloring decision problem asks, for each graph, G, is G k-colorable. Call this problem k-color. Lemma COLOR is in P. Proof: One can check whether a graph is 2-colorable by setting some initial node equal to 0 and then doing a breadth-first-search. The color of each new vertex encountered is forced by the color of previous vertices. The graph has a proper 2-coloring if and only if the search ends with no contradictions. This is a polytime algorithm. We will see that the remainder of the problems are NP complete. 8

9 5.2 A Particular Graph This construction is taken straight from West s book. Let G be the graph on the left hand side of Figure 1. We call the 3 leftmost vertices of G the inputs and the rightmost vertices of G the output. Given a,b,c {0,1,2} let C(a,b,c) denote the set of proper 3-colorings of the G which assign values a,b,c (top to bottom, say) to the inputs. Here are two easily checked facts about G. Any coloring in C(0,0,0) assigns 0 to the output. Ifa+b+c 0 thenthereexists some coloring in C(a,b,c) which assigns a nonzero value to the output COLOR Figure 1: The Graph G 0 with 3 inputs and 1 output. One can easily check in polytime that a given 3-coloring of a graph is proper. Similar to the situation for 3-SAT, this implies that 3-COLOR is in NP. Theorem 5.2 (Karp) 3-COLOR is NP complete. Proof: Since 3-SAT is NP complete, it suffices to reduce 3-SAT to 3- COLOR. Let C = C 1 &...&C n be a 3-compound clause. Suppose that C involves the variables b 1,...,b k. We build a graph G C as follows. G C has an initial vertex a. G C has vertices b 1,b 1,...,b k,b k. We add to G C all the triangles ab i b i. G C has vertices c 1,...,c n. For the ith clause C i, we insert a copy of G 0, whose inputs are the 3 b (or b) variables of C i and whose output is c i. G C has a final vertex d which is connected to every c i by an edge. d also connects to a. 9

10 TheconstructionofG C fromc takespolynomialtimeandcreatesagraph whose size is a polynomial function of the size of C. We claim that G C is 3-colorable if and only if C is satisfiable. Suppose first that C is satisfiable. We assume in our construction that the b-variables are given the truth values which satisfy C. Then we color G C as follows. γ(a) = 2. Here γ(a) is the color of a. γ(b i ) = 0 or γ(b i ) = 1 depending on whether b i is true or false. Also γ(b i )+γ(b i ) = 1. Thus, each triangle ab i b i is properly colored. From the fact that C is satisfied, and the properties of G 0, we see that it is possible to arrange that γ(c j ) {1,2} for all j. We set γ(d) = 0. This is a proper coloring. Conversely, suppose that G C has a proper coloring. By changing the names of the colors, if necessary, we arrange that γ(a) = 2 and γ(d) = 0. Then γ(b i ) {0,1} and γ(b i )+γ(b i ) = 1 because each triangle ab i b i is properly colored. We assign the truth values to the b variables using the coloring. Since γ(d) = 0, we must have γ(c i ) 0 for all i. But then it never happens that the inputs to the copy of G 0 ending at c i are all 0. Hence each clause C i is satisfied. Hence C is satisfied. The conversion from the coloring to the truth-assignment takes linear time. 6 Independent Sets and Vertex Covers 6.1 Independent Sets Let G be a graph. An independent set of size k, or a k-independent set, is a collection of k vertices of G, no two are incident to a common edge. One can fix k and ask the question: Does G have a k-independent set? This decision problem is in P: If G has n vertices then one simply checks the independence of each of the n choose k possibilities. There are O(n k ) possibilities, and the check is also polytime. 10

11 A more difficult decision problem asks: Given the pair (G,k), does there exist a k-independent set? This time the size of k is allowed to grow, and is taken as part of the input. Call this problem INDEP. Note that there is only one INDEP: it does not have a parameter like the coloring problems. An argument like the ones above shows that INDEP is in NP. In this section, we ll show that INDEP is NP complete. Lemma 6.1 Let n be the number of vertices of G. Let K k be the complete graph on k vertices. Then G has a proper k-coloring set if and only if G K k (the graph product) has an n-independent set. Proof: Suppose that G has a proper k-coloring. Let S G = (v,γ(v)). v V(G) The union takes place over all vertices of G. Certainly S G has cardinality n. To show that S G is independent, suppos that (v,γ(v)) and (w,γ(w)) share an edge. Then either v = w or γ(v) = γ(w). The first case is not possible. In the second case, when γ(v) = γ(w), there must be an edge between v and w. But this does not happen. Hence S G is an n-independent set. Conversely, suppose that S is an n-independent set. Consider two elements of S, namely (v,i) and (w,j). If cannot happen that v = w because then i and j (like all vertices of K k ) share an edge. By the pidgeonhole principle, each vertex of G appears once in the first coordinate of S. We color the vertices of G according to the value of the second coordinate. The independence of S guarantees that adjacent vertices get different colors. For later reference, call this construction ( ). Theorem 6.2 (Karp) INDEP is NP complete. Proof: It suffices to reduce 3-COLOR to INDEP. To prove that G has a proper 3-coloring, it suffices to check that G K 3 has an n-independent set. The size of the pair (G K 3,n) is a polynomial in n, and the conversion takes a polynomial number of steps. If some NTM shows that G K 3 has an independent set, when we just trace through the steps of ( ) to get our proper 3-coloring. 11

12 6.2 Vertex Covers A k-covering of a graph G is a collection of k vertices such that every edge in G is incident to a vertex in the cover. Lemma 6.3 Let G be a graph with n vertices. Let M be the size of the maximum independent set and let m be the size of the minimal covering. Then M +m = n. Proof: Suppose that S is a minimal cover. Consider the complement S = V(G) S. If two vertices in S share an edge in G not incident to a vertex of S. Hence S is independent. If S is an independent set, then S = V(G) S is a vertex cover. Otherwise some edge is not incident to a vertex in S and hence has both ends in S. The problem COVER asks: Given a pair (G,k) does there exist a vertex cover of G having size k. Arguments like the ones above show that COVER is in NP. Using Lemma 6.3 one immediately reduces INDEP to COVER. Hence COVER is NP complete. 7 Hamiltonian Paths and Cycles 7.1 The Key Construction Figure 2 shows a particular directed graph Q. We think of Q as extending the union of the two directed horizontal edges by adding in 4 more edges, making a kind of square. Figure 2: The graph Q. 12

13 Let G be a graph and let k be an integer. We re going to construct a directed graph H = H(G,k) such that H has a directed Hamiltonian path from a vertex w 0 to a vertex w k if and only if G has a k-vertex covering. Here is the construction. Say that a flag of G is a pair (v,e) where v is a vertex of G and e is an edge of G incident to v. Let v 1,...,v n be the vertices of G. Let d i be the degree of v i. Let f i1,f i3,f i5,... denote the flags having point v i. The ordering doesn t matter. Add vertices w 0,...,w k. We call these the anchors. Add directed paths P 1,...,P n of length 2d 1,...,2d n. Add directed edges from w i to the start of P j for all i = 0,...,k 1 and all j = 1,...,n. Add directed edges from the end of P j to w i for all i = 1,...,k and all j = 1,...,n. Let P i1,p i3,... be the odd consecutive edges of P i. There are d i such edges. We extend P ab P cd by a copy of Q whenever f ab and f cd are flags with a common edge. Lemma 7.1 If G has a k-vertex cover, then H has a directed Hamiltonian path connecting w 0 to w k. Proof: The idea is to start with a path from w 0 to w k and then improve it until it is Hamiltonian. We can re-index the vertices so that v 1,...,v k of G comprise the vertex cover. Let Γ be the path which starts at w 0, then takes P 1, then moves to w 1, then takes P 2, and so on, until reaching v k. Let P cd be any of the odd segments with c > k. There is a unique flag f ab, with a k and b odd, so that f ab and f cd share an edge. We modify Γ to that, instead of directly taking S ab, we go the long way around the copy of Q joining S ab to S cd. The longer graph now hits the endpoints of S cd. Doing this for every such S cd, we get out Hamiltonian path. We ll establish the converse to this result in several steps. We will suppose that Γ is a directed Hamiltonian path of H connecting w 0 to w k. Our construction above works with the odd edges P i1,p i3,... Now we work with the even edges P i2,p i4,... In the next lemma, P i0 will stand for an edge 13

14 connecting an anchor to the start of P i. Likewise P i,2di will stand for an edge connecting the end of P i to an anchor. Again, If Γ contains such edges, then they are unique. Lemma 7.2 Suppose that Γ contains one of P i,j 1 and P i,j+1. Then Γ contains both of them. Proof: Without loss of generality we may take i = 1. For ease of notation, we take j = 2, and we will show that P 12 Γ implies that P 14 Γ. This argument does not cover the general case, but the general case uses essentially the same reasoning. P2 P2 P12 P13 P14 Figure 4: Two cases P12 P13 P14 There are two cases. Suppose first that P 13 Γ. If P 14 Γ, then Γ must take the path shown on the left side of Figure 4. Since Γ is Hamiltonian, Γ must contain the red vertex. However, there are only two outgoing edges from the red vertex, and these both crash back into Γ. Suppose that P 13 Γ. Then Γ takes the path on the right hand side of Figure 4. Since Γ is Hamiltonian, Γ must contain the red dot. But then the two ingoing edges to the red dot emanate from points already on Γ. Corollary 7.3 Suppose that any of the following is true: Γ contains an even edge of P i. Γ contains an edge joining an anchor to the start of P i. Γ contains an edge joining the end of P i to an anchor. All of the above is true and Γ contains every even edge of P i. Corollary 7.4 G has a vertex cover of size k. 14

15 Proof: Let S denote the set of vertices v i of G such that Γ contains an even edge of P i. Suppose S has size at least k +1. By Corollary 7.3, Γ contains k+1 edges leaving anchors. But there are only k such edges. In fact, S has size exactly k, because it happens exactly k times that Γ leaves an anchor. Let e be some edge of Γ. We want to show that one endpoint of e lies in S. Suppose this is not the case. Let v i and v j be the endpoints of e. Let p i and p j be the start points of P i and P j respectively. Γ does not contain edges joining anchors to p i or p j. Hence, Γ must join p i to p j. But then Γ contains P i1 and P j1. By Corollary 7.3, Γ contains neither P i2 nor P j2. But then Γ joins the starting points of P i2 and P j2. This shows that Γ has a 4-cycle, a contradiction. The contradiction shows that S is a vertex cover. 7.2 Directed Hamiltonian Path Let G be a directed graph, and let v,w be two vertices of G. The decision problem DHP takes as input (G,v,w) and asks if there is a directed Hamiltonian path starting at v and ending at w. Arguments like those above show that DHP is in NP. Theorem 7.5 (Karp) DHP is NP complete. Proof: The proof amounts to reducing COVER to DHP. Let (G,k) be an input problem for COVER. The construction in the previous section produces a triple (H,w 0,w k ) such that the answer to DHP for (H,w 0,w k ) is yes if and only if the answer to COVER for (G,k) is yes. The size of H is polynomial in the size of G. Moreover, there a polytime algorithm to convert the directed Hamiltonian path in (H,w 0,w k ) to the desired covering of G. 7.3 Hamiltonian Paths and Cycles Let HP be the vertion of DHP but for undirected graphs. Arguments like those above show that HP is in NP. Theorem 7.6 (Karp) HP is NP complete. 15

16 Proof: The idea is to reduce DHP to HP. Let G be a directed graph. We form a graph H as follows. For each vertex a of G we produce a 3-path a 1 a 0 a 1. We then join a 1 to b 1 whenever a directed edge of H joins a to b. If we want to solve DHP for (G,v,w) we solve HP for (H,v 1,w 1 ). If this latter problem has a solution, then the Hamiltonian path Γ on H has the following properties. Since Γ contains v 0, the first edge of Γ connects v 1 to v 0. The second edge of Γ must connect v 0 to v 1. In general, and by induction, once Γ reaches some vertex a 1, the next vertex reached by Γ must be some b 1. The last edge of Γ joins w 0 to w 1. If we just list out the vertices v 0,...,a 0,b 0,...,w 0 hit by Γ we produce vertices of G which are joined by a Hamiltonian path from v to w. Finally, we arrive back to the Hamiltonian cycle problem, which we discussed in connection with a naive formulation of the P NP problem. Let HC denote the decision problem which asks, does a graph G have a Hamiltonian cycle. Arguments like those above show that HC is in NP. Theorem 7.7 (Karp) HC is NP complete. Proof: The idea is to reduce HP to HC. Suppose we want to solve HP for some triple (G,v,w). We form a new graph H simply by adding an extra vertex x and joining it to both v and w. If we can solve HC on H then the resulting Hamiltonian cycle Γ must visit x and hence must contain, consecutively, the edges xv and xw. We just omit these two edges, to get a Hamiltonian path on G which connects v to w. 8 The Traveling Salesman Problem Let K n be the complete graph on n vertices. Suppose that each edge of K n is given a non-negative integer weight. The traditional traveling salesman 16

17 problem asks for the hamiltonian cycle of K n having minimum total weight. The decision problem TSP starts with a pair (G,d), where G is a weighted copy of K n and d is some integer. The problem asks: Does G have a Hamilonian cycle of weight at most d? Arguments like those above shows that TSP is in NP. Theorem 8.1 (Karp) TSP is NP complete. Proof: The idea is to reduce HC to TSP. Suppose that G is a graph. We let H be a copy of K n. Note that H has less than n 2 edges. If an edge of H comes from an edge of G, we give it weight 1. Otherwise, we give the edge weight n 2. Note that H has a Hamiltonian cycle of weight at most n 2 if and only if G has a Hamiltonian cycle. So, if we can solve TSP for (H,n 2 ), then we can solve HC for G. The original traveling salesman problem is at least as hard to solve as TSP, because a solution to the original problem for G immediately solves TSP for any pair (G,d). When G has integer weights whose sizes are at most polynomial in the size of G, one can solve the original problem by solving TSP a polynomial number of times. 9 Interior Lattice Point Say that an integer polytope is a compact convex polytope P R n whose faces are the solution sets of integer linear equations. A lattice point is a point of Z n. The interior lattice point problem asks: Does the interior of P contain a lattice point. The size of P in this case is the maximum of The number of faces of P. The diameter of P. Lemma 9.1 ILP belongs to NP Proof: Using a real linear programming algorithm, such as the simplex method, one can find a vertex of P in polynomial time. One can then specify a cube, of side length on the order of n, which contains P in its interior. 17

18 Next, one can build an NTM which checks whether or not p P by evaluating the equations defining the sides of P on P. Since the NTM considers all points simultaneously, the NTM runs in polynomial time. This result is probably due to Karp. Theorem 9.2 ILP is NP complete. Proof: The idea is to reduce 3-SAT to ILP. Let C = C 1 &...&C n be some 3-compound clause. Let a 1,a 1,...,a m a m be the variables appearing in these clauses. Let P be the polytope defined by the equations a j [ 1,2] and a j [ 1,2]. a j +a j [0,2]. α i +β i +γ i 0. Here α i,β i,γ i are the variables of C i. The number of equations defining P is O(n 3 ), and the diameter of P is at most 4 n. Hence, the size of P is polynomial in the size of the clause. If p is a lattice point in the interior of P, then every coordinte of p is either 0 or 1. Hence, we can use p to assign truth-values to the variables. By construction, p assigns true to a i if and only if p assigns false to a i. Also, p cannot assign false to all of α i,β i,γ i. Hence, the truth-assignments specified by p satify the clause. 18

### 2.3 Scheduling jobs on identical parallel machines

2.3 Scheduling jobs on identical parallel machines There are jobs to be processed, and there are identical machines (running in parallel) to which each job may be assigned Each job = 1,,, must be processed

### Outline. NP-completeness. When is a problem easy? When is a problem hard? Today. Euler Circuits

Outline NP-completeness Examples of Easy vs. Hard problems Euler circuit vs. Hamiltonian circuit Shortest Path vs. Longest Path 2-pairs sum vs. general Subset Sum Reducing one problem to another Clique

### The Classes P and NP

The Classes P and NP We now shift gears slightly and restrict our attention to the examination of two families of problems which are very important to computer scientists. These families constitute the

### Complexity Theory. IE 661: Scheduling Theory Fall 2003 Satyaki Ghosh Dastidar

Complexity Theory IE 661: Scheduling Theory Fall 2003 Satyaki Ghosh Dastidar Outline Goals Computation of Problems Concepts and Definitions Complexity Classes and Problems Polynomial Time Reductions Examples

### Page 1. CSCE 310J Data Structures & Algorithms. CSCE 310J Data Structures & Algorithms. P, NP, and NP-Complete. Polynomial-Time Algorithms

CSCE 310J Data Structures & Algorithms P, NP, and NP-Complete Dr. Steve Goddard goddard@cse.unl.edu CSCE 310J Data Structures & Algorithms Giving credit where credit is due:» Most of the lecture notes

### Introduction to Logic in Computer Science: Autumn 2006

Introduction to Logic in Computer Science: Autumn 2006 Ulle Endriss Institute for Logic, Language and Computation University of Amsterdam Ulle Endriss 1 Plan for Today Now that we have a basic understanding

### NP-Completeness and Cook s Theorem

NP-Completeness and Cook s Theorem Lecture notes for COM3412 Logic and Computation 15th January 2002 1 NP decision problems The decision problem D L for a formal language L Σ is the computational task:

Approximation Algorithms Chapter Approximation Algorithms Q. Suppose I need to solve an NP-hard problem. What should I do? A. Theory says you're unlikely to find a poly-time algorithm. Must sacrifice one

### A Working Knowledge of Computational Complexity for an Optimizer

A Working Knowledge of Computational Complexity for an Optimizer ORF 363/COS 323 Instructor: Amir Ali Ahmadi TAs: Y. Chen, G. Hall, J. Ye Fall 2014 1 Why computational complexity? What is computational

### Applied Algorithm Design Lecture 5

Applied Algorithm Design Lecture 5 Pietro Michiardi Eurecom Pietro Michiardi (Eurecom) Applied Algorithm Design Lecture 5 1 / 86 Approximation Algorithms Pietro Michiardi (Eurecom) Applied Algorithm Design

### OHJ-2306 Introduction to Theoretical Computer Science, Fall 2012 8.11.2012

276 The P vs. NP problem is a major unsolved problem in computer science It is one of the seven Millennium Prize Problems selected by the Clay Mathematics Institute to carry a \$ 1,000,000 prize for the

### Theoretical Computer Science (Bridging Course) Complexity

Theoretical Computer Science (Bridging Course) Complexity Gian Diego Tipaldi A scenario You are a programmer working for a logistics company Your boss asks you to implement a program that optimizes the

### CSC 373: Algorithm Design and Analysis Lecture 16

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

### Chapter. NP-Completeness. Contents

Chapter 13 NP-Completeness Contents 13.1 P and NP......................... 593 13.1.1 Defining the Complexity Classes P and NP...594 13.1.2 Some Interesting Problems in NP.......... 597 13.2 NP-Completeness....................

### Welcome to... Problem Analysis and Complexity Theory 716.054, 3 VU

Welcome to... Problem Analysis and Complexity Theory 716.054, 3 VU Birgit Vogtenhuber Institute for Software Technology email: bvogt@ist.tugraz.at office hour: Tuesday 10:30 11:30 slides: http://www.ist.tugraz.at/pact.html

### NP-Completeness I. Lecture 19. 19.1 Overview. 19.2 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

### Introduction to NP-Completeness Written and copyright c by Jie Wang 1

91.502 Foundations of Comuter Science 1 Introduction to Written and coyright c by Jie Wang 1 We use time-bounded (deterministic and nondeterministic) Turing machines to study comutational comlexity of

### ! Solve problem to optimality. ! Solve problem in poly-time. ! Solve arbitrary instances of the problem. !-approximation algorithm.

Approximation Algorithms Chapter Approximation Algorithms Q Suppose I need to solve an NP-hard problem What should I do? A Theory says you're unlikely to find a poly-time algorithm Must sacrifice one of

### Exponential time algorithms for graph coloring

Exponential time algorithms for graph coloring Uriel Feige Lecture notes, March 14, 2011 1 Introduction Let [n] denote the set {1,..., k}. A k-labeling of vertices of a graph G(V, E) is a function V [k].

### ! Solve problem to optimality. ! Solve problem in poly-time. ! Solve arbitrary instances of the problem. #-approximation algorithm.

Approximation Algorithms 11 Approximation Algorithms Q Suppose I need to solve an NP-hard problem What should I do? A Theory says you're unlikely to find a poly-time algorithm Must sacrifice one of three

### Approximation Algorithms: LP Relaxation, Rounding, and Randomized Rounding Techniques. My T. Thai

Approximation Algorithms: LP Relaxation, Rounding, and Randomized Rounding Techniques My T. Thai 1 Overview An overview of LP relaxation and rounding method is as follows: 1. Formulate an optimization

### Discuss the size of the instance for the minimum spanning tree problem.

3.1 Algorithm complexity The algorithms A, B are given. The former has complexity O(n 2 ), the latter O(2 n ), where n is the size of the instance. Let n A 0 be the size of the largest instance that can

### 5 INTEGER LINEAR PROGRAMMING (ILP) E. Amaldi Fondamenti di R.O. Politecnico di Milano 1

5 INTEGER LINEAR PROGRAMMING (ILP) E. Amaldi Fondamenti di R.O. Politecnico di Milano 1 General Integer Linear Program: (ILP) min c T x Ax b x 0 integer Assumption: A, b integer The integrality condition

### Diagonalization. Ahto Buldas. Lecture 3 of Complexity Theory October 8, 2009. Slides based on S.Aurora, B.Barak. Complexity Theory: A Modern Approach.

Diagonalization Slides based on S.Aurora, B.Barak. Complexity Theory: A Modern Approach. Ahto Buldas Ahto.Buldas@ut.ee Background One basic goal in complexity theory is to separate interesting complexity

### On the Relationship between Classes P and NP

Journal of Computer Science 8 (7): 1036-1040, 2012 ISSN 1549-3636 2012 Science Publications On the Relationship between Classes P and NP Anatoly D. Plotnikov Department of Computer Systems and Networks,

### Transportation Polytopes: a Twenty year Update

Transportation Polytopes: a Twenty year Update Jesús Antonio De Loera University of California, Davis Based on various papers joint with R. Hemmecke, E.Kim, F. Liu, U. Rothblum, F. Santos, S. Onn, R. Yoshida,

### 136 CHAPTER 4. INDUCTION, GRAPHS AND TREES

136 TER 4. INDUCTION, GRHS ND TREES 4.3 Graphs In this chapter we introduce a fundamental structural idea of discrete mathematics, that of a graph. Many situations in the applications of discrete mathematics

### Introduction to computer science

Introduction to computer science Michael A. Nielsen University of Queensland Goals: 1. Introduce the notion of the computational complexity of a problem, and define the major computational complexity classes.

### Reductions & NP-completeness as part of Foundations of Computer Science undergraduate course

Reductions & NP-completeness as part of Foundations of Computer Science undergraduate course Alex Angelopoulos, NTUA January 22, 2015 Outline Alex Angelopoulos (NTUA) FoCS: Reductions & NP-completeness-

### 5.1 Bipartite Matching

CS787: Advanced Algorithms Lecture 5: Applications of Network Flow In the last lecture, we looked at the problem of finding the maximum flow in a graph, and how it can be efficiently solved using the Ford-Fulkerson

### Lecture 7: NP-Complete Problems

IAS/PCMI Summer Session 2000 Clay Mathematics Undergraduate Program Basic Course on Computational Complexity Lecture 7: NP-Complete Problems David Mix Barrington and Alexis Maciel July 25, 2000 1. Circuit

### Approximation Algorithms

Approximation Algorithms or: How I Learned to Stop Worrying and Deal with NP-Completeness Ong Jit Sheng, Jonathan (A0073924B) March, 2012 Overview Key Results (I) General techniques: Greedy algorithms

### Introduction to Algorithms. Part 3: P, NP Hard Problems

Introduction to Algorithms Part 3: P, NP Hard Problems 1) Polynomial Time: P and NP 2) NP-Completeness 3) Dealing with Hard Problems 4) Lower Bounds 5) Books c Wayne Goddard, Clemson University, 2004 Chapter

### Complexity Classes P and NP

Complexity Classes P and NP MATH 3220 Supplemental Presentation by John Aleshunas The cure for boredom is curiosity. There is no cure for curiosity Dorothy Parker Computational Complexity Theory In computer

### P versus NP, and More

1 P versus NP, and More Great Ideas in Theoretical Computer Science Saarland University, Summer 2014 If you have tried to solve a crossword puzzle, you know that it is much harder to solve it than to verify

### Computer Algorithms. NP-Complete Problems. CISC 4080 Yanjun Li

Computer Algorithms NP-Complete Problems NP-completeness The quest for efficient algorithms is about finding clever ways to bypass the process of exhaustive search, using clues from the input in order

### Guessing Game: NP-Complete?

Guessing Game: NP-Complete? 1. LONGEST-PATH: Given a graph G = (V, E), does there exists a simple path of length at least k edges? YES 2. SHORTEST-PATH: Given a graph G = (V, E), does there exists a simple

### CMPSCI611: Approximating MAX-CUT Lecture 20

CMPSCI611: Approximating MAX-CUT Lecture 20 For the next two lectures we ll be seeing examples of approximation algorithms for interesting NP-hard problems. Today we consider MAX-CUT, which we proved to

### Graph Theory Problems and Solutions

raph Theory Problems and Solutions Tom Davis tomrdavis@earthlink.net http://www.geometer.org/mathcircles November, 005 Problems. Prove that the sum of the degrees of the vertices of any finite graph is

### 1. Nondeterministically guess a solution (called a certificate) 2. Check whether the solution solves the problem (called verification)

Some N P problems Computer scientists have studied many N P problems, that is, problems that can be solved nondeterministically in polynomial time. Traditionally complexity question are studied as languages:

### THE TURING DEGREES AND THEIR LACK OF LINEAR ORDER

THE TURING DEGREES AND THEIR LACK OF LINEAR ORDER JASPER DEANTONIO Abstract. This paper is a study of the Turing Degrees, which are levels of incomputability naturally arising from sets of natural numbers.

### Lecture 2: Universality

CS 710: Complexity Theory 1/21/2010 Lecture 2: Universality Instructor: Dieter van Melkebeek Scribe: Tyson Williams In this lecture, we introduce the notion of a universal machine, develop efficient universal

### Notes on Complexity Theory Last updated: August, 2011. Lecture 1

Notes on Complexity Theory Last updated: August, 2011 Jonathan Katz Lecture 1 1 Turing Machines I assume that most students have encountered Turing machines before. (Students who have not may want to look

### NP-complete? NP-hard? Some Foundations of Complexity. Prof. Sven Hartmann Clausthal University of Technology Department of Informatics

NP-complete? NP-hard? Some Foundations of Complexity Prof. Sven Hartmann Clausthal University of Technology Department of Informatics Tractability of Problems Some problems are undecidable: no computer

### Math 181 Handout 16. Rich Schwartz. March 9, 2010

Math 8 Handout 6 Rich Schwartz March 9, 200 The purpose of this handout is to describe continued fractions and their connection to hyperbolic geometry. The Gauss Map Given any x (0, ) we define γ(x) =

### Theory of Computation Prof. Kamala Krithivasan Department of Computer Science and Engineering Indian Institute of Technology, Madras

Theory of Computation Prof. Kamala Krithivasan Department of Computer Science and Engineering Indian Institute of Technology, Madras Lecture No. # 31 Recursive Sets, Recursively Innumerable Sets, Encoding

### Lattice Point Geometry: Pick s Theorem and Minkowski s Theorem. Senior Exercise in Mathematics. Jennifer Garbett Kenyon College

Lattice Point Geometry: Pick s Theorem and Minkowski s Theorem Senior Exercise in Mathematics Jennifer Garbett Kenyon College November 18, 010 Contents 1 Introduction 1 Primitive Lattice Triangles 5.1

### Theorem (informal statement): There are no extendible methods in David Chalmers s sense unless P = NP.

Theorem (informal statement): There are no extendible methods in David Chalmers s sense unless P = NP. Explication: In his paper, The Singularity: A philosophical analysis, David Chalmers defines an extendible

### Reminder: Complexity (1) Parallel Complexity Theory. Reminder: Complexity (2) Complexity-new

Reminder: Complexity (1) Parallel Complexity Theory Lecture 6 Number of steps or memory units required to compute some result In terms of input size Using a single processor O(1) says that regardless of

### Reminder: Complexity (1) Parallel Complexity Theory. Reminder: Complexity (2) Complexity-new GAP (2) Graph Accessibility Problem (GAP) (1)

Reminder: Complexity (1) Parallel Complexity Theory Lecture 6 Number of steps or memory units required to compute some result In terms of input size Using a single processor O(1) says that regardless of

### CHAPTER SIX IRREDUCIBILITY AND FACTORIZATION 1. BASIC DIVISIBILITY THEORY

January 10, 2010 CHAPTER SIX IRREDUCIBILITY AND FACTORIZATION 1. BASIC DIVISIBILITY THEORY The set of polynomials over a field F is a ring, whose structure shares with the ring of integers many characteristics.

### Chapter 1. Computation theory

Chapter 1. Computation theory In this chapter we will describe computation logic for the machines. This topic is a wide interdisciplinary field, so that the students can work in an interdisciplinary context.

### Discrete Mathematics & Mathematical Reasoning Chapter 10: Graphs

Discrete Mathematics & Mathematical Reasoning Chapter 10: Graphs Kousha Etessami U. of Edinburgh, UK Kousha Etessami (U. of Edinburgh, UK) Discrete Mathematics (Chapter 6) 1 / 13 Overview Graphs and Graph

### JUST-IN-TIME SCHEDULING WITH PERIODIC TIME SLOTS. Received December May 12, 2003; revised February 5, 2004

Scientiae Mathematicae Japonicae Online, Vol. 10, (2004), 431 437 431 JUST-IN-TIME SCHEDULING WITH PERIODIC TIME SLOTS Ondřej Čepeka and Shao Chin Sung b Received December May 12, 2003; revised February

### Lecture 15 An Arithmetic Circuit Lowerbound and Flows in Graphs

CSE599s: Extremal Combinatorics November 21, 2011 Lecture 15 An Arithmetic Circuit Lowerbound and Flows in Graphs Lecturer: Anup Rao 1 An Arithmetic Circuit Lower Bound An arithmetic circuit is just like

### The Trip Scheduling Problem

The Trip Scheduling Problem Claudia Archetti Department of Quantitative Methods, University of Brescia Contrada Santa Chiara 50, 25122 Brescia, Italy Martin Savelsbergh School of Industrial and Systems

### MATH10040 Chapter 2: Prime and relatively prime numbers

MATH10040 Chapter 2: Prime and relatively prime numbers Recall the basic definition: 1. Prime numbers Definition 1.1. Recall that a positive integer is said to be prime if it has precisely two positive

### Diversity Coloring for Distributed Data Storage in Networks 1

Diversity Coloring for Distributed Data Storage in Networks 1 Anxiao (Andrew) Jiang and Jehoshua Bruck California Institute of Technology Pasadena, CA 9115, U.S.A. {jax, bruck}@paradise.caltech.edu Abstract

### On the independence number of graphs with maximum degree 3

On the independence number of graphs with maximum degree 3 Iyad A. Kanj Fenghui Zhang Abstract Let G be an undirected graph with maximum degree at most 3 such that G does not contain any of the three graphs

### Labeling outerplanar graphs with maximum degree three

Labeling outerplanar graphs with maximum degree three Xiangwen Li 1 and Sanming Zhou 2 1 Department of Mathematics Huazhong Normal University, Wuhan 430079, China 2 Department of Mathematics and Statistics

### Computational complexity theory

Computational complexity theory Goal: A general theory of the resources needed to solve computational problems What types of resources? Time What types of computational problems? decision problem Decision

### Mathematics for Computer Science/Software Engineering. Notes for the course MSM1F3 Dr. R. A. Wilson

Mathematics for Computer Science/Software Engineering Notes for the course MSM1F3 Dr. R. A. Wilson October 1996 Chapter 1 Logic Lecture no. 1. We introduce the concept of a proposition, which is a statement

### Quantum and Non-deterministic computers facing NP-completeness

Quantum and Non-deterministic computers facing NP-completeness Thibaut University of Vienna Dept. of Business Administration Austria Vienna January 29th, 2013 Some pictures come from Wikipedia Introduction

### Lecture 1: Course overview, circuits, and formulas

Lecture 1: Course overview, circuits, and formulas Topics in Complexity Theory and Pseudorandomness (Spring 2013) Rutgers University Swastik Kopparty Scribes: John Kim, Ben Lund 1 Course Information Swastik

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

### Analysis of Algorithms, I

Analysis of Algorithms, I CSOR W4231.002 Eleni Drinea Computer Science Department Columbia University Thursday, February 26, 2015 Outline 1 Recap 2 Representing graphs 3 Breadth-first search (BFS) 4 Applications

### Single machine parallel batch scheduling with unbounded capacity

Workshop on Combinatorics and Graph Theory 21th, April, 2006 Nankai University Single machine parallel batch scheduling with unbounded capacity Yuan Jinjiang Department of mathematics, Zhengzhou University

### Why? A central concept in Computer Science. Algorithms are ubiquitous.

Analysis of Algorithms: A Brief Introduction Why? A central concept in Computer Science. Algorithms are ubiquitous. Using the Internet (sending email, transferring files, use of search engines, online

### Structural properties of oracle classes

Structural properties of oracle classes Stanislav Živný Computing Laboratory, University of Oxford, Wolfson Building, Parks Road, Oxford, OX1 3QD, UK Abstract Denote by C the class of oracles relative

### princeton univ. F 13 cos 521: Advanced Algorithm Design Lecture 6: Provable Approximation via Linear Programming Lecturer: Sanjeev Arora

princeton univ. F 13 cos 521: Advanced Algorithm Design Lecture 6: Provable Approximation via Linear Programming Lecturer: Sanjeev Arora Scribe: One of the running themes in this course is the notion of

### Catalan Numbers. Thomas A. Dowling, Department of Mathematics, Ohio State Uni- versity.

7 Catalan Numbers Thomas A. Dowling, Department of Mathematics, Ohio State Uni- Author: versity. Prerequisites: The prerequisites for this chapter are recursive definitions, basic counting principles,

### each college c i C has a capacity q i - the maximum number of students it will admit

n colleges in a set C, m applicants in a set A, where m is much larger than n. each college c i C has a capacity q i - the maximum number of students it will admit each college c i has a strict order i

### A Fast Algorithm For Finding Hamilton Cycles

A Fast Algorithm For Finding Hamilton Cycles by Andrew Chalaturnyk A thesis presented to the University of Manitoba in partial fulfillment of the requirements for the degree of Masters of Science in Computer

### Tutorial 8. NP-Complete Problems

Tutorial 8 NP-Complete Problems Decision Problem Statement of a decision problem Part 1: instance description defining the input Part 2: question stating the actual yesor-no question A decision problem

### 1 Introduction. Linear Programming. Questions. A general optimization problem is of the form: choose x to. max f(x) subject to x S. where.

Introduction Linear Programming Neil Laws TT 00 A general optimization problem is of the form: choose x to maximise f(x) subject to x S where x = (x,..., x n ) T, f : R n R is the objective function, S

### Partitioning edge-coloured complete graphs into monochromatic cycles and paths

arxiv:1205.5492v1 [math.co] 24 May 2012 Partitioning edge-coloured complete graphs into monochromatic cycles and paths Alexey Pokrovskiy Departement of Mathematics, London School of Economics and Political

### (IALC, Chapters 8 and 9) Introduction to Turing s life, Turing machines, universal machines, unsolvable problems.

3130CIT: Theory of Computation Turing machines and undecidability (IALC, Chapters 8 and 9) Introduction to Turing s life, Turing machines, universal machines, unsolvable problems. An undecidable problem

### 1 = (a 0 + b 0 α) 2 + + (a m 1 + b m 1 α) 2. for certain elements a 0,..., a m 1, b 0,..., b m 1 of F. Multiplying out, we obtain

Notes on real-closed fields These notes develop the algebraic background needed to understand the model theory of real-closed fields. To understand these notes, a standard graduate course in algebra is

### Finding and counting given length cycles

Finding and counting given length cycles Noga Alon Raphael Yuster Uri Zwick Abstract We present an assortment of methods for finding and counting simple cycles of a given length in directed and undirected

### Introduction to Algorithms Review information for Prelim 1 CS 4820, Spring 2010 Distributed Wednesday, February 24

Introduction to Algorithms Review information for Prelim 1 CS 4820, Spring 2010 Distributed Wednesday, February 24 The final exam will cover seven topics. 1. greedy algorithms 2. divide-and-conquer algorithms

### Lecture 19: Introduction to NP-Completeness Steven Skiena. Department of Computer Science State University of New York Stony Brook, NY 11794 4400

Lecture 19: Introduction to NP-Completeness Steven Skiena Department of Computer Science State University of New York Stony Brook, NY 11794 4400 http://www.cs.sunysb.edu/ skiena Reporting to the Boss Suppose

### CS 3719 (Theory of Computation and Algorithms) Lecture 4

CS 3719 (Theory of Computation and Algorithms) Lecture 4 Antonina Kolokolova January 18, 2012 1 Undecidable languages 1.1 Church-Turing thesis Let s recap how it all started. In 1990, Hilbert stated a

### THE PROBLEM WORMS (1) WORMS (2) THE PROBLEM OF WORM PROPAGATION/PREVENTION THE MINIMUM VERTEX COVER PROBLEM

1 THE PROBLEM OF WORM PROPAGATION/PREVENTION I.E. THE MINIMUM VERTEX COVER PROBLEM Prof. Tiziana Calamoneri Network Algorithms A.y. 2014/15 2 THE PROBLEM WORMS (1)! A computer worm is a standalone malware

### CSE 135: Introduction to Theory of Computation Decidability and Recognizability

CSE 135: Introduction to Theory of Computation Decidability and Recognizability Sungjin Im University of California, Merced 04-28, 30-2014 High-Level Descriptions of Computation Instead of giving a Turing

### Revised Version of Chapter 23. We learned long ago how to solve linear congruences. ax c (mod m)

Chapter 23 Squares Modulo p Revised Version of Chapter 23 We learned long ago how to solve linear congruences ax c (mod m) (see Chapter 8). It s now time to take the plunge and move on to quadratic equations.

### CHAPTER 9. Integer Programming

CHAPTER 9 Integer Programming An integer linear program (ILP) is, by definition, a linear program with the additional constraint that all variables take integer values: (9.1) max c T x s t Ax b and x integral

### One last point: we started off this book by introducing another famously hard search problem:

S. Dasgupta, C.H. Papadimitriou, and U.V. Vazirani 261 Factoring One last point: we started off this book by introducing another famously hard search problem: FACTORING, the task of finding all prime factors

### Zachary Monaco Georgia College Olympic Coloring: Go For The Gold

Zachary Monaco Georgia College Olympic Coloring: Go For The Gold Coloring the vertices or edges of a graph leads to a variety of interesting applications in graph theory These applications include various

### Stationary random graphs on Z with prescribed iid degrees and finite mean connections

Stationary random graphs on Z with prescribed iid degrees and finite mean connections Maria Deijfen Johan Jonasson February 2006 Abstract Let F be a probability distribution with support on the non-negative

### A Turán Type Problem Concerning the Powers of the Degrees of a Graph

A Turán Type Problem Concerning the Powers of the Degrees of a Graph Yair Caro and Raphael Yuster Department of Mathematics University of Haifa-ORANIM, Tivon 36006, Israel. AMS Subject Classification:

### SIMS 255 Foundations of Software Design. Complexity and NP-completeness

SIMS 255 Foundations of Software Design Complexity and NP-completeness Matt Welsh November 29, 2001 mdw@cs.berkeley.edu 1 Outline Complexity of algorithms Space and time complexity ``Big O'' notation Complexity

### THE NUMBER OF GRAPHS AND A RANDOM GRAPH WITH A GIVEN DEGREE SEQUENCE. Alexander Barvinok

THE NUMBER OF GRAPHS AND A RANDOM GRAPH WITH A GIVEN DEGREE SEQUENCE Alexer Barvinok Papers are available at http://www.math.lsa.umich.edu/ barvinok/papers.html This is a joint work with J.A. Hartigan

### What s next? Reductions other than kernelization

What s next? Reductions other than kernelization Dániel Marx Humboldt-Universität zu Berlin (with help from Fedor Fomin, Daniel Lokshtanov and Saket Saurabh) WorKer 2010: Workshop on Kernelization Nov

### ON THE COMPLEXITY OF THE GAME OF SET. {kamalika,pbg,dratajcz,hoeteck}@cs.berkeley.edu

ON THE COMPLEXITY OF THE GAME OF SET KAMALIKA CHAUDHURI, BRIGHTEN GODFREY, DAVID RATAJCZAK, AND HOETECK WEE {kamalika,pbg,dratajcz,hoeteck}@cs.berkeley.edu ABSTRACT. Set R is a card game played with a

### POLYNOMIAL RINGS AND UNIQUE FACTORIZATION DOMAINS

POLYNOMIAL RINGS AND UNIQUE FACTORIZATION DOMAINS RUSS WOODROOFE 1. Unique Factorization Domains Throughout the following, we think of R as sitting inside R[x] as the constant polynomials (of degree 0).

### The Classes P and NP. mohamed@elwakil.net

Intractable Problems The Classes P and NP Mohamed M. El Wakil mohamed@elwakil.net 1 Agenda 1. What is a problem? 2. Decidable or not? 3. The P class 4. The NP Class 5. TheNP Complete class 2 What is a

### Fairness in Routing and Load Balancing

Fairness in Routing and Load Balancing Jon Kleinberg Yuval Rabani Éva Tardos Abstract We consider the issue of network routing subject to explicit fairness conditions. The optimization of fairness criteria

### Offline sorting buffers on Line

Offline sorting buffers on Line Rohit Khandekar 1 and Vinayaka Pandit 2 1 University of Waterloo, ON, Canada. email: rkhandekar@gmail.com 2 IBM India Research Lab, New Delhi. email: pvinayak@in.ibm.com