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

Size: px
Start display at page:

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

Transcription

1 Foundations of Comuter Science 1 Introduction to Written and coyright c by Jie Wang 1 We use time-bounded (deterministic and nondeterministic) Turing machines to study comutational comlexity of decision roblems. In this model, a Turing machine has two different halting states, called the acceting state and the rejecting state, resectively. We say that a Turing machine M is bounded by time T if for any inut x, M on x always halts in T ( x ) moves (stes). If M is deterministic and M on inut x halts at the acceting state, then we say that x is acceted by M. If M is nondeterministic and there exists at least one comutation ath of M on inut x that halts on the acceting state, then we say that x is acceted by M. We are articularly interested in olynomial-time bounds for the following reasons. Let 1. All roblems in ractice that are solvable efficiently can be solved by deterministic Turing machines in olynomial time. 2. Polynomials are closed under addition, multilication, and comosition. P = {D D is solvable by a DTM in olynomial time} NP = {D D is solvable by an NTM in olynomial time}. Problems in P are considered tractable. Clearly, P is included in NP. Many comutational roblems, while being in NP, are not known to be in P. It is the central oen roblem in comuter science whether all roblems in NP are tractable; namely, whether P = NP. While there is no known mathematical roof in either direction at this oint, it is commonly believed that P NP. We use the notion of NP -comleteness to measure the hardest roblems in NP. (Remark: N P -comleteness is a worst-case measure.) First, we define the notion of olynomial-time reductions. Definition 1 Let A and B be two decision roblems. If there is a olynomial-time comutable reduction f such that A m B via f, namely, x : x A iff f(x) B, written as A m B, then we say that A is olynomial-time reducible to B. The following roosition is straightforward (its roof is left to the reader). Proosition 2 1. Polynomial-time reductions are closed for P. Namely, if A m B and B P, then A P. 1 Written in Sring First udate in Fall Second udate in Fall 2006.

2 Foundations of Comuter Science 2 2. Polynomial-time reductions are transitive. Namely, if A m B and B m C, then A m C. Proosition 2(1) indicates that, in the context of olynomial-time solvability, if A m B, then A is not harder than B. So the hardest roblem in NP is one that can be reduced to from any roblem in NP. We call such a roblem an NP -comlete roblem. Definition 3 A roblem D is NP -comlete if (1) D NP and (2) A NP : A m D. Thousands of roblems have been shown NP -comlete. In the resent note we will look at four classic N P -comlete roblems; they are bounded halting (BH), bounded tiling (BT), Boolean satisfiability (SAT), and 3-Satisfiability (3SAT). 1 Bounded Halting Recall that the halting roblem defined below is Turing-accetable but not decidable. H = { M, x M is a TM and M on x halts}. We can further show that every r.e. language is reducible to H. Let A be an r.e. set. Then there is a TM M A such that M A accets A. Construct a reduction f by f(x) = M A, x. Clearly, f is a recursive function. We have x : x A iff M A halts on x iff f(x) H. This result indicates that H is comlete for all r.e. sets; in other words, H is the hardest roblem in r.e. sets. Bounded Halting Problem (BH) Instance. A (nondeterministic) Turing machine M, a binary string x, and a unitary notion 0 n reresenting ositive integer n. Question. Does M accet x in n stes? For convenience we use BH to denote the ositive instances of Bounded Halting; namely, Theorem 4 BH is NP-comlete. BH = { M, x, 0 n M accets x in n stes}. Proof. It is straightforward to show that BH NP, for M, x, 0 n = Θ( M + x + n) (the detailed roof is left to the reader). We will now olynomially reduce every roblem in NP to BH. Let A NP. Then there exists a nondeterministic TM M A such that M A accets A in time, where is a fixed olynomial. Construct a reduction f by f(x) = M A, x, 0 ( x ).

3 Foundations of Comuter Science 3 Then x : x A iff M A accets x in ( x ) time iff M A, x, 0 ( x ) BH iff f(x) BH. Since M A is a fixed TM and is a olynomial, roducing M A, x, 0 ( x ) from x can be carried out in time olynomial of x. Hence, f is olynomial-time comutable. Thus, A m BH. This comletes the roof. 2 Bounded Tiling A tile is a square with a symbol on each side. We assume that titles may not be rotated or turned over, and that there is an unlimited suly of each tile. By tiling of an n n square it means to select and arrange n 2 tiles to cover the square so that the symbols on the common sides of adjacent tiles are the same. The size of a tile is the length of the binary reresentation of the four symbols at each edge in a fixed order. Bounded Tiling Problem (BT) Instance. A finite set of tiles T, a unitary notation 0 n reresenting ositive integer n, and a sequence S = s 1 s 2... s k (k n) of tiles that match each other, i.e. the symbol on the right side of s i is the same as that on the left side of s i+1. (The size of the instance is n lus the summation of the sizes of all tiles in T lus the summation of the sizes of all members in S.) Question. Can S be extended to tile an n n square using tiles from T? Denote by BT the ositive instances of bounded tiling, namely, BT = { T, S, 0 n S can be extended to tile an n n square using tiles from T }. Theorem 5 Bounded tiling is NP-comlete. Proof. That BT N P is straightforward (the reader can easily fill in the details). We will now olynomially reduce every roblem in NP to BT. Let A NP. Then there is a (nondeterministic) Turing machine M A = (Q, Σ, δ, q 0, {h a, h r }) that accets A in olynomial time. Without loss of generality, we assume that Σ = {0, 1, B}, and all comutation aths of M A on inut x have length strictly less than ( x ), where is a fixed olynomial. Here Q is the finite set of states of M A, δ the transition function, q 0 the initial state, h a the acceting state, h r the rejecting state, and B the blank symbol. We construct the following set T (M A ) of legal tiles: for α {0, 1, B} : α α

4 Foundations of Comuter Science 4 for α, β, γ {0, 1, B}, q Q {h a, h r }, Q, δ(q, α) = (, β, R): β (,γ) (q,α) γ for α, β, γ {0, 1, B}, q Q {h a, h r }, Q, δ(q, α) = (, β, L): β (,γ) (q,α) γ for α {0, 1, B}: (h a,α) (h a,α) and for α {0, 1, B}: (q 0,α) α The desired reduction is defined by f(x) = T (M A ), S, 0 ( x ), where if x is written as x 1 x 2... x k for x i {0, 1}, S is the following sequence of tiles with ( x ) k blanks: (q 0,x 1 ) x k B B From the construction, it is easy to see that f is olynomial-time comutable. If S extends to a set of legal tiles which tile a ( x ) ( x ) square, then S will have to occuy the bottom row of the square. In this case, the symbols at the to of the bottom row reresents the initial configuration of M A on inut x. Likewise, the symbols at the to of the ith row from the bottom will reresent the configuration of a osition reachable by M A within i stes. Since M A will reach the acceting or rejecting state in less than ( x ) stes, and the tiling can only dulicate the acceting state, S can extend to a tiling only if M A accets x. Similarly, if M A accets x, then S can be extended to a tiling of a ( x ) ( x ) square. This comletes the roof. 3 Boolean Satisfiability We consider Boolean formulas in conjunctive normal form. Namely, each formula F of n variables is given as a set of clauses {C 1, C 2,..., C m }, where each C i is a set of literals {l i,1,..., l i,ji }. A literal is a variable or negation of a variable. Then F = m ji i=1 k=1 l i,j k, where denotes conjunction, and denotes disjunction.

5 Foundations of Comuter Science 5 Boolean Satisfiability Problem (SAT) Instance. A boolean formula ψ in conjunctive normal form. Question. Is ψ satisfiable? For convenience, denote by SAT the ositive instances of Boolean satisfiability roblem; namely, SAT = {ψ ψ is satisfiable}. Theorem 6 (Cook s Theorem) SAT is NP-comlete. Proof. We will olynomially reduce bounded tiling to SAT. Then by Proosition 2(2), we know that every roblem in NP is olynomially reducible to SAT. Let T, S, 0 n be an instance of bounded tiling. Label the different tiles occurred in S as t 1,..., t l, and the tiles in T but not in S as t l+1,..., t T. Let H T denote the set of tile airs [t i, t j ] such that t i can be laced horizontally left to t j, and V T the set of tile airs [t i, t j ] such that t i can be laced vertically below t j. Create N = n 2 T variables v i,j,k, where 1 i, j n, and 1 k T. We will later want v i,j,k to be 1 if the (i, j)th cell of the square is covered by the kth tile. We construct a formula ψ = ψ 1 ψ 2 ψ 3 as follows. 1. Let S = s 1 s m. Assume that s j = t kj for j = 1,..., m, where k j {1,..., l}. Let m ψ 1 = v 1,j,kj. (1) j=1 Then ψ 1 = 1 if and only if the jth cell in the bottom row is covered by t kj for 1 j m. 2. For all k, k with [t k, t k ] H T, where 1 k, k T, let ψ 2,1 = n 1 i=1 j=1 For all k, k with [t k, t k ] V T, where 1 k, k T, let ψ 2,2 = n 1 i=1 j=1 [t k,t k ] H T ( v i,j,k + v i,j+1,k ). (2) [t k,t k ] V T ( v i,j,k + v i+1,j,k ). (3) Let ψ 2 = ψ 2,1 ψ 2,2. Then ψ 2 = 1 if and only if the adjacency conditions of tiling are satisfied.

6 Foundations of Comuter Science 6 3. Finally, let ψ 3 = ψ 3,1 ψ 3,2, where and ψ 3,2 = ψ 3,1 = i=1 j=1 T i=1 j=1 k=1 v i,j,k (4) k k ( v i,j,k + v i,j,k ) (5) Then ψ 3,1 = 1 if and only if each cell is covered by at least one tile, and ψ 3,2 = 1 if and only if each cell is covered by at most one tile. Thus, ψ 3 = 1 if and only if each cell is covered by exactly one tile. We note that ψ = Θ(n 2 T 2 ). Let f( T, S, 0 n ) = ψ, then it is easy to see that f is olynomial-time comutable. If T, S, 0 n is a ositive instance of bounded tiling, then for all i and j with 1 i n and 1 j n, there must be a 1 k T such that the square at location (i, j) is tiled by t k. Set v i,j,k = 1. We conclude that every clause in (4) and (5) is satisfied. Clearly, every unit clause in (1) is satisfied. Now for each air (k, k ) with (t k, t k ) H T, and for all (i, j) with 1 i, j n, at least one of v i,j,k and v i,j,k has not been set to 1. Set that variable to 0. Thus, every clause in (2) is satisfied. Similarly, every clause in (3) is also satisfied. Conversely, we can show that if ψ is satisfiable then T, S, 0 n is a ositive instance of bounded tiling. This comletes the roof. 4 3-Satisfiability We consider CNF Boolean formula F of n variables {C 1, C 2,..., C m } in which each clause consists of exactly three literals. We call such a formula a 3CNF formula. 3-Satisfiability Problem (3SAT) Instance. A 3CNF formula ψ. Question. Is ψ satisfiable? Denote by 3SAT the ositive instances of 3-Satisfiability roblem; namely, Theorem 7 3SAT is NP-comlete. 3SAT = {ψ ψ is a 3CNF and is satisfiable}.

7 Foundations of Comuter Science 7 Proof. It suffices to reduce a CNF formula to a 3CNF formula. Let F be a CNF formula. We introduce three new variables y 1, y 2, y 3 and seven new clauses: {y 1, y 2, y 3 }, {y 1, y 2, y 3 }, {y 1, y 2, y 3 }, { y 1, y 2, y 3 }, {y 1, y 2, y 3 }, { y 1, y 2, y 3 }, { y 1, y 2, y 3 }. Namely, these seven new clauses are all ossible 3-literal (nontrivial) clauses over variables y 1, y 2, y 3 excet { y 1, y 2, y 3 }. It is easy to see that the only truth-value assignment to satisfy all these seven clauses is y 1 = y 2 = y 3 = 1. Let C be a clause of F. Then C = {z 1, z 2,..., z k } for some k 1, where z i is a literal. We will relace C by 3-clause(s) as follows. Case 1: k = 1. Relace C by {z 1, y 1, y 2 }. Case 2: k = 2. Relace C by {z 1, z 2, y 1 }. Case 3: k = 3. Do nothing. Case 4: k = 4. Introduce one new variable u 1 = y C, and relace C by the following 3-clauses: {z 1, z 2, u 1 }, {z 3, z 4, u 1 }, { z 3, u 1, y 1 }, { z 4, u 1, y 1 }. Note that the last three 3-clauses imly that z 3 + z 4 is equivalent to u 1, and so z 1 + z 2 + u 1 is equivalent to z 1 + z 2 + z 3 + z 4. Case 5: k > 4. Inductively aly Case 4 until only clauses of 3 literals left. For examle, when k = 5, first relace C with the following clauses: {z 1, z 2, z 3, u 1 }, {z 4, z 5, u 1 }, { z 4, u 1, y 1 }, { z 5, u 1, y 1 }. Then the last three clauses of three literals imly that z 4 + z 5 is equivalent to u 1. Thus, z 1 + z 2 + z 3 + z 4 + z 5 is equivalent to z 1 + z 2 + z 3 + u 1. Now relace the first clause of four literals {z 1, z 2, z 3, u 1 } by the following 3-clauses, where u 2 is a new variable: {z 1, z 2, u 2 }, {z 3, u 1, u 2 }, { z 3, u 2, y 1 }, { u 1, u 2, y 1 }. As shown before that the last three clauses imly that u 2 is equivalent to z 3 + u 1, and so z 1 + z 2 + z 3 + u 1 is equivalent to z 1 + z 2 + u 2. Let G be the roduct of all new clauses. It is straightforward to see that F is satisfiable if and only if G is satisfiable, and the above transformation from C to a set of 3-clauses can be carried out in time olynomial in k. Thus, SAT m 3SAT. This comletes the roof.

NP-Completeness and Cook s Theorem

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

More information

Introduction to Logic in Computer Science: Autumn 2006

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

More information

Lecture 7: NP-Complete Problems

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

More information

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

Page 1. CSCE 310J Data Structures & Algorithms. CSCE 310J Data Structures & Algorithms. P, NP, and NP-Complete. Polynomial-Time Algorithms CSCE 310J Data Structures & Algorithms P, NP, and NP-Complete Dr. Steve Goddard [email protected] CSCE 310J Data Structures & Algorithms Giving credit where credit is due:» Most of the lecture notes

More information

The Online Freeze-tag Problem

The Online Freeze-tag Problem The Online Freeze-tag Problem Mikael Hammar, Bengt J. Nilsson, and Mia Persson Atus Technologies AB, IDEON, SE-3 70 Lund, Sweden [email protected] School of Technology and Society, Malmö University,

More information

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

OHJ-2306 Introduction to Theoretical Computer Science, Fall 2012 8.11.2012 276 The P vs. NP problem is a major unsolved problem in computer science It is one of the seven Millennium Prize Problems selected by the Clay Mathematics Institute to carry a $ 1,000,000 prize for the

More information

The Classes P and NP

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

More information

Point Location. Preprocess a planar, polygonal subdivision for point location queries. p = (18, 11)

Point Location. Preprocess a planar, polygonal subdivision for point location queries. p = (18, 11) Point Location Prerocess a lanar, olygonal subdivision for oint location ueries. = (18, 11) Inut is a subdivision S of comlexity n, say, number of edges. uild a data structure on S so that for a uery oint

More information

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

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

More information

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

1. Nondeterministically guess a solution (called a certificate) 2. Check whether the solution solves the problem (called verification) Some N P problems Computer scientists have studied many N P problems, that is, problems that can be solved nondeterministically in polynomial time. Traditionally complexity question are studied as languages:

More information

Theoretical Computer Science (Bridging Course) Complexity

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

More information

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

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

More information

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

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

More information

Chapter. NP-Completeness. Contents

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

More information

CSC 373: Algorithm Design and Analysis Lecture 16

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

More information

As we have seen, there is a close connection between Legendre symbols of the form

As we have seen, there is a close connection between Legendre symbols of the form Gauss Sums As we have seen, there is a close connection between Legendre symbols of the form 3 and cube roots of unity. Secifically, if is a rimitive cube root of unity, then 2 ± i 3 and hence 2 2 3 In

More information

Complexity Classes P and NP

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

More information

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

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

More information

P versus NP, and More

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

More information

6.042/18.062J Mathematics for Computer Science December 12, 2006 Tom Leighton and Ronitt Rubinfeld. Random Walks

6.042/18.062J Mathematics for Computer Science December 12, 2006 Tom Leighton and Ronitt Rubinfeld. Random Walks 6.042/8.062J Mathematics for Comuter Science December 2, 2006 Tom Leighton and Ronitt Rubinfeld Lecture Notes Random Walks Gambler s Ruin Today we re going to talk about one-dimensional random walks. In

More information

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

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

More information

On the Relationship between Classes P and NP

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

More information

A Working Knowledge of Computational Complexity for an Optimizer

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

More information

An important observation in supply chain management, known as the bullwhip effect,

An important observation in supply chain management, known as the bullwhip effect, Quantifying the Bullwhi Effect in a Simle Suly Chain: The Imact of Forecasting, Lead Times, and Information Frank Chen Zvi Drezner Jennifer K. Ryan David Simchi-Levi Decision Sciences Deartment, National

More information

CSE 135: Introduction to Theory of Computation Decidability and Recognizability

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

More information

Lecture 2: Universality

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

More information

SOME PROPERTIES OF EXTENSIONS OF SMALL DEGREE OVER Q. 1. Quadratic Extensions

SOME PROPERTIES OF EXTENSIONS OF SMALL DEGREE OVER Q. 1. Quadratic Extensions SOME PROPERTIES OF EXTENSIONS OF SMALL DEGREE OVER Q TREVOR ARNOLD Abstract This aer demonstrates a few characteristics of finite extensions of small degree over the rational numbers Q It comrises attemts

More information

Notes on NP Completeness

Notes on NP Completeness Notes on NP Completeness Rich Schwartz November 10, 2013 1 Overview Here are some notes which I wrote to try to understand what NP completeness means. Most of these notes are taken from Appendix B in Douglas

More information

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

Diagonalization. Ahto Buldas. Lecture 3 of Complexity Theory October 8, 2009. Slides based on S.Aurora, B.Barak. Complexity Theory: A Modern Approach. Diagonalization Slides based on S.Aurora, B.Barak. Complexity Theory: A Modern Approach. Ahto Buldas [email protected] Background One basic goal in complexity theory is to separate interesting complexity

More information

Theory of Computation Chapter 2: Turing Machines

Theory of Computation Chapter 2: Turing Machines Theory of Computation Chapter 2: Turing Machines Guan-Shieng Huang Feb. 24, 2003 Feb. 19, 2006 0-0 Turing Machine δ K 0111000a 01bb 1 Definition of TMs A Turing Machine is a quadruple M = (K, Σ, δ, s),

More information

ENFORCING SAFETY PROPERTIES IN WEB APPLICATIONS USING PETRI NETS

ENFORCING SAFETY PROPERTIES IN WEB APPLICATIONS USING PETRI NETS ENFORCING SAFETY PROPERTIES IN WEB APPLICATIONS USING PETRI NETS Liviu Grigore Comuter Science Deartment University of Illinois at Chicago Chicago, IL, 60607 [email protected] Ugo Buy Comuter Science

More information

Computability Theory

Computability Theory CSC 438F/2404F Notes (S. Cook and T. Pitassi) Fall, 2014 Computability Theory This section is partly inspired by the material in A Course in Mathematical Logic by Bell and Machover, Chap 6, sections 1-10.

More information

Generating models of a matched formula with a polynomial delay

Generating models of a matched formula with a polynomial delay Generating models of a matched formula with a polynomial delay Petr Savicky Institute of Computer Science, Academy of Sciences of Czech Republic, Pod Vodárenskou Věží 2, 182 07 Praha 8, Czech Republic

More information

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

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

More information

Complex Conjugation and Polynomial Factorization

Complex Conjugation and Polynomial Factorization Comlex Conjugation and Polynomial Factorization Dave L. Renfro Summer 2004 Central Michigan University I. The Remainder Theorem Let P (x) be a olynomial with comlex coe cients 1 and r be a comlex number.

More information

Lecture summary for Theory of Computation

Lecture summary for Theory of Computation Lecture summary for Theory of Computation Sandeep Sen 1 January 8, 2015 1 Department of Computer Science and Engineering, IIT Delhi, New Delhi 110016, India. E- mail:[email protected] Contents 1 The

More information

A Modified Measure of Covert Network Performance

A Modified Measure of Covert Network Performance A Modified Measure of Covert Network Performance LYNNE L DOTY Marist College Deartment of Mathematics Poughkeesie, NY UNITED STATES lynnedoty@maristedu Abstract: In a covert network the need for secrecy

More information

The Halting Problem is Undecidable

The Halting Problem is Undecidable 185 Corollary G = { M, w w L(M) } is not Turing-recognizable. Proof. = ERR, where ERR is the easy to decide language: ERR = { x { 0, 1 }* x does not have a prefix that is a valid code for a Turing machine

More information

1 Gambler s Ruin Problem

1 Gambler s Ruin Problem Coyright c 2009 by Karl Sigman 1 Gambler s Ruin Problem Let N 2 be an integer and let 1 i N 1. Consider a gambler who starts with an initial fortune of $i and then on each successive gamble either wins

More information

9.2 Summation Notation

9.2 Summation Notation 9. Summation Notation 66 9. Summation Notation In the previous section, we introduced sequences and now we shall present notation and theorems concerning the sum of terms of a sequence. We begin with a

More information

Turing Machines: An Introduction

Turing Machines: An Introduction CIT 596 Theory of Computation 1 We have seen several abstract models of computing devices: Deterministic Finite Automata, Nondeterministic Finite Automata, Nondeterministic Finite Automata with ɛ-transitions,

More information

Software Model Checking: Theory and Practice

Software Model Checking: Theory and Practice Software Model Checking: Theory and Practice Lecture: Secification Checking - Temoral Logic Coyright 2004, Matt Dwyer, John Hatcliff, and Robby. The syllabus and all lectures for this course are coyrighted

More information

Lectures on the Dirichlet Class Number Formula for Imaginary Quadratic Fields. Tom Weston

Lectures on the Dirichlet Class Number Formula for Imaginary Quadratic Fields. Tom Weston Lectures on the Dirichlet Class Number Formula for Imaginary Quadratic Fields Tom Weston Contents Introduction 4 Chater 1. Comlex lattices and infinite sums of Legendre symbols 5 1. Comlex lattices 5

More information

Introduction to computer science

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

More information

Exponential time algorithms for graph coloring

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

More information

Solving NP-complete problems in the tile assembly model

Solving NP-complete problems in the tile assembly model Theoretical Computer Science 395 (2008) 31 46 www.elsevier.com/locate/tcs Solving NP-complete problems in the tile assembly model Yuriy Brun Department of Computer Science, University of Southern California,

More information

FACTORING BIVARIATE SPARSE (LACUNARY) POLYNOMIALS

FACTORING BIVARIATE SPARSE (LACUNARY) POLYNOMIALS FACTORING BIVARIATE SPARSE (LACUNARY) POLYNOMIALS Abstract. We resent a deterministic algorithm for comuting all irreducible factors of degree d of a given bivariate olynomial f K[x, y] over an algebraic

More information

SOLVING NARROW-INTERVAL LINEAR EQUATION SYSTEMS IS NP-HARD PATRICK THOR KAHL. Department of Computer Science

SOLVING NARROW-INTERVAL LINEAR EQUATION SYSTEMS IS NP-HARD PATRICK THOR KAHL. Department of Computer Science SOLVING NARROW-INTERVAL LINEAR EQUATION SYSTEMS IS NP-HARD PATRICK THOR KAHL Department of Computer Science APPROVED: Vladik Kreinovich, Chair, Ph.D. Luc Longpré, Ph.D. Mohamed Amine Khamsi, Ph.D. Pablo

More information

Computing the Most Probable String with a Probabilistic Finite State Machine

Computing the Most Probable String with a Probabilistic Finite State Machine Comuting the Most Probable String with a Probabilistic Finite State Machine Colin de la Higuera Université de Nantes, CNRS, LINA, UMR6241, F-44000, France cdlh@univ-nantesfr Jose Oncina De de Lenguajes

More information

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

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

More information

1 Definition of a Turing machine

1 Definition of a Turing machine Introduction to Algorithms Notes on Turing Machines CS 4820, Spring 2012 April 2-16, 2012 1 Definition of a Turing machine Turing machines are an abstract model of computation. They provide a precise,

More information

(67902) Topics in Theory and Complexity Nov 2, 2006. Lecture 7

(67902) Topics in Theory and Complexity Nov 2, 2006. Lecture 7 (67902) Topics in Theory and Complexity Nov 2, 2006 Lecturer: Irit Dinur Lecture 7 Scribe: Rani Lekach 1 Lecture overview This Lecture consists of two parts In the first part we will refresh the definition

More information

Tutorial 8. NP-Complete Problems

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

More information

Chapter 7 Uncomputability

Chapter 7 Uncomputability Chapter 7 Uncomputability 190 7.1 Introduction Undecidability of concrete problems. First undecidable problem obtained by diagonalisation. Other undecidable problems obtained by means of the reduction

More information

PRIME NUMBERS AND THE RIEMANN HYPOTHESIS

PRIME NUMBERS AND THE RIEMANN HYPOTHESIS PRIME NUMBERS AND THE RIEMANN HYPOTHESIS CARL ERICKSON This minicourse has two main goals. The first is to carefully define the Riemann zeta function and exlain how it is connected with the rime numbers.

More information

CHAPTER 7 GENERAL PROOF SYSTEMS

CHAPTER 7 GENERAL PROOF SYSTEMS CHAPTER 7 GENERAL PROOF SYSTEMS 1 Introduction Proof systems are built to prove statements. They can be thought as an inference machine with special statements, called provable statements, or sometimes

More information

Quantum and Non-deterministic computers facing NP-completeness

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

More information

Computational Finance The Martingale Measure and Pricing of Derivatives

Computational Finance The Martingale Measure and Pricing of Derivatives 1 The Martingale Measure 1 Comutational Finance The Martingale Measure and Pricing of Derivatives 1 The Martingale Measure The Martingale measure or the Risk Neutral robabilities are a fundamental concet

More information

NP-Completeness. CptS 223 Advanced Data Structures. Larry Holder School of Electrical Engineering and Computer Science Washington State University

NP-Completeness. CptS 223 Advanced Data Structures. Larry Holder School of Electrical Engineering and Computer Science Washington State University NP-Completeness CptS 223 Advanced Data Structures Larry Holder School of Electrical Engineering and Computer Science Washington State University 1 Hard Graph Problems Hard means no known solutions with

More information

Lecture 1: Oracle Turing Machines

Lecture 1: Oracle Turing Machines Computational Complexity Theory, Fall 2008 September 10 Lecture 1: Oracle Turing Machines Lecturer: Kristoffer Arnsfelt Hansen Scribe: Casper Kejlberg-Rasmussen Oracle TM Definition 1 Let A Σ. Then a Oracle

More information

Chapter 1. NP Completeness I. 1.1. Introduction. By Sariel Har-Peled, December 30, 2014 1 Version: 1.05

Chapter 1. NP Completeness I. 1.1. Introduction. By Sariel Har-Peled, December 30, 2014 1 Version: 1.05 Chapter 1 NP Completeness I By Sariel Har-Peled, December 30, 2014 1 Version: 1.05 "Then you must begin a reading program immediately so that you man understand the crises of our age," Ignatius said solemnly.

More information

Assignment 9; Due Friday, March 17

Assignment 9; Due Friday, March 17 Assignment 9; Due Friday, March 17 24.4b: A icture of this set is shown below. Note that the set only contains oints on the lines; internal oints are missing. Below are choices for U and V. Notice that

More information

Mathematics Course 111: Algebra I Part IV: Vector Spaces

Mathematics Course 111: Algebra I Part IV: Vector Spaces Mathematics Course 111: Algebra I Part IV: Vector Spaces D. R. Wilkins Academic Year 1996-7 9 Vector Spaces A vector space over some field K is an algebraic structure consisting of a set V on which are

More information

3515ICT Theory of Computation Turing Machines

3515ICT Theory of Computation Turing Machines Griffith University 3515ICT Theory of Computation Turing Machines (Based loosely on slides by Harald Søndergaard of The University of Melbourne) 9-0 Overview Turing machines: a general model of computation

More information

C-Bus Voltage Calculation

C-Bus Voltage Calculation D E S I G N E R N O T E S C-Bus Voltage Calculation Designer note number: 3-12-1256 Designer: Darren Snodgrass Contact Person: Darren Snodgrass Aroved: Date: Synosis: The guidelines used by installers

More information

2.1 Complexity Classes

2.1 Complexity Classes 15-859(M): Randomized Algorithms Lecturer: Shuchi Chawla Topic: Complexity classes, Identity checking Date: September 15, 2004 Scribe: Andrew Gilpin 2.1 Complexity Classes In this lecture we will look

More information

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

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

More information

The P versus NP Solution

The P versus NP Solution The P versus NP Solution Frank Vega To cite this version: Frank Vega. The P versus NP Solution. 2015. HAL Id: hal-01143424 https://hal.archives-ouvertes.fr/hal-01143424 Submitted on 17 Apr

More information

Regular Languages and Finite Automata

Regular Languages and Finite Automata Regular Languages and Finite Automata 1 Introduction Hing Leung Department of Computer Science New Mexico State University Sep 16, 2010 In 1943, McCulloch and Pitts [4] published a pioneering work on a

More information

The Parameterized Complexity of Short Computation and Factorization

The Parameterized Complexity of Short Computation and Factorization The Parameterized Complexity of Short Computation and Factorization Liming Cai and Jianer Chen Department of Computer Science, Texas A & M University College Station, Texas 77843 U.S.A. Rodney G. Downey

More information

(LMCS, p. 317) V.1. First Order Logic. This is the most powerful, most expressive logic that we will examine.

(LMCS, p. 317) V.1. First Order Logic. This is the most powerful, most expressive logic that we will examine. (LMCS, p. 317) V.1 First Order Logic This is the most powerful, most expressive logic that we will examine. Our version of first-order logic will use the following symbols: variables connectives (,,,,

More information

CS154. Turing Machines. Turing Machine. Turing Machines versus DFAs FINITE STATE CONTROL AI N P U T INFINITE TAPE. read write move.

CS154. Turing Machines. Turing Machine. Turing Machines versus DFAs FINITE STATE CONTROL AI N P U T INFINITE TAPE. read write move. CS54 Turing Machines Turing Machine q 0 AI N P U T IN TAPE read write move read write move Language = {0} q This Turing machine recognizes the language {0} Turing Machines versus DFAs TM can both write

More information

TRANSCENDENTAL NUMBERS

TRANSCENDENTAL NUMBERS TRANSCENDENTAL NUMBERS JEREMY BOOHER. Introduction The Greeks tried unsuccessfully to square the circle with a comass and straightedge. In the 9th century, Lindemann showed that this is imossible by demonstrating

More information

Universality in the theory of algorithms and computer science

Universality in the theory of algorithms and computer science Universality in the theory of algorithms and computer science Alexander Shen Computational models The notion of computable function was introduced in 1930ies. Simplifying (a rather interesting and puzzling)

More information

! X is a set of strings. ! Instance: string s. ! Algorithm A solves problem X: A(s) = yes iff s! X.

! X is a set of strings. ! Instance: string s. ! Algorithm A solves problem X: A(s) = yes iff s! X. Decision Problems 8.2 Definition of NP Decision problem. X is a set of strings. Instance: string s. Algorithm A solves problem X: A(s) = yes iff s X. Polynomial time. Algorithm A runs in polytime if for

More information

United Arab Emirates University College of Sciences Department of Mathematical Sciences HOMEWORK 1 SOLUTION. Section 10.1 Vectors in the Plane

United Arab Emirates University College of Sciences Department of Mathematical Sciences HOMEWORK 1 SOLUTION. Section 10.1 Vectors in the Plane United Arab Emirates University College of Sciences Deartment of Mathematical Sciences HOMEWORK 1 SOLUTION Section 10.1 Vectors in the Plane Calculus II for Engineering MATH 110 SECTION 0 CRN 510 :00 :00

More information

Computational complexity theory

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

More information

Factoring & Primality

Factoring & Primality Factoring & Primality Lecturer: Dimitris Papadopoulos In this lecture we will discuss the problem of integer factorization and primality testing, two problems that have been the focus of a great amount

More information

Notes on Determinant

Notes on Determinant ENGG2012B Advanced Engineering Mathematics Notes on Determinant Lecturer: Kenneth Shum Lecture 9-18/02/2013 The determinant of a system of linear equations determines whether the solution is unique, without

More information

Service Network Design with Asset Management: Formulations and Comparative Analyzes

Service Network Design with Asset Management: Formulations and Comparative Analyzes Service Network Design with Asset Management: Formulations and Comarative Analyzes Jardar Andersen Teodor Gabriel Crainic Marielle Christiansen October 2007 CIRRELT-2007-40 Service Network Design with

More information

P NP for the Reals with various Analytic Functions

P NP for the Reals with various Analytic Functions P NP for the Reals with various Analytic Functions Mihai Prunescu Abstract We show that non-deterministic machines in the sense of [BSS] defined over wide classes of real analytic structures are more powerful

More information

COMMUTATIVITY DEGREES OF WREATH PRODUCTS OF FINITE ABELIAN GROUPS

COMMUTATIVITY DEGREES OF WREATH PRODUCTS OF FINITE ABELIAN GROUPS COMMUTATIVITY DEGREES OF WREATH PRODUCTS OF FINITE ABELIAN GROUPS IGOR V. EROVENKO AND B. SURY ABSTRACT. We compute commutativity degrees of wreath products A B of finite abelian groups A and B. When B

More information

Sudoku as a SAT Problem

Sudoku as a SAT Problem Sudoku as a SAT Problem Inês Lynce IST/INESC-ID, Technical University of Lisbon, Portugal [email protected] Joël Ouaknine Oxford University Computing Laboratory, UK [email protected] Abstract Sudoku

More information

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

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

More information

Number Theory Naoki Sato <[email protected]>

Number Theory Naoki Sato <ensato@hotmail.com> Number Theory Naoki Sato 0 Preface This set of notes on number theory was originally written in 1995 for students at the IMO level. It covers the basic background material that an

More information

Offline 1-Minesweeper is NP-complete

Offline 1-Minesweeper is NP-complete Offline 1-Minesweeper is NP-complete James D. Fix Brandon McPhail May 24 Abstract We use Minesweeper to illustrate NP-completeness proofs, arguments that establish the hardness of solving certain problems.

More information

POISSON PROCESSES. Chapter 2. 2.1 Introduction. 2.1.1 Arrival processes

POISSON PROCESSES. Chapter 2. 2.1 Introduction. 2.1.1 Arrival processes Chater 2 POISSON PROCESSES 2.1 Introduction A Poisson rocess is a simle and widely used stochastic rocess for modeling the times at which arrivals enter a system. It is in many ways the continuous-time

More information

A Note on Integer Factorization Using Lattices

A Note on Integer Factorization Using Lattices A Note on Integer Factorization Using Lattices Antonio Vera To cite this version: Antonio Vera A Note on Integer Factorization Using Lattices [Research Reort] 2010, 12 HAL Id: inria-00467590

More information

NP-completeness and the real world. NP completeness. NP-completeness and the real world (2) NP-completeness and the real world

NP-completeness and the real world. NP completeness. NP-completeness and the real world (2) NP-completeness and the real world -completeness and the real world completeness Course Discrete Biological Models (Modelli Biologici Discreti) Zsuzsanna Lipták Imagine you are working for a biotech company. One day your boss calls you

More information

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

SIMS 255 Foundations of Software Design. Complexity and NP-completeness SIMS 255 Foundations of Software Design Complexity and NP-completeness Matt Welsh November 29, 2001 [email protected] 1 Outline Complexity of algorithms Space and time complexity ``Big O'' notation Complexity

More information

How To Solve An Npa-Complete Problems With Quantum Computing And Chaotic Dynamics

How To Solve An Npa-Complete Problems With Quantum Computing And Chaotic Dynamics CDMTCS Research Report Series A New Quantum Algorithm for NP-complete Problems Masanori Ohya Igor V. Volovich Science University of Tokyo Steklov Mathematical Institute CDMTCS-194 September 00 Centre for

More information

Fixed-Point Logics and Computation

Fixed-Point Logics and Computation 1 Fixed-Point Logics and Computation Symposium on the Unusual Effectiveness of Logic in Computer Science University of Cambridge 2 Mathematical Logic Mathematical logic seeks to formalise the process of

More information

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

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

More information

Introduction to Automata Theory. Reading: Chapter 1

Introduction to Automata Theory. Reading: Chapter 1 Introduction to Automata Theory Reading: Chapter 1 1 What is Automata Theory? Study of abstract computing devices, or machines Automaton = an abstract computing device Note: A device need not even be a

More information