Save this PDF as:

Size: px
Start display at page:

## Transcription

1 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 to any NPcomplete problem. We can prove that either all NP-complete solutions have polynomial-time solutions, or none of them do. It is generally believed that none of them do. But proving this would require solving the P versus NP problem, one of the best known unsolved problems in mathematics, much less theoretical computer science. NP-completeness is a property of decision problems. It can be used to prove that other types of problems are NPhard, which means that (unless P = NP) they have no polynomial-time solutions. These include search, optimization, and approximation problems. 1

2 Definition: The class P is the set of decision problems for which there exists an algorithm solving them in O(n k ) time for some constant k. Definition: A formal language A is in NP if there exists another language B in P, such that for any string x, x is in A iff there exists a string y, with y = x O(1), such that (x, y) is in B. An equivalent, more algorithmic definition of NP is as follows. An NP-procedure consists of a guess phase and a verification phase. Given an input x, the guess phase chooses an arbitrary string y such that y = x O(1). The verification phase is an algorithm that takes both x and y as input and returns a bit. We say that x is in the language of the NP-procedure iff it is possible for the procedure to guess a y making the verification phase output true. There is an obvious deterministic decision procedure for any NP language simply cycle through all possible strings y and see whether the verification procedure accepts (x, y). The problem is that there are 2 no(1) possible y s, of course. Our question is whether there is a better way to decide membership in the NP language, one that might run in polynomial time. 2

3 Proving a language to be in NP is generally simple. We need to define a string to be guessed, and define a polytime verification procedure that accepts the input and a guess iff the guess proves that the input is in the language. We need to determine relationships among the languages in NP, using the notion of reduction. We want to show that if problem B is in P, then so is problem A. One way to do this is to describe an algorithm for A would run in polynomial time if it were allowed to make calls to a hypothetical poly-time algorithm to decide membership in B. This is called a Cook reduction. For defining NPcompleteness, though, we will need a slightly different notion of reduction. Let A and B be two formal languages, possibly over different alphabets. A Karp reduction from A to B is a poly-time computable function f such that for any string x, x A if and only if f(x) B. If such a reduction exists we say that A is poly-time reducible to B and write A p B. We also sometimes read this as A is no harder than B. 3

4 Two languages A and B are said to be p-equivalent if both A p B and B p A. The relation p is a partial order on the equivalence classes. We are interested in the maximal equivalence class in NP: Definition: A language B is NP-complete if (1) it is in NP, and (2) for any language A in NP, A p B. Thus the NP-complete languages, if they exist, are the hardest languages in NP. It should be easy to see that they form an equivalence class, and that if any NP-complete language is also in P, it follows that P = NP. If a language is NP-complete, then, we have strong evidence that it is not in P. We can use the NP-completeness of a language to talk about non-decision problems, even though by definition these cannot be NP-complete. Definition: A problem X (with boolean output or otherwise) is said to be NP-hard if there is a Cook reduction from X to some NP-complete problem B. That is, there is a poly-time algorithm, with access to a hypothetical poly-time algorithm for X, that decides B. It should be clear that if X is NP-hard and there actually is a poly-time algorithm for X, then P = NP. 4

5 Our general methodology will be to develop a library of NP-complete problems. Once we have one problem, there is a straightforward way to get more: Lemma: Let B be an NP-complete language and A be a language. If we prove: A NP B p A then we may conclude that A is NP-complete. But how do we start this process? In CMPSCI 601, we prove the Cook-Levin Theorem, that the language SAT is NP-complete. Last time, we gave an unconditional proof that a particular generic NP language is NP-complete. We ll still need the Cook-Levin Theorem, because SAT is a much more convenient starting place to build up a library of NP-complete languages. 5

6 CMPSCI611: SAT and 3-SAT Lecture 17 Remember that a boolean formula is defined to be satisfiable if there is at least one setting of its input variables that makes it true. The language SAT is the set of boolean formulas that are satisfiable. Recall that a boolean formula is in conjunctive normal form (CNF) if it is the AND of zero or more clauses, each of which is the OR of zero or more literals. A formula is in 3-CNF if it is in CNF and has at most three literals in any clause. The language CNF-SAT is the set of CNF formulas that are satisfiable, and the language 3-SAT is the set of 3-CNF formulas that are satisfiable. Note that 3-SAT is a subset of CNF-SAT, which is a subset of SAT. In general, if A B, we can t be certain that A p B. Although the identity function maps elements of A to elements of B, we can t be sure that it doesn t map a non-element of A to an element of B. But here we know more we can easily test a formula to see whether it is in CNF or 3-CNF. To reduce 3-SAT to SAT, for example, we map a formula ϕ to itself if it is in 3-CNF, and to 0 if it is not. A similar reduction works to show A p B whenever A is such an identifiable special case of B that is, when A = B C and C P. 6

7 The Cook-Levin Theorem tells us that SAT is NP-complete, essentially by mapping an instance of the generic NP problem to a formula that says that a particular string is a witness for a particular NP-procedure on a particular input. (Recall that if A is an NP language defined so that x A iff y : (x, y) B, we call y variously a witness, proof, or certificate of x s membership in A.) We d like to show that CNF-SAT and 3-SAT are also NPcomplete. It s clear that they are in NP, but the easy special case reduction does not suffice to show them NPcomplete. We can reduce 3-SAT to SAT, but what we need is to reduce the known NP-complete language, SAT, to the language we want to show to be NP-complete, 3- SAT. On HW#4 I ll have you work through the general reduction from SAT to 3-SAT. Here, I ll present the easier reduction from CNF-SAT to 3-SAT. (The proof of the Cook-Levin Theorem given in CMPSCI 601 actually shows directly that CNF-SAT is NP-complete.) 7

8 Let s now see how to reduce CNF-SAT to 3-SAT. We need a function f that takes a CNF formula ϕ, in CNF, and produces a new formula f(ϕ) such that f(ϕ) is in 3- CNF and the two formulas are either both satisfiable or both unsatisfiable. If we could make ϕ and f(ϕ) equivalent, this would do, but there is no reason to think that an arbitrary CNF formula will even have a 3-CNF equivalent form. (Every formula can be translated into CNF, but not necessarily into 3-CNF.) Instead we will make f(ϕ) have a different meaning from ϕ, and even a different set of variables. We will add variables to f(ϕ) in such a way that a satisfying setting of both old and new variables of f(ϕ) will exist if and only if there is a satisfying setting of the old variables alone in ϕ. In fact the old variables will be set the same way in each formula. Because ϕ is in CNF, we know that it is the AND of clauses, which we may name (l l 1k1 ), (l l 2k2 ),... (l 1m... l mkm ), where the l s are each literals. For each of these clauses in ϕ, we will make one or more 3-CNF clauses in f(ϕ), possibly including new variables, so that the one clause in ϕ will be satisfied iff all the corresponding clauses in f(ϕ) are satisfied. 8

9 So let s consider a single clause l 1... l k in ϕ. If k 3, we can simply copy the clause over to f(ϕ), because it is already suitable for a CNF formula. What if k = 4? We can add one extra variable and make two clauses: (l 1 l 2 x 1 ) and ( x 1 l 3 l 4 ). It s not too hard to see that both of these clauses are satisfied iff at least one of the l s is true. If l 1 or l 2 is true, we can afford to make x 1 false, and if l 3 or l 4 is true, we can make x 1 true. The general construction for k > 4 is similar. We have k 2 clauses and k 3 new variables: The clauses are (l 1 l 2 x 1 ), ( x 1 l 3 x 2 ), ( x 2 l 4 x 3 ), and so on until we reach ( x k 4 l k 2 x k 3 ) and finally ( x k 3 l k 1 l k ). If we satisfy the original clause with some l i, this satisfies one of the new clauses, and we can satisfy the others by making all the x i s before it true and all those after it false. Conversely, if we satisfy all the new clauses, we cannot have done it only with x i s because there are more clauses than x i s and each x i only appears at most once as true and at most once as false, and so can satisfy at most one clause. 9

10 Since this reduction is easily computable in polynomial time, it shows that CNF-SAT p 3-SAT, and thus (with the quoted result that CNF-SAT is NP-complete) that 3- SAT is NP-complete. 3-SAT is often the most convenient problem to reduce to something else, but other variants of SAT are also sometimes useful. One we ll use later is not-all-equal-sat or NAE-SAT. Here the input is a formula in 3-CNF, but the formula is satisfied only if there is both a true literal and a false literal in each clause. Let s prove that NAE-SAT is NP-complete. Is it in NP? Yes, if we guess a satisfying assignment it is easy (in linear time) to check the input formula and verify that there is a true literal and a false literal in each clause. So we need to reduce a known NP-complete problem to NAE- SAT we ll choose 3-SAT itself. Again we ll transform each old clause into the AND of some new clauses, in this case three of them. 10

11 Given the clause l 1 l 2 l 3, we introduce two new variables x and y that appear only in the new clauses for this clause, and a single new variable α that appears several times. The three new clauses are (l 1 l 2 x) ( x l 3 y) (x y α). We must show that the three new clauses are jointly NAEsatisfiable iff the original clause is satisfiable in the ordinary way. First, we assume that the old clause is satisfied and show that we can choose values for x, y, and α to NAE-satisfy the new clauses. We make α true (for all the clauses in the formula) and consider the seven possibilities for the values of l 1, l 2, and l 3. In each of the seven cases, we can set x and y, not both true, to NAE-satisfy the three new clauses we ll check this on the board. 11

12 Now assume that the three new clauses are NAE-satisfied we will show that at least one of the l i s is true. First assume that α is true, because if the new formula is NAEsatisfied with α false we can just negate every variable in the formula and get a setting that NAE-satisfies all the clauses but has α true. If α is true, then either x or y must be false. If x is false, then either l 1 or l 2 must be true. If y is false and x is true, then l 3 must be true. So one of the three l s must be true, and the original clause is satisfied in the ordinary way. 12

13 CMPSCI611: CLIQUE and VERTEX-COVER Lecture 17 So far we ve seen that several problems in logic are NPcomplete. In fact there are NP-complete problems in a huge array of domains we ll next look at some problems in graph theory, similar to some problems we ve already solved in polynomial time. Let G be an undirected graph. A clique in G is a set A of vertices such that all possible edges between elements of A exist in G. Any vertex forms a clique of size 1, the endpoints of any edge form a clique of size 2, and any triangle is a clique of size 3. The language CLIQUE is the set of pairs (G, k) such that G is an undirected graph that contains some clique of size k. It should be clear that CLIQUE is in the class NP. Our NP-procedure guesses an arbitrary set A of vertices (by guessing a bitvector of length n). Then the verification phase checks that A has size exactly k and that there is an edge between every pair of vertices in A. 13

14 We ll prove CLIQUE to be NP-complete by reducing 3- SAT to it. Recall that this means defining a function from 3-CNF formulas to graph-integer pairs, such that satisfiable formulas are mapped to pairs (G, k) such that G has a k-clique and unsatisfiable formulas are mapped to pairs where G does not have a k-clique. The essential element of any reduction is a correspondence between the witnesses of the two NP-problems. The 3-CNF formula is satisfied or not satisfied by a bitvector of length n, and the possible cliques are also denoted by bitvectors. We want to arrange the graph so that a satisfying instance corresponds to a k-clique and vice versa, and we get to pick k for our convenience. Here s the construction. We have a node for each appearance of a literal in the formula. So if there are m clauses, each with k i literals, the number of vertices in the graph is the sum from 1 to m of k i. Now we need edges. We place an edge between nodes x and y if they refer to literals that occur in different clauses and are not in conflict (aren t negations of one another). We set k to be m, the number of clauses. 14

15 Nodes: Appearances of literals in clauses Edges: Pairs of nodes that are in different clauses and not in conflict. We claim that the 3-CNF formula is satisfiable iff there is an m-clique in the graph. First assume that there is a satisfying assignment, which means that there is at least one literal in each clause that is set true. Fix a set containing exactly one true literal in each clause. The m nodes corresponding to these literals must form a clique. No two of them are in the same clause, and no two of them can be in conflict, so all possible edges between then exist. Conversely, suppose that we have an m-clique in the graph. The m nodes must occur in m different clauses, since edges only connect nodes in different clauses. Because the m nodes also contain no conflicts, we can construct a setting of the variables consistent with all those literals. (We may have to arbitrarily set variables that don t occur in the set either as true or as false.) This setting makes at least one literal in each clause true, so it satisfies the formula. 15

16 With some easy reductions, we can use CLIQUE to prove some similar problems to be NP-complete. Again let G be an undirected graph. A set of vertices A is an independent set if there are no edges in G between vertices in A. The language IND-SET is the set of all pairs (G, k) such that there exists an independent set of size k in G. Clearly IND-SET is in NP, because we can guess the set A, verify its size, and verify that it contains no edges. We prove IND-SET to be NP-complete by reducing CLIQUE to it, now that we know CLIQUE to be NP-complete. This reduction will be a function that takes pairs (G, k) to pairs (H, l) such that G has a clique of size k iff H has an independent set of size l. But this is easy! The problems are very similar, so much so that we can give H the same set of vertices as G and arrange that a set A is a clique in G iff it is an independent set in H. How do we do this? We want to map sets with all the edges to sets with none of the edges, so we just make H the complement of G the graph that has an edge (x, y) exactly when that edge is not an edge of G. Then the function taking (G, k) to (H, k) is the desired reduction. 16

17 Another similar problem is VERTEX-COVER. A set A of nodes of an undirected graph G is a vertex cover if every edge of G has at least one endpoint in A. The language VERTEX-COVER is the set of pairs (G, k) such that G has a vertex cover of size k. As before, it is clear that VERTEX-COVER is in NP. The Adler notes give a direct reduction from 3-SAT to VERTEX-COVER, which is very similar to the reduction from 3-SAT to CLIQUE. But we don t need to use this reduction, because it s very easy to reduce CLIQUE or IND-SET to VERTEX-COVER and thus use our previous work to prove VERTEX-COVER to be NP-complete. If A V is a vertex cover in G, look at the set V \ A of nodes not in A. There are no edges between these nodes, since every edge has at least one endpoint in A. So V \ A is an independent set in fact it is an independent set iff A is a vertex cover. So G has a vertex cover of size k iff it has an independent set of size n k. Thus the function taking (G, k) to (G, n k) is a reduction from IND-SET to VERTEX- COVER, proving that the latter problem is NP-complete. 17

18 We don t want to get carried away with this sort of argument, though. Consider the language NON-CLIQUE, defined to be the set of pairs (G, k) such that G does not have a clique of size k. Is this problem NP-complete? In all likelihood, it is not. A Karp reduction must take yes-instances of one problem to yes-instances of the other, so the identity map is not a Karp reduction. In fact it s not at all clear that NON-CLIQUE is in NP, because there is nothing that we can guess to prove that a clique does not exist. 18

19 We define a class co-np to be the set of languages whose complements are in NP. (Note that this is quite different from the complement operation taking us from CLIQUE to IND-SET.) We can define co-np-completeness analogously to NP-completeness, and see that a language is co-np-complete iff its complement is NP-complete. Could a language be both? It follows easily from the definitions that if there is, NP and co-np are the same class. This is considered unlikely, though not quite as unlikely as P and NP being the same. A Cook reduction is allowed to take the answer of a query and negate it, so there is a simple Cook reduction from CLIQUE to NON-CLIQUE. (To decide whether (G, k) is in CLIQUE, determine whether the same pair is in NON-CLIQUE and reverse the answer.) So the co-npcomplete problems are all NP-hard, though probably not NP-complete. A final note if we insist that k or n k be a constant, CLIQUE and these other problems become solvable in P, because we now have time to guess all possible cliques (or independent sets, or vertex covers). Sometimes an identifiable special case of an NP-complete problem is easier. 19

20 CMPSCI611: The SUBSET-SUM Problem Lecture 17 For our final problem today, we revisit the SUBSET-SUM problem the input is a set of numbers {a 1,..., a n } and a target number t, and we ask whether there is a subset of the numbers that add exactly to t. Using dynamic programming, we showed that we could decide this language in time that is polynomial in n and s, the sum of all the a i. Now we allow the numbers to get larger, so that they now might be n bits long. The problem is still in NP, because we can guess a subset by guessing a bitvector, add the numbers in the set, and verify that we get t. But it s no longer clear that we are in P, and in fact we will now see that the general problem is NP-complete. We reduce 3-SAT to SUBSET-SUM (with large numbers). We first assume that every clause in our input formula has exactly three literals we can just repeat literals in the same clause to make this true. Our numbers will be represented in decimal notation, with a column for each of the v variables and a column for each clause in the formula. 20

21 We ll create an item a i for each of the 2v literals. This item will have a 1 in the column for its variable, a 1 in the column of each clause where the literal appears, and zeroes everywhere else. We also have two items for each clause, each with a 1 in the column for that clause and zeroes everywhere else. The target number has a 1 for each variable column and a 3 for each clause column. We now have to prove that there is a subset summing to the target iff the formula is satisfiable. If there is a satisfying assignment, we choose the item for each literal in that assignment. This has one 1 in each variable column, and somewhere from one to three 1 s in each clause column. Using extra items as needed, we can reach the target. Conversely, if we reach the target we must have chosen one item with a 1 in each variable column, so we have picked v variables forming an assignment. Since we have three 1 s in each clause column and at most two came from the extra items, we must have at least one 1 in each clause column from our assignment, making it a satisfying assignment. 21

22 Given a problem with numerical parameters, we say that it is pseudopolynomial if it becomes polynomial when those parameters are given in unary. If it is NP-complete with parameters given in unary, we say that it is strongly NP-complete. The SUBSET-SUM problem is pseudopolynomial, but all our graph problems are strongly NP-complete. Recall that the KNAPSACK is similar to SUBSET-SUM but has a value for each item as well as its weight. We are asked to find whether a set of at least a given value exists with at most a given weight. Since SUBSET-SUM is an identifiable special case of KNAPSACK (where weight and value are both equal), we know that SUBSET-SUM p KNAPSACK. Since KNAPSACK (as a decision problem) is in NP, it is NP-complete. The associated optimization problem is thus NP-hard. 22

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

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

### P, NP, NP-Complete, and NPhard

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

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

### The Complexity of Optimization Problems

The Complexity of Optimization Problems Summary Lecture 1 - Complexity of algorithms and problems - Complexity classes: P and NP - Reducibility - Karp reducibility - Turing reducibility Uniform and logarithmic

### Hardness of Approximation

Hardness of Approximation We have seen several methods to find approximation algorithms for NP-hard problems We have also seen a couple of examples where we could show lower bounds on the achievable approxmation

### Computer Science 385 Analysis of Algorithms Siena College Spring Topic Notes: Limitations of Algorithms

Computer Science 385 Analysis of Algorithms Siena College Spring 2011 Topic Notes: Limitations of Algorithms We conclude with a discussion of the limitations of the power of algorithms. That is, what kinds

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

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

### CSCI 1010 Models of Computa3on. Lecture 11 Proving Languages NP-Complete

CSCI 1010 Models of Computa3on Lecture 11 Proving Languages NP-Complete Overview P-3me reduc3ons Composi3on of P-3me reduc3ons Reduc3on from CIRCUIT SAT to SAT SAT is NP-complete. 3-SAT is NP-complete.

### PCPs and Inapproximability Gap-producing and Gap-Preserving Reductions. My T. Thai

PCPs and Inapproximability Gap-producing and Gap-Preserving Reductions My T. Thai 1 1 Hardness of Approximation Consider a maximization problem Π such as MAX-E3SAT. To show that it is NP-hard to approximation

### Advanced Topics in Theoretical Computer Science

Advanced Topics in Theoretical Computer Science Part 5: Complexity (Part II) 30.01.2014 Viorica Sofronie-Stokkermans Universität Koblenz-Landau e-mail: sofronie@uni-koblenz.de 1 Contents Recall: Turing

### 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 4 NP-completeness Recap: relations between classes EXP PSPACE = NPSPACE conp NP conp

### Notes on Complexity Theory Last updated: October, Lecture 6

Notes on Complexity Theory Last updated: October, 2015 Lecture 6 Notes by Jonathan Katz, lightly edited by Dov Gordon 1 PSPACE and PSPACE-Completeness As in our previous study of N P, it is useful to identify

### Definition: Alternating time and space Game Semantics: State of machine determines who

CMPSCI 601: Recall From Last Time Lecture Definition: Alternating time and space Game Semantics: State of machine determines who controls, White wants it to accept, Black wants it to reject. White wins

### Detecting Backdoor Sets with Respect to Horn and Binary Clauses

Detecting Backdoor Sets with Respect to Horn and Binary Clauses Naomi Nishimura 1,, Prabhakar Ragde 1,, and Stefan Szeider 2, 1 School of Computer Science, University of Waterloo, Waterloo, Ontario, N2L

### CSE 548: (Design and) Analysis of Algorithms

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

### IE418 Integer Programming

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

### A.Antonopoulos 18/1/2010

Class DP Basic orems 18/1/2010 Class DP Basic orems 1 Class DP 2 Basic orems Class DP Basic orems TSP Versions 1 TSP (D) 2 EXACT TSP 3 TSP COST 4 TSP (1) P (2) P (3) P (4) DP Class Class DP Basic orems

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

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

### The Polynomial Hierarchy

The Polynomial Hierarchy Slides based on S.Aurora, B.Barak. Complexity Theory: A Modern Approach. Ahto Buldas Ahto.Buldas@ut.ee Motivation..synthesizing circuits is exceedingly difficulty. It is even

### Topics in Complexity Theory

Topics in Complexity Theory 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

### We are going to discuss what it means for a sequence to converge in three stages: First, we define what it means for a sequence to converge to zero

Chapter Limits of Sequences Calculus Student: lim s n = 0 means the s n are getting closer and closer to zero but never gets there. Instructor: ARGHHHHH! Exercise. Think of a better response for the instructor.

### NP-complete Problems

NP-complete Problems HP, TSP, 3COL, 0/1IP Dimitris Diamantis µπλ November 6, 2014 Dimitris Diamantis (µπλ ) NP-complete Problems November 6, 2014 1 / 34 HAMILTON PATH is NP-Complete Definition Given an

### CS Introduction to Complexity Theory. Lecture #11: Dec 8th, 2015

CS 2401 - Introduction to Complexity Theory Lecture #11: Dec 8th, 2015 Lecturer: Toniann Pitassi Scribe Notes by: Xu Zhao 1 Communication Complexity Applications Communication Complexity (CC) has many

### Conjunctive Normal Form and SAT

Notes on Satisfiability-Based Problem Solving Conjunctive Normal Form and SAT David Mitchell mitchell@cs.sfu.ca September 19, 2013 This is a preliminary draft of these notes. Please do not distribute without

### DRAFT. Algebraic computation models. Chapter 14

Chapter 14 Algebraic computation models Somewhat rough We think of numerical algorithms root-finding, gaussian elimination etc. as operating over R or C, even though the underlying representation of the

### Theory of Computer Science. Theory of Computer Science. E5.1 Routing Problems. E5.2 Packing Problems. E5.3 Conclusion.

Theory of Computer Science May 31, 2017 E5. Some NP-Complete Problems, Part II Theory of Computer Science E5. Some NP-Complete Problems, Part II E5.1 Routing Problems Malte Helmert University of Basel

### Search and Optimization Problems. CSE 548: (Design and) Analysis of Algorithms. Hard Problems: Where you find yourself...

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

### De Morgan s a Laws. De Morgan s laws say that. (φ 1 φ 2 ) = φ 1 φ 2, (φ 1 φ 2 ) = φ 1 φ 2.

De Morgan s a Laws De Morgan s laws say that (φ 1 φ 2 ) = φ 1 φ 2, (φ 1 φ 2 ) = φ 1 φ 2. Here is a proof for the first law: φ 1 φ 2 (φ 1 φ 2 ) φ 1 φ 2 0 0 1 1 0 1 1 1 1 0 1 1 1 1 0 0 a Augustus DeMorgan

### satisfiability (sat) Satisfiability unsatisfiability (unsat or sat complement) and validity Any Expression φ Can Be Converted into CNFs and DNFs

Any Expression φ Can Be Converted into CNFs and DNFs φ = x j : This is trivially true. φ = φ 1 and a CNF is sought: Turn φ 1 into a DNF and apply de Morgan s laws to make a CNF for φ. φ = φ 1 and a DNF

### On the hardness of losing width

On the hardness of losing width Marek Cygan 1, Daniel Lokshtanov 2, Marcin Pilipczuk 1, Micha l Pilipczuk 1, and Saket Saurabh 3 1 Institute of Informatics, University of Warsaw, Poland {cygan@,malcin@,mp248287@students}mimuwedupl

### Lecture 20: PSPACE. November 15, 2016 CS 1010 Theory of Computation

Lecture 20: PSPACE November 15, 2016 CS 1010 Theory of Computation Recall that PSPACE = k=1 SPACE(nk ). We will see that a relationship between time and space complexity is given by: P NP PSPACE = NPSPACE

### Lecture Notes: The Halting Problem; Reductions

Lecture Notes: The Halting Problem; Reductions COMS W3261 Columbia University 20 Mar 2012 1 Review Key point. Turing machines can be encoded as strings, and other Turing machines can read those strings

### Foundations of Machine Learning and Data Science. Lecturer: Avrim Blum Lecture 9: October 7, 2015

10-806 Foundations of Machine Learning and Data Science Lecturer: Avrim Blum Lecture 9: October 7, 2015 1 Computational Hardness of Learning Today we will talk about some computational hardness results

### CMPSCI 601: Tarski s Truth Definition Lecture 15. where

@ CMPSCI 601: Tarski s Truth Definition Lecture 15! "\$#&%(') *+,-!".#/%0'!12 43 5 6 7 8:9 4; 9 9 < = 9 = or 5 6?>A@B!9 2 D for all C @B 9 CFE where ) CGE @B-HI LJKK MKK )HG if H ; C if H @ 1 > > > Fitch

### Lecture 14: IP = PSPACE

IAS/PCMI Summer Session 2000 Clay Mathematics Undergraduate Program Basic Course on Computational Complexity Lecture 14: IP = PSPACE David Mix Barrington and Alexis Maciel August 3, 2000 1. Overview We

### 9. PSPACE 9. PSPACE. PSPACE complexity class quantified satisfiability planning problem PSPACE-complete

Geography game Geography. Alice names capital city c of country she is in. Bob names a capital city c' that starts with the letter on which c ends. Alice and Bob repeat this game until one player is unable

### 9. PSPACE. PSPACE complexity class quantified satisfiability planning problem PSPACE-complete

9. PSPACE PSPACE complexity class quantified satisfiability planning problem PSPACE-complete Lecture slides by Kevin Wayne Copyright 2005 Pearson-Addison Wesley Copyright 2013 Kevin Wayne http://www.cs.princeton.edu/~wayne/kleinberg-tardos

### Determine the size of an instance of the minimum spanning tree problem.

3.1 Algorithm complexity Consider two alternative algorithms A and B for solving a given problem. Suppose A is O(n 2 ) and B is O(2 n ), where n is the size of the instance. Let n A 0 be the size of the

### Kernel-Size Lower Bounds. The Evidence from Complexity Theory

: The Evidence from Complexity Theory IAS Worker 2013, Warsaw Part 2/3 Note These slides are a slightly revised version of a 3-part tutorial given at the 2013 Workshop on Kernelization ( Worker ) at the

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

Theory of Computation CS3102 Spring 2015 A tale of computers, math, problem solving, life, love and tragic death Robbie Hott www.cs.virginia.edu/~jh2jf Department of Computer Science University of Virginia

### On vertex coloring without monochromatic triangles

On vertex coloring without monochromatic triangles arxiv:1710.07132v1 [cs.ds] 19 Oct 2017 Micha l Karpiński, Krzysztof Piecuch Institute of Computer Science University of Wroc law Joliot-Curie 15, 50-383

### Chapter 4: Computation tree logic

INFOF412 Formal verification of computer systems Chapter 4: Computation tree logic Mickael Randour Formal Methods and Verification group Computer Science Department, ULB March 2017 1 CTL: a specification

### 3 Propositional Logic

3 Propositional Logic 3.1 Syntax 3.2 Semantics 3.3 Equivalence and Normal Forms 3.4 Proof Procedures 3.5 Properties Propositional Logic (25th October 2007) 1 3.1 Syntax Definition 3.0 An alphabet Σ consists

### Space Complexity. The space complexity of a program is how much memory it uses.

Space Complexity The space complexity of a program is how much memory it uses. Measuring Space When we compute the space used by a TM, we do not count the input (think of input as readonly). We say that

### An introduction to Parameterized Complexity Theory

An introduction to Parameterized Complexity Theory May 15, 2012 A motivation to parametrize Definitions Standard Complexity Theory does not distinguish between the distinct parts of the input. It categorizes

### Theory of Computation

Theory of Computation Dr. Sarmad Abbasi Dr. Sarmad Abbasi () Theory of Computation / Lecture 3: Overview Decidability of Logical Theories Presburger arithmetic Decidability of Presburger Arithmetic Dr.

### Integer-Valued Polynomials

Integer-Valued Polynomials LA Math Circle High School II Dillon Zhi October 11, 2015 1 Introduction Some polynomials take integer values p(x) for all integers x. The obvious examples are the ones where

### CALCULUS I. Review. Paul Dawkins

CALCULUS I Review Paul Dawkins Table of Contents Preface... ii Review... 1 Introduction... 1 Review : Functions... Review : Inverse Functions...1 Review : Trig Functions...0 Review : Solving Trig Equations...7

### CS6840: Advanced Complexity Theory Mar 29, Lecturer: Jayalal Sarma M.N. Scribe: Dinesh K.

CS684: Advanced Complexity Theory Mar 29, 22 Lecture 46 : Size lower bounds for AC circuits computing Parity Lecturer: Jayalal Sarma M.N. Scribe: Dinesh K. Theme: Circuit Complexity Lecture Plan: Proof

### arxiv: v2 [cs.ds] 17 Sep 2013

Parameterized Complexity of the Anchored k-core Problem for Directed Graphs Rajesh Chitnis Fedor V. Fomin Petr A. Golovach arxiv:1304.5870v2 [cs.ds] 17 Sep 2013 Abstract Motivated by the study of unraveling

### 2.5 The Fundamental Theorem of Algebra.

2.5. THE FUNDAMENTAL THEOREM OF ALGEBRA. 79 2.5 The Fundamental Theorem of Algebra. We ve seen formulas for the (complex) roots of quadratic, cubic and quartic polynomials. It is then reasonable to ask:

### Descriptive Complexity and Some Unusual Quantifiers

MASSACHUSETTS INSTITUTE OF TECHNOLOGY 18.405J / 6.841J, ADVANCED COMPLEXITY THEORY Descriptive Complexity and Some Unusual Quantifiers Chelsea Voss May 6, 2016 Abstract. It is possible to define and operators

### Matching Triangles and Basing Hardness on an Extremely Popular Conjecture

Matching Triangles and Basing Hardness on an Extremely Popular Conjecture Amir Abboud 1, Virginia Vassilevska Williams 1, and Huacheng Yu 1 1 Computer Science Department, Stanford University Abstract Due

### On the Gap between the Complexity of SAT and Minimization for Certain Classes of Boolean Formulas

On the Gap between the Complexity of SAT and Minimization for Certain Classes of Boolean Formulas Ondřej Čepek and Štefan Gurský Abstract It is a wellknown fact that the satisfiability problem (SAT) for

### Introduction to Artificial Intelligence. Logical Agents

Introduction to Artificial Intelligence Logical Agents (Logic, Deduction, Knowledge Representation) Bernhard Beckert UNIVERSITÄT KOBLENZ-LANDAU Winter Term 2004/2005 B. Beckert: KI für IM p.1 Outline Knowledge-based

### Introduction to Turing Machines. Reading: Chapters 8 & 9

Introduction to Turing Machines Reading: Chapters 8 & 9 1 Turing Machines (TM) Generalize the class of CFLs: Recursively Enumerable Languages Recursive Languages Context-Free Languages Regular Languages

### Min/Max-Poly Weighting Schemes and the NL vs UL Problem

Min/Max-Poly Weighting Schemes and the NL vs UL Problem Anant Dhayal Jayalal Sarma Saurabh Sawlani May 3, 2016 Abstract For a graph G(V, E) ( V = n) and a vertex s V, a weighting scheme (w : E N) is called

### Function Problems and Syntactic Subclasses of TFNP

Function Problems and Syntactic Subclasses of TFNP N. Elgers Abstract Function problems are an extension of decision problems in the sense that they require a more extensive answer than yes or no. FP,

### MA103 STATEMENTS, PROOF, LOGIC

MA103 STATEMENTS, PROOF, LOGIC Abstract Mathematics is about making precise mathematical statements and establishing, by proof or disproof, whether these statements are true or false. We start by looking

### Lecture 23 : Nondeterministic Finite Automata DRAFT Connection between Regular Expressions and Finite Automata

CS/Math 24: Introduction to Discrete Mathematics 4/2/2 Lecture 23 : Nondeterministic Finite Automata Instructor: Dieter van Melkebeek Scribe: Dalibor Zelený DRAFT Last time we designed finite state automata

### CSE 521 Algorithms. NP-Completeness (Chapter 8)

CSE 521 Algorithms NP-Completeness (Chapter 8) 1 Polynomial Time 2 The class P Definition: P = the set of (decision) problems solvable by computers in polynomial time, i.e., T(n) = O(n k ) for some fixed

### Nondeterministic finite automata

Lecture 3 Nondeterministic finite automata This lecture is focused on the nondeterministic finite automata (NFA) model and its relationship to the DFA model. Nondeterminism is an important concept in the

### 11. Tractability and Decidability

11. Tractability and Decidability Frank Stephan April 1, 2014 Introduction Computational Complexity In 1844 Gabriel Lamé studied and analysed the running time of Euclid s algorithm. In 1982, Stephen Cook

### K-center Hardness and Max-Coverage (Greedy)

IOE 691: Approximation Algorithms Date: 01/11/2017 Lecture Notes: -center Hardness and Max-Coverage (Greedy) Instructor: Viswanath Nagarajan Scribe: Sentao Miao 1 Overview In this lecture, we will talk

### 1 Terminology and setup

15-451/651: Design & Analysis of Algorithms August 31, 2017 Lecture #2 last changed: August 29, 2017 In this lecture, we will examine some simple, concrete models of computation, each with a precise definition

### Multi-coloring and Mycielski s construction

Multi-coloring and Mycielski s construction Tim Meagher Fall 2010 Abstract We consider a number of related results taken from two papers one by W. Lin [1], and the other D. C. Fisher[2]. These articles

### Identifying an Honest EXP NP Oracle Among Many

Identifying an Honest EXP NP Oracle Among Many Shuichi Hirahara The University of Tokyo CCC 18/6/2015 Overview Dishonest oracle Honest oracle Queries Which is honest? Our Contributions Selector 1. We formulate

### /633 Introduction to Algorithms Lecturer: Michael Dinitz Topic: Dynamic Programming II Date: 10/12/17

601.433/633 Introduction to Algorithms Lecturer: Michael Dinitz Topic: Dynamic Programming II Date: 10/12/17 12.1 Introduction Today we re going to do a couple more examples of dynamic programming. While

### Propositional Logic. Logic. Propositional Logic Syntax. Propositional Logic

Propositional Logic Reading: Chapter 7.1, 7.3 7.5 [ased on slides from Jerry Zhu, Louis Oliphant and ndrew Moore] Logic If the rules of the world are presented formally, then a decision maker can use logical

### Midterm: CS 6375 Spring 2015 Solutions

Midterm: CS 6375 Spring 2015 Solutions The exam is closed book. You are allowed a one-page cheat sheet. Answer the questions in the spaces provided on the question sheets. If you run out of room for an

### Now just show p k+1 small vs opt. Some machine gets k=m jobs of size at least p k+1 Can also think of it as a family of (1 + )-approximation algorithm

Review: relative approx. alg by comparison to lower bounds. TS with triangle inequality: A nongreedy algorithm, relating to a clever lower bound nd minimum spanning tree claim costs less than TS tour Double

### Concrete models and tight upper/lower bounds

Lecture 3 Concrete models and tight upper/lower bounds 3.1 Overview In this lecture, we will examine some simple, concrete models of computation, each with a precise definition of what counts as a step,

### Modal and temporal logic

Modal and temporal logic N. Bezhanishvili I. Hodkinson C. Kupke Imperial College London 1 / 83 Overview Part II 1 Soundness and completeness. Canonical models. 3 lectures. 2 Finite model property. Filtrations.

### Lecture 17. In this lecture, we will continue our discussion on randomization.

ITCS:CCT09 : Computational Complexity Theory May 11, 2009 Lecturer: Jayalal Sarma M.N. Lecture 17 Scribe: Hao Song In this lecture, we will continue our discussion on randomization. 1 BPP and the Polynomial

### A Tale of Two Cultures: Phase Transitions in Physics and Computer Science. Cristopher Moore University of New Mexico and the Santa Fe Institute

A Tale of Two Cultures: Phase Transitions in Physics and Computer Science Cristopher Moore University of New Mexico and the Santa Fe Institute Computational Complexity Why are some problems qualitatively

### Ταουσάκος Θανάσης Αλγόριθμοι και Πολυπλοκότητα II 7 Φεβρουαρίου 2013

Ταουσάκος Θανάσης Αλγόριθμοι και Πολυπλοκότητα II 7 Φεβρουαρίου 2013 Alternation: important generalization of non-determinism Redefining Non-Determinism in terms of configurations: a configuration lead

### 1 Recap: Interactive Proofs

Theoretical Foundations of Cryptography Lecture 16 Georgia Tech, Spring 2010 Zero-Knowledge Proofs 1 Recap: Interactive Proofs Instructor: Chris Peikert Scribe: Alessio Guerrieri Definition 1.1. An interactive

### CIS 2033 Lecture 5, Fall

CIS 2033 Lecture 5, Fall 2016 1 Instructor: David Dobor September 13, 2016 1 Supplemental reading from Dekking s textbook: Chapter2, 3. We mentioned at the beginning of this class that calculus was a prerequisite

### Data Structures and Algorithms (CSCI 340)

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

### Lec. 2: Approximation Algorithms for NP-hard Problems (Part II)

Limits of Approximation Algorithms 28 Jan, 2010 (TIFR) Lec. 2: Approximation Algorithms for NP-hard Problems (Part II) Lecturer: Prahladh Harsha Scribe: S. Ajesh Babu We will continue the survey of approximation

### LECTURE 1. Logic and Proofs

LECTURE 1 Logic and Proofs The primary purpose of this course is to introduce you, most of whom are mathematics majors, to the most fundamental skills of a mathematician; the ability to read, write, and

### Inf2D 06: Logical Agents: Knowledge Bases and the Wumpus World

Inf2D 06: Logical Agents: Knowledge Bases and the Wumpus World School of Informatics, University of Edinburgh 26/01/18 Slide Credits: Jacques Fleuriot, Michael Rovatsos, Michael Herrmann Outline Knowledge-based

### More About Turing Machines. Programming Tricks Restrictions Extensions Closure Properties

More About Turing Machines Programming Tricks Restrictions Extensions Closure Properties 1 Overview At first, the TM doesn t look very powerful. Can it really do anything a computer can? We ll discuss

### Chapter 2. Mathematical Reasoning. 2.1 Mathematical Models

Contents Mathematical Reasoning 3.1 Mathematical Models........................... 3. Mathematical Proof............................ 4..1 Structure of Proofs........................ 4.. Direct Method..........................

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

### Automata-Theoretic LTL Model-Checking

Automata-Theoretic LTL Model-Checking Arie Gurfinkel arie@cmu.edu SEI/CMU Automata-Theoretic LTL Model-Checking p.1 LTL - Linear Time Logic (Pn 77) Determines Patterns on Infinite Traces Atomic Propositions

### SAT Solving: Theory and Practice of efficient combinatorial search

SAT Solving: Theory and Practice of efficient combinatorial search Oliver Kullmann Computer Science Department Swansea University http://cs.swan.ac.uk/~csoliver/ Southwest Jiaotong University, April 18,

### Strong Computational Lower Bounds via Parameterized Complexity

Strong Computational Lower Bounds via Parameterized Complexity Jianer Chen Xiuzhen Huang 1 Iyad A. Kanj 2 Ge Xia 3 Department of Computer Science, Texas A&M University, College Station, TX 77843-3112,

### A New Approach to Proving Upper Bounds for MAX-2-SAT

A New Approach to Proving Upper Bounds for MAX-2-SAT Arist Kojevnikov Alexander S. Kulikov Abstract In this paper we present a new approach to proving upper bounds for the maximum 2-satisfiability problem

### The Complexity of Post s Classes

Institut für Informationssysteme Universität Hannover Diplomarbeit The Complexity of Post s Classes Henning Schnoor 7. Juli 2004 Prüfer: Prof. Dr. Heribert Vollmer Prof. Dr. Rainer Parchmann ii Erklärung

### Topics in Theoretical Computer Science April 08, Lecture 8

Topics in Theoretical Computer Science April 08, 204 Lecture 8 Lecturer: Ola Svensson Scribes: David Leydier and Samuel Grütter Introduction In this lecture we will introduce Linear Programming. It was

### Lecture 18: Inapproximability of MAX-3-SAT

CS 880: Advanced Complexity Theory 3/7/2008 Lecture 18: Inapproximability of MAX-3-SAT Instructor: Dieter van Melkebeek Scribe: Jeff Kinne In this lecture we prove a tight inapproximability result for

### W -Hardness under Linear FPT-Reductions: Structural Properties and Further Applications

W -Hardness under Linear FPT-Reductions: Structural Properties and Further Applications Jianer Chen 1 Xiuzhen Huang 2 Iyad A. Kanj 3 Ge Xia 4 1 Dept. of Computer Science, Texas A&M University, College

### Basic Definitions: Indexed Collections and Random Functions

Chapter 1 Basic Definitions: Indexed Collections and Random Functions Section 1.1 introduces stochastic processes as indexed collections of random variables. Section 1.2 builds the necessary machinery

### Propositional and Predicate Logic

Propositional and Predicate Logic CS 536-05: Science of Programming This is for Section 5 Only: See Prof. Ren for Sections 1 4 A. Why Reviewing/overviewing logic is necessary because we ll be using it

### Introduction to Intelligent Systems

Logical Agents Objectives Inference and entailment Sound and complete inference algorithms Inference by model checking Inference by proof Resolution Forward and backward chaining Reference Russel/Norvig:

### 2 Z. Lonc and M. Truszczynski investigations, we use the framework of the xed-parameter complexity introduced by Downey and Fellows [Downey and Fellow

Fixed-parameter complexity of semantics for logic programs ZBIGNIEW LONC Technical University of Warsaw and MIROS LAW TRUSZCZYNSKI University of Kentucky A decision problem is called parameterized if its