Linear Programming Formulation of Boolean Satisfiability Problem

Size: px
Start display at page:

Download "Linear Programming Formulation of Boolean Satisfiability Problem"

Transcription

1 Linear Programming Formulation of Boolean Satisfiability Problem Maknickas Algirdas Antano Abstract With using of multi-nary logic 2 SAT boolean satisfiability was formulated as linear programming optimization problem. The same linear programming formulation was extended to finding of 3 SAT and k SAT boolean satisfiability for k greater than 3. Using new analytic formulas and linear programming formulation of boolean satisfiability proposition that k SAT is in P and could be solved in linear time was proved. Key words: Boolean satisfiability, conjunctive normal form, multivalued logic, linear programming, time complexity, NP problem 1 Introduction The Boolean satisfiability (SAT) problem [1] is defined as follows: given a Boolean formula, check whether an assignment of Boolean values to the propositional variables in the formula exists, such that the formula evaluates to true. If such an assignment exists, the formula is said to be satisfiable; otherwise, it is unsatisfiable. For a formula with n variables and m clauses the conjunctive normal form (CNF) (X 1 X 2 ) (X 3 X 4 ) (X n 1 X n ) (1) is most the frequently used for representing Boolean formulas, where X i are independent and in most cases m n. In CNF, the variables of the formula appear in literals (e.g., x) or their negation (e.g., x (logical NOT )). Literals are grouped into clauses, which represent a disjunction (logical OR ) of the literals they con- Maknickas Algirdas Antano Vilnius Gediminas Technical University, Sauletekio al. 11, Vilnius, Lithuania, algirdas.maknickas@vgtu.lt 1

2 2 Maknickas Algirdas Antano tain. A single literal can appear in any number of clauses. The conjunction (logical AND ) of all clauses represents a formula. Several algorithms are known for solving the 2 - satisfiability problem; the most efficient of them take linear time [2, 3, 4]. Instances of the 2-satisfiability or 2SAT problem are typically expressed as 2-CNF or Krom formulas [2] SAT was the first known NP-complete problem, as proved by Cook and Levin in 1971 [1] [5]. Until that time, the concept of an NP-complete problem did not even exist. The problem remains NP-complete even if all expressions are written in conjunctive normal form with 3 variables per clause (3-CNF), yielding the 3SAT problem. This means the expression has the form: (X 1 X 2 X 3 ) (X 4 X 5 X 6 ) (X n 2 X n 1 X n ) (2) NP-complete and it is used as a starting point for proving that other problems are also NP-hard. This is done by polynomial-time reduction from 3-SAT to the other problem. In 2010, Moustapha Diaby provided two further proofs for P=NP. His papers Linear programming formulation of the vertex colouring problem and Linear programming formulation of the set partitioning problem give linear programming formulations for two well-known NP-hard problems [6, 7]. 2 Expressions of multi-valued logic Let describe integer discrete logic units as i, where i Z +. Let describe discrete function g n k (a), a R, k {0,1,2,...,n 1} as g n k (a)= a +k (mod n) (3) As mentioned in [8, 9] function g n k (a) is one variable multi-nary logic generation function for multi-nary set {0,1,2,..,n 1} The are n n one variable logic functions: i 0 i 1 i 2 ρ (a)=... i n 1 a 0 g n i 0 (a) 1 g n i 1 (a) 2 g n i 2 (a) n 1 g n i n 1 (a) The are n n2 two variables logic functions:, i 0 i 1 i 2... i n 1 {0,1,2,...,n 1} (4)

3 Linear Programming Formulation of Boolean Satisfiability Problem 3 i 0,0 i 0,1 i 0,2... i 0,n 1 i 1,0 i 1,1 i 1,2... i 1,n 1 µ i 2,0 i 2,1 i 2,2... i 2,n 1 = i n 1,0 i n 1,1 i n 1,2... i n 1,n 1 a \ b n 1 0 g n i 0,0 (a b) g n i 0,1 (a b) g n i 0,2 (a b)... g n i 0,n 1 (a b) 1 2 g n i 1,0 (a b) g n i 1,1 (a b) g n i 1,2 (a b)... g n i 1,n 1 (a b) g n i 2,0 (a b) g n i 2,1 (a b) g n i 2,2 (a b)... g n, i 2,n 1 (a b) n 1 g n i n 1,0 (a b) g n i n 1,1 (a b) g n i n 1,2 (a b)... g n i n 1,n 1 (a b) i 0,0 i 0,1 i 0,2... i 0,n 1 i 1,0 i 1,1 i 1,2... i 1,n 1 i 2,0 i 2,1 i 2,2... i 2,n 1 {0,1,2,...,n 1} (5) i n 1,0 i n 1,1 i n 1,2... i n 1,n 1 Using of this expressions for logic of higher dimensions with non deterministic Turing machine enables to make counter of linear time complexity [9] The goal of this paper is the proof of proposition that ksat is in P and could be solved in linear time. For this purpose will be used one formula of multi-valued second order logic for function of two variables described above. 3 2SAT is in P Theorem 1. If all variables are unique, equation where maxβ 2 (X 1,X 2,...,X n 1,X n ) (6) β 2 (X 1,X 2,...,X n 1,X n )= µ(x 1 + X 2, µ(x 3 + X 4,..., µ(x n 3 + X n 2,X n 1 + X n ))) µ(a,b)= a \ b and+ is algebraic summation could be solved for X i {0,1} in O(m). Proof. Let start from investigation of (7)

4 4 Maknickas Algirdas Antano f(x 1,x 2,...,x m )= in hyper-cube of sides[0,1]. This function is convex, because m i=1 m i=1 x i, x i R (8) x i m i=1 x iα i (9) 1 = m i=1 αi (10) It is obvious, on right side of (9) we have hyper-plane which goes through vertexes (0,0,0,..,0) and (1,1,1,..,1) of investigating hyper-cube. This hyper-plane has global maximum like a function f(x 1,x 2,...,x m ) and it equals 1. So we could resume that finding of global maximum of f(x 1,x 2,...,x m ) could be replaced by finding of global maximum of this hyper plane or m max i = i=1x 1 n n max x i (11) i=1 Let start to investigate (6) X i R,i {1,2,...,n}. Function β 2 could be calculated within O(m) [10]. According to (7) equation (6) could be rewritten as follow max µ(x 1 + X 2, µ(x 3 + X 4,..., µ(x n 3 + X n 2,X n 1 + X n )))= max µ(x 1 + X 2,max µ(x 3 + X 4,...,max µ(x n 3 + X n 2,X n 1 + X n ))) (12) So, m local partial maximums must satisfy equalities max µ(x k 1 + X k )=1 to avoid 0 result of global maximum. This leads to inequalities 1 (X k 1 + X k ) 2 but if we want to use (11) we must leave (X k 1 + X k ) = 1 Now we could start to solve satisfiability problem as global maximum of (6). If we have all variables unique, (12) could be solved repeating solving of system of LP equations max k i=k 1 X i X k + X k 1 = 1 (13) Each of them has not zero max and could be solved using best known algorithm of linear programming [11] in O ( n 3.5) or in O(2 3.5 ). So all clauses should be optimized in O ( m ) 3.1 Special cases Theorem 2. If some of unique variables are negations X i, equation maxβ 2 (X 1,X 2,...,X n 1,X n ) (14)

5 Linear Programming Formulation of Boolean Satisfiability Problem 5 could be solved for X i {0,1} in O(m). Proof. If we have all variables unique, let replace all negations X k with Xḱ and all others just renamed by X i. Now (14) could be solved repeating solving of system of LP equations max k i=k 1 X i Xḱ+ Xḱ 1 = 1 0 Xḱ 1 1 (15) 0 Xḱ 1 Each of them has not zero max and could be solved in O(2 3.5 ). Going back to old variables do not change complexity of each solution. So all clauses should be optimized in O ( m ) Theorem 3. If some of variables in different clauses are not unique, equation could be solved for X i {0,1} in O(m). maxβ 2 (X 1,X 2,...,X n 1,X n ) (16) Proof.. If X n,x n 1 are unique, let start to solve (16) starting from a system of LP equations max n i=n 1 X i X n + X n 1 = 1 (17) 0 X n X n 1 Now we know two unique variables. So maximum is reached and system of equation is solved in O(2 3.5 ). If X n = X n 1, X n = 1 X n 1 = 1. All other sub-equation could be solved as follow: if solving sub-equation has one variable with earlier found value, LP equations max k i=k 1 X i 1 X k + X k 1 2 (18) could be solved by reducing of (18) within inserting of earlier found variable value resigned to 1 (lower and upper bound could be increased in case the broken plane result to 1 earlier and than is flat in 2D space); if all variables of solving sub-equations (18) aren t unique, these variables could be reassigned to 1 and solving repeated within next clause; if solving sub-equation has two unique variables, LP equations max k i=k 1 X i X k + X k 1 = 1 (19) could be solved. So all clauses should be optimized in O ( m )

6 6 Maknickas Algirdas Antano Theorem 4. If some of variables in different clauses are not unique and are negation each other, equation maxβ 2 (X 1,X 2,...,X n 1,X n ) (20) could be solved for X i {0,1} in O(v+e). Proof.. Let mark all variables they are unique or not starting from the end of CNF. Now cycle through n variables must be repeated to rename them to Xḱ so that new replaced variables marked as not unique will be negations which must be replaced with 1 Xḱ, if they found second time. In kind first time found not unique variable could be assigned to 0. This lead to value of 1 for negation. It could be done in O(2n). Now we start solving process for last clause. If Xń = Xń 1, Xń = 1. If Xń,Xń 1 are unique, let start to solve (20) from a system of LP equations max n i=n 1 X i Xń+ Xń 1=1 0 Xń 1 1 (21) 0 Xń 1 Now we know two or one unique variables. Aspvall, Plass and Tarjan [12] found the linear time procedure for solving 2- satisfiability instances, based on the notion of strongly connected components from graph theory. There are several efficient linear time algorithms for finding the strongly connected components of a graph, based on depth first search: Tarjan s strongly connected components algorithm [13] and the path-based strong component algorithm [14] each perform a single depth first search. Let choose the clause walking path as depth first search algorithm of the strongly connected components of a graph, where graph is formed as interconnected clauses with the not unique variables. So, other sub-equation could be solved as follow: if solving sub-equation has one variable with earlier found value, LP equations max k i=k 1 X i 1 X k + X k 1 2 (22) could be solved by reducing of (22) within inserting of earlier found variable value reassigned to 1 (lower and upper bound could be increased in case the broken plane result to 1 earlier and than is flat in 2D space); if all variables of solving sub-equations aren t unique and are negations of earlier found values in a different clauses, they values could be assigned to 0 and values of residual variables leads to 1; if all variables of solving sub-equations aren t unique and are negations of earlier found values in the same clause, one of variables must be assigned to 1 and other to 0; if at least two clauses, where X i X i, CNF is not satisfiable ;if solving sub-equation has two unique variables, LP equations

7 Linear Programming Formulation of Boolean Satisfiability Problem 7 max k i=k 1 X i X k + X k 1 = 1 (23) could be solved. Each sub-system of equation is solved in O(2 3.5 ) to reach global maximum 1. Finally, all clauses should be optimized at most v+e (v - amount of vertexes, e - amount of edges) times or in O ( (v+e) ). 4 3SAT is in P Theorem 5. If all variables are unique, equation where β 3 (X 1,X 2,...,X n 1,X n )= maxβ 3 (X 1,X 2,...,X n 1,X n ) (24) µ(x 1 + X 2 + X 3, µ(x 4 + X 5 + X 6,..., µ(x n 5 + X n 4 + X n 3,X n 2 + X n 1 + X n ))) (25) µ(a,b)= a\b (26) and+ is algebraic summation could be solved for X i {0,1} in O(m). Proof. Let start to investigate (24) when X i R,i {1,2,...,n}. Function β 3 could be calculated within O(m) [10]. According to (25) equation (24) could be rewritten as follow max µ(x 1 + X 2 + X 3, µ(x 4 + X 5 + X 6,..., µ(x n 5 + X n 4 + X n 3,X n 2 + X n 1 + X n ))) (27) So, m local partial maximums must satisfy equalities max µ(x k 2 +(X k 1 + X k )=1 to avoid 0 result of global maximum. This leads to inequalities 1 (X k 2 + X k 1 + X k ) 3 but if we want to use (11) we must leave (X k 2 + X k 1 + X k )=1 If we have all variables unique, (24) could be solved repeating solving of system of LP equations

8 8 Maknickas Algirdas Antano max k i=k 2 X i X k + X k 1 + X k 2 = 1 0 X k 2 1 (28) Each of them has not zero max and could be solved in O(3 3.5 ). So all clauses should be optimized in O ( m ) 4.1 Special cases Theorem 6. If some of unique variables are negations X i, equation could be solved for X i {0,1} in O(m). maxβ 3 (X 1,X 2,...,X n 1,X n ) (29) Proof. If we have all variables unique, let replace all negations X k with Xḱ and all others just renamed by X i. Now (29) could be solved repeating solving of system of LP equations max k i=k 2 X i Xḱ+ Xḱ 1+ Xḱ 1 = 1 0 Xḱ 2 1 (30) 0 Xḱ Xḱ 1 Each of them has not zero max and could be solved in O(3 3.5 ). Going back to old variables do not change complexity of each solution. So all clauses should be optimized in O ( m ) Theorem 7. If some of variables in different clauses are not unique, equation could be solved for X i {0,1} in O(m). maxβ 3 (X 1,X 2,...,X n 1,X n ) (31) Proof. If X n,x n 1,X n 2 are unique, let start to solve (31) starting from a system of LP equations max n i=n 2 X i X n + X n 1 + X n 2 = 1 0 X n 2 1 (32) 0 X n X n 1 Now we know three unique variables. Maximum is reached and system of equation is solved in O(3 3.5 ). If X n = X n 1, X n = 1 X n 1 = 1 X n 2 = 1. All other subequation could be solved as follow: if solving sub-equation has one or two variables

9 Linear Programming Formulation of Boolean Satisfiability Problem 9 with earlier found value, LP equations max k i=k 2 X i 1 X k + X k 1 + X k X k 2 1 (33) could be solved by reducing of (33) with inserting of earlier found variables value reassigned to 1; if solving sub-equation three unique variables, LP equations max k i=k 2 X i X k + X k 1 + X k 2 = 1 0 X k 2 1 (34) could be found. So all clauses should be optimized in O ( m ) Theorem 8. If some of variables in different clauses are not unique and are negation each other, equation maxβ 3 (X 1,X 2,...,X n 1,X n ) (35) could be solved for X i {0,1} in O(v+e). Proof. Let mark all variables they are unique or not starting from the end of CNF. Now cycle through n variables must be repeated to rename them to Xḱ so that new replaced variables marked as not unique will be negations which must be replaced with 1 Xḱ, if they found second time. In kind first time found not unique variable could be assigned to 0. This lead to value of 1 for negation. It could be done in O(2n). Now we start solving process for last clause. If not all variables are unique in the first clause, after sorting of variables so that third one will be negation and second one will be unique, LP equations maxxń+ Xń 1+1 Xń Xń+ Xń 1+1 Xń 2=1 0 Xń 2 1 (36) 0 Xń Xń 1 could be solved. If Xń,Xń 1,Xń 2 are unique, let start to solve (25) from a system of LP equations max n i=n 2 X i Xń+ Xń 1+ Xń 2=1 0 Xń 2 1 (37) 0 Xń Xń 1

10 10 Maknickas Algirdas Antano Now we know three or two unique variables. Let choose the clause walking path as depth first search algorithm of the strongly connected components of a graph, where graph is formed as interconnected clauses with the not unique variables. So, other sub-equation could be solved as follow: if solving sub-equation has one or two variable with earlier found value, LP equations max k i=k 2 X i ` 1 X + X `k 1 + X `k X `k 2 1 (38) 0 X `k X `k 1 where one or two of three variables X `k 2,X`k 1,X`k are equal 1 X q could be solved by reducing of (38) within inserting of earlier found variable value reassigned to 1; if all variables of solving sub-equations aren t unique and are negations of earlier found values in a different clauses, they values could be assigned to 0 and values of residual variables leads to 1; if all variables of solving sub-equations aren t unique and are negations of earlier found values in the same clause, one of variables must be assigned to 1 and other to 0; if solving sub-equation has three unique variables, LP equations max k i=k 2 X i X k + X k 1 + X k 2 = 1 0 X k 2 1 (39) could be solved. Each sub-system of equation is solved in O(3 3.5 ) to reach global maximum 1. Finally, all clauses should be optimized at most v+e (v - amount of vertexes, e - amount of edges) times or in O ( (v+e) ). 5 ksat is in P Theorem 9. If all variables are unique, equation maxβ k (X 1,X 2,...,X n 1,X n ) (40) where β k (X 1,X 2,...,X n 1,X n )= k µ( X i, µ i=1 ( 2k X i,..., µ i=k+1 ( n k i=n 2k+1 X i, n i=n k+1 X i ))) (41)

11 Linear Programming Formulation of Boolean Satisfiability Problem 11 µ(a,b)= a\b n n (42) and is algebraic summation could be solved for X i {0,1} in O ( k 3.5 m ). Proof.. Let start to investigate 40 when X i R,i {1,2,...,n}. Function β k could be calculated within O(m) [10]. According to 7 equation 40 could be rewritten as follow ( ( k 2k n k max µ( X i, µ X i,..., µ i=1 i=k+1 i=n 2k+1 X i, n i=n k+1 X i ))) If we have all variables unique, (41) could be solved repeating solving of system of LP equations max 2k i=k+1 X i 2k i=k+1 X i = 1 (44) 0 X i 1 i {1,2,...,n} Each of them has not zero max and could be solved in O(k 3.5 ). So all clauses should be optimized in O ( k 3.5 m ) (43) 5.1 Special cases Theorem 10. If some of unique variables are negations X i, equation could be solved for X i {0,1} in O ( k 3.5 m ). maxβ k (X 1,X 2,...,X n 1,X n ) (45) Proof.. If we have all variables unique, let replace all negations X k with Y k and all others just renamed by Y i. Now (45) could be solved repeating solving of system of LP equations max 2k i=k+1 Y i i=k+1 2k Y i = 1 (46) 0 Y i 1 i {1,2,...,n} Each of them has not zero max and could be solved in O(k 3.5 ). Going back to old variables do not change complexity of each solution. So all clauses should be optimized in O ( k 3.5 m ) Theorem 11. If some of variables in different clauses are not unique, equation

12 12 Maknickas Algirdas Antano could be solved for X i {0,1} in O ( k 3.5 m ). maxβ k (X 1,X 2,...,X n 1,X n ) (47) Proof.. If X n,x n 1,...,X n k+1 are unique, let start to solve (47) starting from a system of LP equations max n i=n k+1 X i n i=n k+1 X i = 1 (48) 0 X i 1 i {1,2,...,n} Now we know k unique variables. Maximum is reached and system of equation is solved in O(k 3.5 ). If X n = X n 1, X n = 1 X n 2 = 1,... All other sub-equation could be solved as follow: if solving sub-equation has at least one variable with earlier found value, LP equations max n i=n k+1 X i 1 k i=n k+1 X i k (49) 0 X i 1 i {1,2,...,n} could be solved by reducing of (49) with inserting of earlier found variables value reassigned to 1; if solving sub-equation k unique variables, LP equations max k i=n k+1 X i k i=n k+1 X i = 1 (50) 0 X i 1 i {1,2,...,n} could be solved. So all clauses should be optimized in O ( k 3.5 m ) Theorem 12. If some of variables in different clauses are not unique and are negation each other, equation could be solved for X i {0,1} in O ( k 3.5 (v+e) ). maxβ k (X 1,X 2,...,X n 1,X n ) (51) Proof.. Let mark all variables they are unique or not starting from the end of CNF. Now cycle through n variables must be repeated to rename them to Xḱ so that new replaced variables marked as not unique will be negations which must be replaced with 1 Xḱ, if they found second time. In kind first time found not unique variable could be assigned to 0. This lead to value of 1 for negation. It could be done in O(2n). Now we start solving process for last clause. If not all variables are unique in the first clause, after sorting of variables so that negations occurs at the end of the list, LP equations max l i=n k+1 X i + ( ) n i=l+1 1 X i l i=n k+1 X i + ( n i=l+1 1 X i) = 1 (52) 0 X i 1 i {1,2,...,n}

13 Linear Programming Formulation of Boolean Satisfiability Problem 13 could be solved. If Xń,Xń 1,...,Xń k+1 are unique, let start to solve (51) from a system of LP equations max n i=n k+1 X i n i=n k+1 X i = 1 (53) 0 X i 1 i {1,2,...,n} Now we know at most k unique variables. Let choose the clause walking path as depth first search algorithm of the strongly connected components of a graph, where graph is formed as interconnected clauses with the not unique variables. So, other sub-equation could be solved as follow: if solving sub-equation has at least one variable with earlier found value, LP equations max l i=k+1 X i + ( ) 2k i=l+1 1 X i 1 l i=k+1 X i + ( 2k i=l+1 1 X i) k (54) 0 X i 1 i {1,2,...,n} could be solved by reducing of (54) within inserting of earlier found variables values reassigned to 1; if all variables of solving sub-equations aren t unique and are negations of earlier found values in a different clauses, they values could be assigned to 0 and values of residual variables leads to 1; if all variables of solving sub-equations aren t unique and are negations of earlier found values in the same clause, one of variables must be assigned to 1 and other to 0; if solving sub-equation has k unique variables, LP equations max 2k i=k+1 X i 2k i=k+1 X i = 1 (55) 0 X i 1 i {1,2,...,n} could be solved. Each sub-system of equation is solved in O(k 3.5 ) to reach global maximum 1. Finally, all clauses should be optimized at most v+e (v - amount of vertexes, e - amount of edges) times or in O ( k 3.5 (v+e) ). 6 Conclusions Every 2 SAT problem is solvable using linear programming formulation in linear time. Every 3 SAT problem is solvable using linear programming formulation in linear time. Every k SAT problem is solvable using linear programming formulation in linear time for k>3. Every NP mathematical problem is reducible in polynomial time to k SAT problem and solvable in linear time if exist full, appropriate and correct knowledge

14 14 Maknickas Algirdas Antano basis for it and the time to get each item of knowledge basis is match less than calculation time on this items. References 1. Cook S. (1971), The complexity of theorem proving procedures. Proceedings of the Third Annual ACM Symposium on Theory of Computing, pp Krom M. R. (1967), The Decision Problem for a Class of First-Order Formulas in Which all Disjunctions are Binary, Zeitschrift fr Mathematische Logik und Grundlagen der Mathematik, vol. 13, pp , doi: /malq Aspvall B., Plass, M. F., Tarjan R. E. (1979), A linear-time algorithm for testing the truth of certain quantified boolean formulas, Information Processing Letters, vol. 8, no. 3, pp , doi: / (79) Even S., Itai A., Shamir A. (1976), On the complexity of time table and multi-commodity flow problems, SIAM Journal on Computing, vol. 5, no. 4, pp , doi: / Levin L. (1973). Universal search problems. Problems of Information Transmission 9 (3): (Russian), translated into English by Trakhtenbrot, B. A. (1984). A survey of Russian approaches to perebor (brute-force searches) algorithms. Annals of the History of Computing, vol. 6, no. 4, pp doi: /mahc Diaby M. (2010), Linear programming formulation of the vertex colouring problem, Int. J. of Mathematics in Operational Research, vol. 2, no. 3, pp Diaby M. (2010), Linear programming formulation of the set partitioning problem, Int. J. of Operational Research, vol. 8, no. 4., pp Maknickas A. A., (2010). Finding of k in Fagin s R. Theorem 24, arxiv: v1. 9. Maknickas A. A., (2012). How to solve ksat in polinomial time, arxiv: v Maknickas A. A., (2012). How to solve ksat in polinomial time, arxiv: v Adler I., Karmarkar N., Resende M. G. C. and Veiga G. (1989). An Implementation of Karmarkar s Algorithm for Linear Programming. Mathematical Programming, vol. 44, pp Aspvall B., Plass M. F., Tarjan R. E. (1979), A linear-time algorithm for testing the truth of certain quantified boolean formulas, Information Processing Letters, vol. 8, no. 3, pp Tarjan R. E. (1972), Depth-first search and linear graph algorithms, SIAM Journal on Computing, vol. 1, no. 2, pp Cheriyan J., Mehlhorn K. (1996), Algorithms for dense graphs and networks on the random access computer, Algorithmica, vol. 15, no. 6, pp

NP-Completeness. f(n) \ n n sec sec sec. n sec 24.3 sec 5.2 mins. 2 n sec 17.9 mins 35.

NP-Completeness. f(n) \ n n sec sec sec. n sec 24.3 sec 5.2 mins. 2 n sec 17.9 mins 35. NP-Completeness Reference: Computers and Intractability: A Guide to the Theory of NP-Completeness by Garey and Johnson, W.H. Freeman and Company, 1979. NP-Completeness 1 General Problems, Input Size and

More information

Essential facts about NP-completeness:

Essential facts about NP-completeness: CMPSCI611: NP Completeness Lecture 17 Essential facts about NP-completeness: Any NP-complete problem can be solved by a simple, but exponentially slow algorithm. We don t have polynomial-time solutions

More information

A Collection of Problems in Propositional Logic

A Collection of Problems in Propositional Logic A Collection of Problems in Propositional Logic Hans Kleine Büning SS 2016 Problem 1: SAT (respectively SAT) Instance: A propositional formula α (for SAT in CNF). Question: Is α satisfiable? The problems

More information

NP Complete Problems. COMP 215 Lecture 20

NP Complete Problems. COMP 215 Lecture 20 NP Complete Problems COMP 215 Lecture 20 Complexity Theory Complexity theory is a research area unto itself. The central project is classifying problems as either tractable or intractable. Tractable Worst

More information

SAT, NP, NP-Completeness

SAT, NP, NP-Completeness CS 473: Algorithms, Spring 2018 SAT, NP, NP-Completeness Lecture 22 April 13, 2018 Most slides are courtesy Prof. Chekuri Ruta (UIUC) CS473 1 Spring 2018 1 / 57 Part I Reductions Continued Ruta (UIUC)

More information

CMSC 858F: Algorithmic Lower Bounds Fall SAT and NP-Hardness

CMSC 858F: Algorithmic Lower Bounds Fall SAT and NP-Hardness CMSC 858F: Algorithmic Lower Bounds Fall 2014 3-SAT and NP-Hardness Instructor: Mohammad T. Hajiaghayi September 23, 2014 The most important NP-Complete (logic) problem family! 1 SAT = Satisfiability The

More information

CSE 3500 Algorithms and Complexity Fall 2016 Lecture 25: November 29, 2016

CSE 3500 Algorithms and Complexity Fall 2016 Lecture 25: November 29, 2016 CSE 3500 Algorithms and Complexity Fall 2016 Lecture 25: November 29, 2016 Intractable Problems There are many problems for which the best known algorithms take a very long time (e.g., exponential in some

More information

The Cook-Levin Theorem

The Cook-Levin Theorem An Exposition Sandip Sinha Anamay Chaturvedi Indian Institute of Science, Bangalore 14th November 14 Introduction Deciding a Language Let L {0, 1} be a language, and let M be a Turing machine. We say M

More information

NP-Complete Reductions 1

NP-Complete Reductions 1 x x x 2 x 2 x 3 x 3 x 4 x 4 CS 4407 2 22 32 Algorithms 3 2 23 3 33 NP-Complete Reductions Prof. Gregory Provan Department of Computer Science University College Cork Lecture Outline x x x 2 x 2 x 3 x 3

More information

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

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

More information

NP Completeness. CS 374: Algorithms & Models of Computation, Spring Lecture 23. November 19, 2015

NP Completeness. CS 374: Algorithms & Models of Computation, Spring Lecture 23. November 19, 2015 CS 374: Algorithms & Models of Computation, Spring 2015 NP Completeness Lecture 23 November 19, 2015 Chandra & Lenny (UIUC) CS374 1 Spring 2015 1 / 37 Part I NP-Completeness Chandra & Lenny (UIUC) CS374

More information

CMSC 858F: Algorithmic Lower Bounds Fall SAT and NP-Hardness

CMSC 858F: Algorithmic Lower Bounds Fall SAT and NP-Hardness CMSC 858F: Algorithmic Lower Bounds Fall 2014 3-SAT and NP-Hardness Instructor: Mohammad T. Hajiaghayi Scribe: Philip Dasler September 23, 2014 The most important NP-Complete (logic) problem family! 1

More information

NP-Completeness and Boolean Satisfiability

NP-Completeness and Boolean Satisfiability NP-Completeness and Boolean Satisfiability Mridul Aanjaneya Stanford University August 14, 2012 Mridul Aanjaneya Automata Theory 1/ 49 Time-Bounded Turing Machines A Turing Machine that, given an input

More information

SAT, Coloring, Hamiltonian Cycle, TSP

SAT, Coloring, Hamiltonian Cycle, TSP 1 SAT, Coloring, Hamiltonian Cycle, TSP Slides by Carl Kingsford Apr. 28, 2014 Sects. 8.2, 8.7, 8.5 2 Boolean Formulas Boolean Formulas: Variables: x 1, x 2, x 3 (can be either true or false) Terms: t

More information

Comp487/587 - Boolean Formulas

Comp487/587 - Boolean Formulas Comp487/587 - Boolean Formulas 1 Logic and SAT 1.1 What is a Boolean Formula Logic is a way through which we can analyze and reason about simple or complicated events. In particular, we are interested

More information

NP and Computational Intractability

NP and Computational Intractability NP and Computational Intractability 1 Polynomial-Time Reduction Desiderata'. Suppose we could solve X in polynomial-time. What else could we solve in polynomial time? don't confuse with reduces from Reduction.

More information

On the size of minimal unsatisfiable formulas

On the size of minimal unsatisfiable formulas On the size of minimal unsatisfiable formulas Choongbum Lee Submitted: 2008; Accepted: 2008; Published: XX Mathematics Subject Classification: 05D99(Primary); 05C15, 68R10(Secondary) Abstract An unsatisfiable

More information

NP-Completeness. NP-Completeness 1

NP-Completeness. NP-Completeness 1 NP-Completeness Reference: Computers and Intractability: A Guide to the Theory of NP-Completeness by Garey and Johnson, W.H. Freeman and Company, 1979. NP-Completeness 1 General Problems, Input Size and

More information

NP and NP Completeness

NP and NP Completeness CS 374: Algorithms & Models of Computation, Spring 2017 NP and NP Completeness Lecture 23 April 20, 2017 Chandra Chekuri (UIUC) CS374 1 Spring 2017 1 / 44 Part I NP Chandra Chekuri (UIUC) CS374 2 Spring

More information

An new hybrid cryptosystem based on the satisfiability problem

An new hybrid cryptosystem based on the satisfiability problem An new hybrid cryptosystem based on the satisfiability problem Sadek BOUROUBI * Louiza REZKALLAH ** * USTHB, Faculty of Mathematics, LAID3 Laboratory, BP 32 16111 El Alia, Bab-Ezzouar, Algiers Algeria

More information

On the Structure and the Number of Prime Implicants of 2-CNFs

On the Structure and the Number of Prime Implicants of 2-CNFs On the Structure and the Number of Prime Implicants of 2-CNFs Navid Talebanfard Department of Mathematical and Computing Sciences, Tokyo Institute of Technology, Meguro-ku Ookayama 2-12-1, Japan 152-8552

More information

Computational Complexity and Intractability: An Introduction to the Theory of NP. Chapter 9

Computational Complexity and Intractability: An Introduction to the Theory of NP. Chapter 9 1 Computational Complexity and Intractability: An Introduction to the Theory of NP Chapter 9 2 Objectives Classify problems as tractable or intractable Define decision problems Define the class P Define

More information

Worst-Case Upper Bound for (1, 2)-QSAT

Worst-Case Upper Bound for (1, 2)-QSAT Worst-Case Upper Bound for (1, 2)-QSAT Minghao Yin Department of Computer, Northeast Normal University, Changchun, China, 130117 ymh@nenu.edu.cn Abstract. The rigorous theoretical analysis of the algorithm

More information

Complexity, P and NP

Complexity, P and NP Complexity, P and NP EECS 477 Lecture 21, 11/26/2002 Last week Lower bound arguments Information theoretic (12.2) Decision trees (sorting) Adversary arguments (12.3) Maximum of an array Graph connectivity

More information

Non-Deterministic Time

Non-Deterministic Time Non-Deterministic Time Master Informatique 2016 1 Non-Deterministic Time Complexity Classes Reminder on DTM vs NDTM [Turing 1936] (q 0, x 0 ) (q 1, x 1 ) Deterministic (q n, x n ) Non-Deterministic (q

More information

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

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

More information

Chapter 2. Reductions and NP. 2.1 Reductions Continued The Satisfiability Problem (SAT) SAT 3SAT. CS 573: Algorithms, Fall 2013 August 29, 2013

Chapter 2. Reductions and NP. 2.1 Reductions Continued The Satisfiability Problem (SAT) SAT 3SAT. CS 573: Algorithms, Fall 2013 August 29, 2013 Chapter 2 Reductions and NP CS 573: Algorithms, Fall 2013 August 29, 2013 2.1 Reductions Continued 2.1.1 The Satisfiability Problem SAT 2.1.1.1 Propositional Formulas Definition 2.1.1. Consider a set of

More information

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

More information

NP-Completeness. Andreas Klappenecker. [based on slides by Prof. Welch]

NP-Completeness. Andreas Klappenecker. [based on slides by Prof. Welch] NP-Completeness Andreas Klappenecker [based on slides by Prof. Welch] 1 Prelude: Informal Discussion (Incidentally, we will never get very formal in this course) 2 Polynomial Time Algorithms Most of the

More information

Keywords. Approximation Complexity Theory: historical remarks. What s PCP?

Keywords. Approximation Complexity Theory: historical remarks. What s PCP? Keywords The following terms should be well-known to you. 1. P, NP, NP-hard, NP-complete. 2. (polynomial-time) reduction. 3. Cook-Levin theorem. 4. NPO problems. Instances. Solutions. For a long time it

More information

Automata Theory CS Complexity Theory I: Polynomial Time

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

More information

Correctness of Dijkstra s algorithm

Correctness of Dijkstra s algorithm Correctness of Dijkstra s algorithm Invariant: When vertex u is deleted from the priority queue, d[u] is the correct length of the shortest path from the source s to vertex u. Additionally, the value d[u]

More information

Lecture 4: NP and computational intractability

Lecture 4: NP and computational intractability Chapter 4 Lecture 4: NP and computational intractability Listen to: Find the longest path, Daniel Barret What do we do today: polynomial time reduction NP, co-np and NP complete problems some examples

More information

Detecting Backdoor Sets with Respect to Horn and Binary Clauses

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

More information

6.080 / Great Ideas in Theoretical Computer Science Spring 2008

6.080 / Great Ideas in Theoretical Computer Science Spring 2008 MIT OpenCourseWare http://ocw.mit.edu 6.080 / 6.089 Great Ideas in Theoretical Computer Science Spring 2008 For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.

More information

Lecture 21 (Oct. 24): Max Cut SDP Gap and Max 2-SAT

Lecture 21 (Oct. 24): Max Cut SDP Gap and Max 2-SAT CMPUT 67: Approximation Algorithms Fall 014 Lecture 1 Oct. 4): Max Cut SDP Gap and Max -SAT Lecturer: Zachary Friggstad Scribe: Chris Martin 1.1 Near-Tight Analysis of the Max Cut SDP Recall the Max Cut

More information

Intro to Theory of Computation

Intro to Theory of Computation Intro to Theory of Computation LECTURE 25 Last time Class NP Today Polynomial-time reductions Adam Smith; Sofya Raskhodnikova 4/18/2016 L25.1 The classes P and NP P is the class of languages decidable

More information

Nondeterministic Turing Machines

Nondeterministic Turing Machines Nondeterministic Turing Machines Remarks. I The complexity class P consists of all decision problems that can be solved by a deterministic Turing machine in polynomial time. I The complexity class NP consists

More information

NP Completeness and Approximation Algorithms

NP Completeness and Approximation Algorithms Winter School on Optimization Techniques December 15-20, 2016 Organized by ACMU, ISI and IEEE CEDA NP Completeness and Approximation Algorithms Susmita Sur-Kolay Advanced Computing and Microelectronic

More information

CSC 1700 Analysis of Algorithms: P and NP Problems

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

More information

A brief introduction to Logic. (slides from

A brief introduction to Logic. (slides from A brief introduction to Logic (slides from http://www.decision-procedures.org/) 1 A Brief Introduction to Logic - Outline Propositional Logic :Syntax Propositional Logic :Semantics Satisfiability and validity

More information

NP Completeness and Approximation Algorithms

NP Completeness and Approximation Algorithms Chapter 10 NP Completeness and Approximation Algorithms Let C() be a class of problems defined by some property. We are interested in characterizing the hardest problems in the class, so that if we can

More information

Polynomial-time Reductions

Polynomial-time Reductions Polynomial-time Reductions Disclaimer: Many denitions in these slides should be taken as the intuitive meaning, as the precise meaning of some of the terms are hard to pin down without introducing the

More information

CSE 105 THEORY OF COMPUTATION

CSE 105 THEORY OF COMPUTATION CSE 105 THEORY OF COMPUTATION "Winter" 2018 http://cseweb.ucsd.edu/classes/wi18/cse105-ab/ Today's learning goals Sipser Ch 7 Define NP-completeness Give examples of NP-complete problems Use polynomial-time

More information

CSCI3390-Lecture 16: NP-completeness

CSCI3390-Lecture 16: NP-completeness CSCI3390-Lecture 16: NP-completeness 1 Summary We recall the notion of polynomial-time reducibility. This is just like the reducibility we studied earlier, except that we require that the function mapping

More information

PROPOSITIONAL LOGIC. VL Logik: WS 2018/19

PROPOSITIONAL LOGIC. VL Logik: WS 2018/19 PROPOSITIONAL LOGIC VL Logik: WS 2018/19 (Version 2018.2) Martina Seidl (martina.seidl@jku.at), Armin Biere (biere@jku.at) Institut für Formale Modelle und Verifikation BOX Game: Rules 1. The game board

More information

A Lower Bound for Boolean Satisfiability on Turing Machines

A Lower Bound for Boolean Satisfiability on Turing Machines A Lower Bound for Boolean Satisfiability on Turing Machines arxiv:1406.5970v1 [cs.cc] 23 Jun 2014 Samuel C. Hsieh Computer Science Department, Ball State University March 16, 2018 Abstract We establish

More information

NP and NP-Completeness

NP and NP-Completeness CSC 364S Notes University of Toronto, Spring, 2003 NP NP and NP-Completeness NP is a class of languages that contains all of P, but which most people think also contains many languages that aren t in P.

More information

NP-completeness. Chapter 34. Sergey Bereg

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

More information

Tecniche di Verifica. Introduction to Propositional Logic

Tecniche di Verifica. Introduction to Propositional Logic Tecniche di Verifica Introduction to Propositional Logic 1 Logic A formal logic is defined by its syntax and semantics. Syntax An alphabet is a set of symbols. A finite sequence of these symbols is called

More information

Polynomial-time reductions. We have seen several reductions:

Polynomial-time reductions. We have seen several reductions: Polynomial-time reductions We have seen several reductions: Polynomial-time reductions Informal explanation of reductions: We have two problems, X and Y. Suppose we have a black-box solving problem X in

More information

Lecture #14: NP-Completeness (Chapter 34 Old Edition Chapter 36) Discussion here is from the old edition.

Lecture #14: NP-Completeness (Chapter 34 Old Edition Chapter 36) Discussion here is from the old edition. Lecture #14: 0.0.1 NP-Completeness (Chapter 34 Old Edition Chapter 36) Discussion here is from the old edition. 0.0.2 Preliminaries: Definition 1 n abstract problem Q is a binary relations on a set I of

More information

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

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

More information

Graduate Algorithms CS F-21 NP & Approximation Algorithms

Graduate Algorithms CS F-21 NP & Approximation Algorithms Graduate Algorithms CS673-2016F-21 NP & Approximation Algorithms David Galles Department of Computer Science University of San Francisco 21-0: Classes of Problems Consider three problem classes: Polynomial

More information

arxiv: v1 [cs.ds] 10 Jun 2009

arxiv: v1 [cs.ds] 10 Jun 2009 A Randomized Algorithm for -SAT Subhas Kumar Ghosh, Janardan Misra arxiv:0906.1849v1 [cs.ds] 10 Jun 2009 October 25, 2018 Abstract In this work we propose and analyze a simple randomized algorithm to find

More information

About the impossibility to prove P NP or P = NP and the pseudo-randomness in NP

About the impossibility to prove P NP or P = NP and the pseudo-randomness in NP About the impossibility to prove P NP or P = NP and the pseudo-randomness in NP Prof. Marcel Rémon 1 arxiv:0904.0698v3 [cs.cc] 24 Mar 2016 Abstract The relationship between the complexity classes P and

More information

Algorithmic Model Theory SS 2016

Algorithmic Model Theory SS 2016 Algorithmic Model Theory SS 2016 Prof. Dr. Erich Grädel and Dr. Wied Pakusa Mathematische Grundlagen der Informatik RWTH Aachen cbnd This work is licensed under: http://creativecommons.org/licenses/by-nc-nd/3.0/de/

More information

1 Algebraic Methods. 1.1 Gröbner Bases Applied to SAT

1 Algebraic Methods. 1.1 Gröbner Bases Applied to SAT 1 Algebraic Methods In an algebraic system Boolean constraints are expressed as a system of algebraic equations or inequalities which has a solution if and only if the constraints are satisfiable. Equations

More information

U.C. Berkeley CS278: Computational Complexity Professor Luca Trevisan August 30, Notes for Lecture 1

U.C. Berkeley CS278: Computational Complexity Professor Luca Trevisan August 30, Notes for Lecture 1 U.C. Berkeley CS278: Computational Complexity Handout N1 Professor Luca Trevisan August 30, 2004 Notes for Lecture 1 This course assumes CS170, or equivalent, as a prerequisite. We will assume that the

More information

Theory of Computation Time Complexity

Theory of Computation Time Complexity Theory of Computation Time Complexity Bow-Yaw Wang Academia Sinica Spring 2012 Bow-Yaw Wang (Academia Sinica) Time Complexity Spring 2012 1 / 59 Time for Deciding a Language Let us consider A = {0 n 1

More information

Introduction. Pvs.NPExample

Introduction. Pvs.NPExample Introduction Computer Science & Engineering 423/823 Design and Analysis of Algorithms Lecture 09 NP-Completeness (Chapter 34) Stephen Scott (Adapted from Vinodchandran N. Variyam) sscott@cse.unl.edu I

More information

CSE 555 HW 5 SAMPLE SOLUTION. Question 1.

CSE 555 HW 5 SAMPLE SOLUTION. Question 1. CSE 555 HW 5 SAMPLE SOLUTION Question 1. Show that if L is PSPACE-complete, then L is NP-hard. Show that the converse is not true. If L is PSPACE-complete, then for all A PSPACE, A P L. We know SAT PSPACE

More information

Limitations of Algorithm Power

Limitations of Algorithm Power Limitations of Algorithm Power Objectives We now move into the third and final major theme for this course. 1. Tools for analyzing algorithms. 2. Design strategies for designing algorithms. 3. Identifying

More information

Clause Shortening Combined with Pruning Yields a New Upper Bound for Deterministic SAT Algorithms

Clause Shortening Combined with Pruning Yields a New Upper Bound for Deterministic SAT Algorithms Clause Shortening Combined with Pruning Yields a New Upper Bound for Deterministic SAT Algorithms Evgeny Dantsin,EdwardA.Hirsch 2,, and Alexander Wolpert Roosevelt University, 430 S. Michigan Av., Chicago,

More information

Branching. Teppo Niinimäki. Helsinki October 14, 2011 Seminar: Exact Exponential Algorithms UNIVERSITY OF HELSINKI Department of Computer Science

Branching. Teppo Niinimäki. Helsinki October 14, 2011 Seminar: Exact Exponential Algorithms UNIVERSITY OF HELSINKI Department of Computer Science Branching Teppo Niinimäki Helsinki October 14, 2011 Seminar: Exact Exponential Algorithms UNIVERSITY OF HELSINKI Department of Computer Science 1 For a large number of important computational problems

More information

P P P NP-Hard: L is NP-hard if for all L NP, L L. Thus, if we could solve L in polynomial. Cook's Theorem and Reductions

P P P NP-Hard: L is NP-hard if for all L NP, L L. Thus, if we could solve L in polynomial. Cook's Theorem and Reductions Summary of the previous lecture Recall that we mentioned the following topics: P: is the set of decision problems (or languages) that are solvable in polynomial time. NP: is the set of decision problems

More information

Computational Complexity

Computational Complexity p. 1/24 Computational Complexity The most sharp distinction in the theory of computation is between computable and noncomputable functions; that is, between possible and impossible. From the example of

More information

Polynomial-Time Reductions

Polynomial-Time Reductions Reductions 1 Polynomial-Time Reductions Classify Problems According to Computational Requirements Q. Which problems will we be able to solve in practice? A working definition. [von Neumann 1953, Godel

More information

CSE 135: Introduction to Theory of Computation NP-completeness

CSE 135: Introduction to Theory of Computation NP-completeness CSE 135: Introduction to Theory of Computation NP-completeness Sungjin Im University of California, Merced 04-15-2014 Significance of the question if P? NP Perhaps you have heard of (some of) the following

More information

Computability and Complexity Theory: An Introduction

Computability and Complexity Theory: An Introduction Computability and Complexity Theory: An Introduction meena@imsc.res.in http://www.imsc.res.in/ meena IMI-IISc, 20 July 2006 p. 1 Understanding Computation Kinds of questions we seek answers to: Is a given

More information

Graph Theory and Optimization Computational Complexity (in brief)

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

More information

Polynomial time reduction and NP-completeness. Exploring some time complexity limits of polynomial time algorithmic solutions

Polynomial time reduction and NP-completeness. Exploring some time complexity limits of polynomial time algorithmic solutions Polynomial time reduction and NP-completeness Exploring some time complexity limits of polynomial time algorithmic solutions 1 Polynomial time reduction Definition: A language L is said to be polynomial

More information

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

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

More information

Show that the following problems are NP-complete

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

More information

Introduction to Computational Complexity

Introduction to Computational Complexity Introduction to Computational Complexity Tandy Warnow October 30, 2018 CS 173, Introduction to Computational Complexity Tandy Warnow Overview Topics: Solving problems using oracles Proving the answer to

More information

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

Welcome to... Problem Analysis and Complexity Theory , 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: Inffeldgasse 16B/II, room IC02044 slides: http://www.ist.tugraz.at/pact17.html

More information

CISC 4090 Theory of Computation

CISC 4090 Theory of Computation CISC 4090 Theory of Computation Complexity Professor Daniel Leeds dleeds@fordham.edu JMH 332 Computability Are we guaranteed to get an answer? Complexity How long do we have to wait for an answer? (Ch7)

More information

More NP-Complete Problems

More NP-Complete Problems CS 473: Algorithms, Spring 2018 More NP-Complete Problems Lecture 23 April 17, 2018 Most slides are courtesy Prof. Chekuri Ruta (UIUC) CS473 1 Spring 2018 1 / 57 Recap NP: languages/problems that have

More information

P, NP, NP-Complete, and NPhard

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

More information

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

Complexity Theory. Jörg Kreiker. Summer term Chair for Theoretical Computer Science Prof. Esparza TU München Complexity Theory Jörg Kreiker Chair for Theoretical Computer Science Prof. Esparza TU München Summer term 2010 Lecture 4 NP-completeness Recap: relations between classes EXP PSPACE = NPSPACE conp NP conp

More information

There are two types of problems:

There are two types of problems: Np-complete Introduction: There are two types of problems: Two classes of algorithms: Problems whose time complexity is polynomial: O(logn), O(n), O(nlogn), O(n 2 ), O(n 3 ) Examples: searching, sorting,

More information

A Lower Bound of 2 n Conditional Jumps for Boolean Satisfiability on A Random Access Machine

A Lower Bound of 2 n Conditional Jumps for Boolean Satisfiability on A Random Access Machine A Lower Bound of 2 n Conditional Jumps for Boolean Satisfiability on A Random Access Machine Samuel C. Hsieh Computer Science Department, Ball State University July 3, 2014 Abstract We establish a lower

More information

Algorithm Design and Analysis

Algorithm Design and Analysis Algorithm Design and Analysis LECTURE 26 Computational Intractability Polynomial Time Reductions Sofya Raskhodnikova S. Raskhodnikova; based on slides by A. Smith and K. Wayne L26.1 What algorithms are

More information

Summer School on Introduction to Algorithms and Optimization Techniques July 4-12, 2017 Organized by ACMU, ISI and IEEE CEDA.

Summer School on Introduction to Algorithms and Optimization Techniques July 4-12, 2017 Organized by ACMU, ISI and IEEE CEDA. Summer School on Introduction to Algorithms and Optimization Techniques July 4-12, 2017 Organized by ACMU, ISI and IEEE CEDA NP Completeness Susmita Sur-Kolay Advanced Computing and Microelectronics Unit

More information

Critical Reading of Optimization Methods for Logical Inference [1]

Critical Reading of Optimization Methods for Logical Inference [1] Critical Reading of Optimization Methods for Logical Inference [1] Undergraduate Research Internship Department of Management Sciences Winter 2008 Supervisor: Dr. Miguel Anjos UNIVERSITY OF WATERLOO Rajesh

More information

Integer vs. constraint programming. IP vs. CP: Language

Integer vs. constraint programming. IP vs. CP: Language Discrete Math for Bioinformatics WS 0/, by A. Bockmayr/K. Reinert,. Januar 0, 0:6 00 Integer vs. constraint programming Practical Problem Solving Model building: Language Model solving: Algorithms IP vs.

More information

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

Discrete Optimization 2010 Lecture 10 P, N P, and N PCompleteness Discrete Optimization 2010 Lecture 10 P, N P, and N PCompleteness Marc Uetz University of Twente m.uetz@utwente.nl Lecture 9: sheet 1 / 31 Marc Uetz Discrete Optimization Outline 1 N P and co-n P 2 N P-completeness

More information

CS 5114: Theory of Algorithms. Tractable Problems. Tractable Problems (cont) Decision Problems. Clifford A. Shaffer. Spring 2014

CS 5114: Theory of Algorithms. Tractable Problems. Tractable Problems (cont) Decision Problems. Clifford A. Shaffer. Spring 2014 Department of Computer Science Virginia Tech Blacksburg, Virginia Copyright c 2014 by Clifford A. Shaffer : Theory of Algorithms Title page : Theory of Algorithms Clifford A. Shaffer Spring 2014 Clifford

More information

Lecture 6,7 (Sept 27 and 29, 2011 ): Bin Packing, MAX-SAT

Lecture 6,7 (Sept 27 and 29, 2011 ): Bin Packing, MAX-SAT ,7 CMPUT 675: Approximation Algorithms Fall 2011 Lecture 6,7 (Sept 27 and 29, 2011 ): Bin Pacing, MAX-SAT Lecturer: Mohammad R. Salavatipour Scribe: Weitian Tong 6.1 Bin Pacing Problem Recall the bin pacing

More information

CS 301: Complexity of Algorithms (Term I 2008) Alex Tiskin Harald Räcke. Hamiltonian Cycle. 8.5 Sequencing Problems. Directed Hamiltonian Cycle

CS 301: Complexity of Algorithms (Term I 2008) Alex Tiskin Harald Räcke. Hamiltonian Cycle. 8.5 Sequencing Problems. Directed Hamiltonian Cycle 8.5 Sequencing Problems Basic genres. Packing problems: SET-PACKING, INDEPENDENT SET. Covering problems: SET-COVER, VERTEX-COVER. Constraint satisfaction problems: SAT, 3-SAT. Sequencing problems: HAMILTONIAN-CYCLE,

More information

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

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

More information

Introduction to Advanced Results

Introduction to Advanced Results Introduction to Advanced Results Master Informatique Université Paris 5 René Descartes 2016 Master Info. Complexity Advanced Results 1/26 Outline Boolean Hierarchy Probabilistic Complexity Parameterized

More information

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

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

More information

CS154, Lecture 15: Cook-Levin Theorem SAT, 3SAT

CS154, Lecture 15: Cook-Levin Theorem SAT, 3SAT CS154, Lecture 15: Cook-Levin Theorem SAT, 3SAT Definition: A language B is NP-complete if: 1. B NP 2. Every A in NP is poly-time reducible to B That is, A P B When this is true, we say B is NP-hard On

More information

Algorithms and Complexity Theory. Chapter 8: Introduction to Complexity. Computer Science - Durban - September 2005

Algorithms and Complexity Theory. Chapter 8: Introduction to Complexity. Computer Science - Durban - September 2005 Algorithms and Complexity Theory Chapter 8: Introduction to Complexity Jules-R Tapamo Computer Science - Durban - September 2005 Contents 1 Introduction 2 1.1 Dynamic programming...................................

More information

Complexity Theory VU , SS The Polynomial Hierarchy. Reinhard Pichler

Complexity Theory VU , SS The Polynomial Hierarchy. Reinhard Pichler Complexity Theory Complexity Theory VU 181.142, SS 2018 6. The Polynomial Hierarchy Reinhard Pichler Institut für Informationssysteme Arbeitsbereich DBAI Technische Universität Wien 15 May, 2018 Reinhard

More information

Outline. Complexity Theory EXACT TSP. The Class DP. Definition. Problem EXACT TSP. Complexity of EXACT TSP. Proposition VU 181.

Outline. Complexity Theory EXACT TSP. The Class DP. Definition. Problem EXACT TSP. Complexity of EXACT TSP. Proposition VU 181. Complexity Theory Complexity Theory Outline Complexity Theory VU 181.142, SS 2018 6. The Polynomial Hierarchy Reinhard Pichler Institut für Informationssysteme Arbeitsbereich DBAI Technische Universität

More information

NP-Complete Reductions 2

NP-Complete Reductions 2 x 1 x 1 x 2 x 2 x 3 x 3 x 4 x 4 12 22 32 CS 447 11 13 21 23 31 33 Algorithms NP-Complete Reductions 2 Prof. Gregory Provan Department of Computer Science University College Cork 1 Lecture Outline NP-Complete

More information

arxiv: v2 [cs.ds] 17 Sep 2017

arxiv: v2 [cs.ds] 17 Sep 2017 Two-Dimensional Indirect Binary Search for the Positive One-In-Three Satisfiability Problem arxiv:1708.08377v [cs.ds] 17 Sep 017 Shunichi Matsubara Aoyama Gakuin University, 5-10-1, Fuchinobe, Chuo-ku,

More information

COMP Analysis of Algorithms & Data Structures

COMP Analysis of Algorithms & Data Structures COMP 3170 - Analysis of Algorithms & Data Structures Shahin Kamali Computational Complexity CLRS 34.1-34.4 University of Manitoba COMP 3170 - Analysis of Algorithms & Data Structures 1 / 50 Polynomial

More information