Circuit Complexity / Counting Problems

Size: px
Start display at page:

Download "Circuit Complexity / Counting Problems"

Transcription

1 Lecture 5 Circuit Complexity / Counting Problems April 2, 24 Lecturer: Paul eame Notes: William Pentney 5. Circuit Complexity and Uniorm Complexity We will conclude our look at the basic relationship between circuit complexity classes and uniorm complexity classes. First, we will prove that circuits can eiciently solve problems in uniorm complexity classes. Theorem 5. (Pippenger, Fischer). I T (n) n, then TIME(T (n)) SIZE(kT (n) log 2 T (n)). First, consider the ollowing variant o the traditional k-tape TM: Deinition 5.. A multitape TM is oblivious i the motion o each head depends only upon the length o its input. Note that an oblivious TM s motion has nothing to do with the input itsel; given an input o size n, the machine s head(s) will perorm the same series o motions regardless o the original contents o the tape. We will prove two lemmas rom which Theorem 5. ollows immediately. The irst is a more careul version o the original result o Hennie and Stearns showing that k-tape TMs can be eiciently simulated by 2-tape TMs. The key extension is that the resulting TM can be made oblivious. Lemma 5.2 (Hennie-Stearns, Pippenger-Fischer). For T (n) n, i A TIME(T (n)) then A is recognized by a 2-tape deterministic oblivious TM in time O(T (n) log T (n)). The second lemma shows that oblivious TMs can be eiciently simulated by circuits. Lemma 5.3. [Pippenger-Fischer] I A {, } is recognized by a 2-tape deterministic oblivious TM in time O(T (n)), then A k SIZE(kT (n)) (i.e. size linear in T (n). First we will prove Lemma 5.3 whose proo motivates the notion o oblivious TMs. Proo o Lemma 5.3. Consider the tableau generated in the standard proo o the Cook-Levin theorem or an input o size n or a Turing machine running in O(T (n). The tableau yields a circuit o size O(T 2 (n)), with windows o size 2 3. However, on any given input the TM head will only be in one cell at a given time step; i.e., one cell per row in the tableau. With a normal TM, though, it is not possible to anticipate which cell that will be. 22

2 LECTURE 5. CIRCUIT COMPLEXITY / COUNTING PROLEMS 23 = position o TM head. Figure 5.: Representing an oblivious TM using constant-size windows. Since our TM M is oblivious, we know the path that the head shall take, and where it will be at each timestep, simply by knowing the length o the input. We know i and when a given cell on the tape will be revisited, and can ignore it at other times. Thus we can use windows containing simply the contents o a cell rom the last time it was active and the contents o the previous cell visited to see what the head moves, to represent each step taken by that head, and all other cells in the tableau will be irrelevant to that step in the computation. This is represented in Figure 5.. The subsequent coniguration resulting rom any coniguration can thus be computed by a circuit o constant size. Since the tableau is o height T (n), we can express the tableau in size O(T (n)). Now, we prove Lemma 5.2, that i A TIME(T (n)), then A is recognized by a 2-tape deterministic

3 LECTURE 5. CIRCUIT COMPLEXITY / COUNTING PROLEMS 24 g e d c b a h i j k l m Figure 5.2: 4-track oblivious simulation o a TM tape e d c b a g h i j k l m Figure 5.3: The simulation in Figure 5.2 when the head moves let. lock is bunched and stretched. and oblivious TM in time O(T (n) log T (n)). Proo o Lemma 5.2. We will build a 2-tape TM M which will consist o two tapes: one holding all the contents o M s tapes, and one work tape. Traditionally, we think o a TM as having a tape which the head moves back on orth on. For this proo, it may help to instead think o the TM head as being in a ixed position and each o the tapes as moving instead, similar to a typewriter carriage (i anyone remembers this ancient beasts!). O course a tape would be an ininitely long typewriter carriage which would be too much to move in a single step. Instead, we think o moving the tapes back and orth, but we may not do so smoothly; sometimes we will be bunching up a tape, such that some cells may be eectively layered on top o others and other parts will be stretched, parts that are not bunched or stretched are smooth. It will be convenient to concentrate on simulating one tape o M at a time. In reality we will allocate several tracks on tape o M to each o the k-tapes. It is simplest also to imagine that each o M s tapes is 2-way ininite, although M will have only -way ininite tapes. More precisely, imagine the scenario modeled in Figure 5.2. For each tape o M, we have our tracks two or those cells to the let o the current cell, and two or those to the right o the current cell. The outer tracks will contain the contents o the tape when that portion o the tape is smooth; the inner tracks will contain portions o the tape that are bunched up. The current cell is always on the let end o the set o tracks. The tracks wrap around as the head o M moves. We will divide the tracks into blocks, where each block will consist o a portion o the two upper or lower tracks. lock contains the current cell (at the let end o the tape); block is the lower hal o the the cell immediately to the right o block and has capacity or up to 2 cells o M; block 2 is the lower hal o the next 2 cells to the right o that with capacity or up to 4 cells o M, etc. In general, block i has contains the lower hal o the next 2 i cells starting at cell 2 i and has capacity or 2 i cells o M. lock i or i contains the corresponding upper hal o cells o M whose lower hal is the block i. In general, or block i and j, i i < j then the contents o block i will be to the let o those or block

4 LECTURE 5. CIRCUIT COMPLEXITY / COUNTING PROLEMS e d c b a e d c b a j g h i k l m g h i j k l m Figure 5.4: The smoothing o blocks 2 and block 2. j. The outer tracks o block i or i will contain contents o cells o M that are closer to the cell in block than the inner tracks. In our simulation, when we wrap the tracks around, we permit the tape to bunch up within a block; when this happens, the contents o the cell o M that would ordinarily be in the outer track o the next block is now placed in the next ree cell on the inner track o the current block. We can later undo this by moving the bunched-up data in block i into i+ ; this process is called smoothing the block. Similarly, a block i may be stretched, so that it contains ewer than 2 i cells rom the tape; i other data is pushed into it, the vacant area on the track is illed. The tape is smoothed when it is no longer stretched. Figure 5.3 shows the movement o the tracks in our simulation depicted in Figure 5.2 when the head moves let; block is bunched and block stretched. In Figure 5.4, we see the smoothing o blocks 2 and 2 on such a simulation. We maintain the ollowing invariants ater simulating each time step t o the simulation:. Every block i with i > log 2 t + is smooth. 2. i + i = 2 i i.e. i i is bunched, i is stretched an equal amount. 3. Each i consists o consecutive elements o the tape o M. 4. I t is a multiple o 2 i then blocks i, i, i 2,,,, 2, i are smooth. To maintain our invariants, whenever t is 2 i t or some odd t, we smooth out blocks i i by borrowing rom or adding entries to i+ and (i+). We do this by copying the contents o all the cells in,..., i, i+ onto tape 2 and then writing them back into those cells only on the outer tracks, except, possibly, or block i+. The same is done or blocks,..., (i+). We need to argue that this smoothing can be accomplished. Ater smoothing blocks (i+),..., (i+) when t is a multiple o 2 i+, we may simulate M or up 2 i steps without accessing blocks i+ or (i+). On the 2 i -th step the number o entries that will need to appear in blocks,,..., i (or i, i,..., ) is between and 2 i+ since this number can have changed by at most 2 i during this time. Since i+ has remained smooth during this time, there are precisely 2 i occupied cells in i+ and space or 2 i more inputs. Thereore there enough entries in i+ to borrow to ill the up to 2 i spaces in blocks,..., i that need to be illed, or enough space to take the overlow rom those blocks. A similar argument applies to blocks i,...,. Thereore this smoothing can be accomplished. y careully making sure that the inner and outer tracks are scanned whether or not they contain entries, the smoothing can be done with oblivious motion. How much does the smoothing cost when t is a multiple o 2 i but not 2 i+? It will be less than or equal to c2 i steps in tota or some constant c. We will perorm smoothing 2 i o the time, with cost c2 i per smoothing. Thereore, the total time will be i log 2 T (n) + c2i T (n) 2 i which is O(T (n) log T (n).

5 LECTURE 5. CIRCUIT COMPLEXITY / COUNTING PROLEMS 26 We can use the proo o THeoremm 5. to prove the ollowing theorem: Theorem 5.4 (Cook 83). I T (n) n and L NTIME(T (n)) then there exists a reduction that maps input x to a 3-CNF ormula φ x in O(T (n) log T (n)) time and O(log T (n)) space such that φ x has size O(T (n) log T (n)) and x L φ x 3SAT. Proo. φ x is usual 3-CNF based on CIRCUIT-SAT. Check that producing the circuit in the proo o the previous lemmas can be done in O(T (n) log T (n)) time and O(log T (n)) space. 5.2 Function Complexity Classes, Counting Problems, and #P We will now deine some complexity classes o numerical unctions on input strings rather than decision problems. Deinition 5.2. The class FP is the set o all unctions : {, } N that are computable in polynomial time. Among the algorithmic problems representable by such unctions are counting problems pertaining to common decision problems. For example, Deinition 5.3. Deine #3-SAT as the problem o counting the number o satisying assignments to a given 3-SAT ormula φ. Remark. Note that i we can solve #3-SAT in polynomial time, then clearly we can solve any NP-complete problem in polynomial time and thus P = NP. We can deine new complexity classes to represent such counting problems: Deinition 5.4. For any complexity class C, let #C be the set o all unctions { : {, } N or which there exists R C and a polynomial p : N N such that (x) = #{y {, } p( x ) : (x, y) R} = {y {, } p( x ) : (x, y) R}. In particular, or C = P, we obtain Deinition 5.5. Deine the class #P to be the set o all unctions { : {, } N or which there exists R P and a polynomial p : N N such that (x) = #{y {, } p( x ) : (x, y) R} = {y {, } p( x ) : (x, y) R} Function classes and oracles Let us consider the use o oracle TMs in the context o unction classes. For a language A, let FP A be the set o unctions : {, } N that can be solved in polynomial time by an oracle TM M? that has A as an oracle. Similarly, we can deine oracle TM s M? that allow unctions as oracles rather than sets. In this case, rather than receiving the answer rom the oracle by entering one o two states, the machine can receive a binary encoded version o the oracle answer on an oracle answer tape. Thus or unctions : {, } N and a complexity class C or which it makes sense to deine oracle versions, we can deine C, and or a complexity class FC o unctions we can deine C FC = FC C.

6 LECTURE 5. CIRCUIT COMPLEXITY / COUNTING PROLEMS 27 u v edge in G u v.. gadget in G N = n log n layers 2 Figure 5.5: Gadgets used in reduction o #HAM-CYCLE to #CYCLE. Deinition 5.6. A unction is #P-complete i. #P. 2. For all g #P, g FP. As 3-SAT is NP-complete, #3-SAT is #P-complete: Theorem 5.5. #3-SAT is #P-complete. Proo. Cook s reduction is parsimonious, in that it preserves the number o solutions. More precisely, in circuit orm there is precisely one satisying assignment or the circuit or each NP witness y. Moreover, the conversion o the circuit to 3-SAT enorces precisely one satisying assignment or each o the extension variables associated with each gate. Since the standard reductions are requently parsimonious, and can be used to prove #P-completeness o many counting problems relating to NP-complete problems. In some instances they are not parsimonious but can be made parsimonious. For example we have the ollowing. Theorem 5.6. #HAM-CYCLE is #P-complete. The set o #P-complete problems is not restricted to the counting versions o NP-complete problems, however; interestingly, problems in P can have #P-complete counting problems as well. Consider #CY- CLE, the problem o inding the number o directed simple cycles in a graph G. (The corresponding problem CYCLE is in P). Theorem 5.7. #CYCLE is #P-complete. Proo. We reduce rom #HAM-CYCLE. We will map the input graph G or #HAM-CYCLE to a graph G or #CYCLE. Say G has n vertices. G will have a copy u o each vertex u G, and or each edge (u, v) G the gadget in Figure 5.5 will be added between u and v in G. This gadget consists o N = n log 2 n + layers o pairs o vertices, connected to u and v and connected by 4N edges within. The number o paths rom u to v in G is 2 N > n n. Each simple cycle o length l in G yields 2 Nl simple cycles in G. I G has k Hamiltonian cycles, there will be k2 Nn corresponding simple cycles in G. G has at most n n simple cycles o length n. The total number o simple cycles in G corresponding to these is n n 2 N(n ) < 2 Nn. Thereore we compute #HAM-CYCLE(G) = #CYCLE(G )/2 Nn. The ollowing theorem is let as an exercise: Theorem 5.8. #2-SAT is #P-complete.

7 LECTURE 5. CIRCUIT COMPLEXITY / COUNTING PROLEMS Determinant and Permanent Some interesting problems in matrix algebra are represented in unction complexity classes. Given an n n matrix A, the determinant o A is det(a) = σ S n ( ) sgn(σ) n a i,σ(i), where S n is the set o permutations o n and sgn(σ) is the number o trnaspositions required to produce σ modulo 2. This problem is in FP. The sgn(σ) is apparently a complicating actor in the deinition o det(a), but i we remove it we will see that the problem actually becomes harder. Given an n n matrix A, the permanent o A is equal to perm(a) = σ S n i= i= n a i,σ(i). Let -PERM be the problem o inding the permanent o a - matrix. When we continue, we will prove the ollowing theorem: Theorem 5.9 (Valiant). -PERM is #P-complete. The ollowing is an interesting interpretation o the permanent. We can view the matrix A the adjacency matrix o a weighted bipartite graph on vertices [n] [n] where [n] = {,..., n}. Each σ S n corresponds to a perect matching o this graph. I we view the weight o a matching as the product o the weights o its edges the permanent is the total weight o all matchings in the graph. In particular a - matrix A corresponds to an unweighted bipartite graph G or which A is the adjacency matrix, and Perm(A) represents the total weight o all perect matchings on G. Let #IPARTITE- MATCHING be the problem o counting all such matchings. Thus we obtain the ollowing corollary as well: Corollary 5.. #IPARTITE-MATCHINGS is #P-complete

FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY. FLAC (15-453) Spring l. Blum TIME COMPLEXITY AND POLYNOMIAL TIME;

FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY. FLAC (15-453) Spring l. Blum TIME COMPLEXITY AND POLYNOMIAL TIME; 15-453 TIME COMPLEXITY AND POLYNOMIAL TIME; FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY NON DETERMINISTIC TURING MACHINES AND NP THURSDAY Mar 20 COMPLEXITY THEORY Studies what can and can t be computed

More information

CS 361 Meeting 28 11/14/18

CS 361 Meeting 28 11/14/18 CS 361 Meeting 28 11/14/18 Announcements 1. Homework 9 due Friday Computation Histories 1. Some very interesting proos o undecidability rely on the technique o constructing a language that describes the

More information

Lecture 1: Course Overview and Turing machine complexity

Lecture 1: Course Overview and Turing machine complexity CSE 531: Computational Complexity I Winter 2016 Lecture 1: Course Overview and Turing machine complexity January 6, 2016 Lecturer: Paul Beame Scribe: Paul Beame 1 Course Outline 1. Basic properties of

More information

DRAFT. Complexity of counting. Chapter 8

DRAFT. Complexity of counting. Chapter 8 Chapter 8 Complexity of counting It is an empirical fact that for many combinatorial problems the detection of the existence of a solution is easy, yet no computationally efficient method is known for

More information

Lecture 17: Cook-Levin Theorem, NP-Complete Problems

Lecture 17: Cook-Levin Theorem, NP-Complete Problems 6.045 Lecture 17: Cook-Levin Theorem, NP-Complete Problems 1 Is SAT solvable in O(n) time on a multitape TM? Logic circuits of 6n gates for SAT? If yes, then not only is P=NP, but there would be a dream

More information

Computational Complexity: A Modern Approach. Draft of a book: Dated January 2007 Comments welcome!

Computational Complexity: A Modern Approach. Draft of a book: Dated January 2007 Comments welcome! i Computational Complexity: A Modern Approach Draft of a book: Dated January 2007 Comments welcome! Sanjeev Arora and Boaz Barak Princeton University complexitybook@gmail.com Not to be reproduced or distributed

More information

Notes for Lecture 3... x 4

Notes for Lecture 3... x 4 Stanford University CS254: Computational Complexity Notes 3 Luca Trevisan January 14, 2014 Notes for Lecture 3 In this lecture we introduce the computational model of boolean circuits and prove that polynomial

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

Lecture 22: Counting

Lecture 22: Counting CS 710: Complexity Theory 4/8/2010 Lecture 22: Counting Instructor: Dieter van Melkebeek Scribe: Phil Rydzewski & Chi Man Liu Last time we introduced extractors and discussed two methods to construct them.

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

Lecture 6: Oracle TMs, Diagonalization Limits, Space Complexity

Lecture 6: Oracle TMs, Diagonalization Limits, Space Complexity CSE 531: Computational Complexity I Winter 2016 Lecture 6: Oracle TMs, Diagonalization Limits, Space Complexity January 22, 2016 Lecturer: Paul Beame Scribe: Paul Beame Diagonalization enabled us to separate

More information

q FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY. FLAC (15-453) Spring L. Blum. REVIEW for Midterm 2 TURING MACHINE

q FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY. FLAC (15-453) Spring L. Blum. REVIEW for Midterm 2 TURING MACHINE FLAC (15-45) Spring 214 - L. Blum THURSDAY APRIL 15-45 REVIEW or Midterm 2 FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY TUESDAY April 8 Deinition: A Turing Machine is a 7-tuple T = (Q, Σ, Γ,, q, q accept,

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

Review of Basic Computational Complexity

Review of Basic Computational Complexity Lecture 1 Review of Basic Computational Complexity March 30, 2004 Lecturer: Paul Beame Notes: Daniel Lowd 1.1 Preliminaries 1.1.1 Texts There is no one textbook that covers everything in this course. Some

More information

Complexity (Pre Lecture)

Complexity (Pre Lecture) Complexity (Pre Lecture) Dr. Neil T. Dantam CSCI-561, Colorado School of Mines Fall 2018 Dantam (Mines CSCI-561) Complexity (Pre Lecture) Fall 2018 1 / 70 Why? What can we always compute efficiently? What

More information

Lecture 25: Cook s Theorem (1997) Steven Skiena. skiena

Lecture 25: Cook s Theorem (1997) Steven Skiena.   skiena Lecture 25: Cook s Theorem (1997) Steven Skiena Department of Computer Science State University of New York Stony Brook, NY 11794 4400 http://www.cs.sunysb.edu/ skiena Prove that Hamiltonian Path is NP

More information

NP Completeness. Richard Karp, 1972.

NP Completeness. Richard Karp, 1972. NP Completeness In this paper we give theorems that suggest, but do not imply, that these problems as well as many others, will remain intractable perpetually. Richard Karp, 1972. Reductions At the heart

More information

Lecture 4 : Quest for Structure in Counting Problems

Lecture 4 : Quest for Structure in Counting Problems CS6840: Advanced Complexity Theory Jan 10, 2012 Lecture 4 : Quest for Structure in Counting Problems Lecturer: Jayalal Sarma M.N. Scribe: Dinesh K. Theme: Between P and PSPACE. Lecture Plan:Counting problems

More information

Lecture 3: Voronoi Diagrams & VCP Preliminaries July 24, 2013

Lecture 3: Voronoi Diagrams & VCP Preliminaries July 24, 2013 Blockcourse on High-Dimensional Computational Geometry Spring 2013 Lecture 3: Voronoi Diagrams & VCP Preliminaries July 24, 2013 Wolfgang Mulzer, Helmut Alt Scribes: Simon Tippenhauer, Terese Haimberger

More information

Week 3: Reductions and Completeness

Week 3: Reductions and Completeness Computational Complexity Theory Summer HSSP 2018 Week 3: Reductions and Completeness Dylan Hendrickson MIT Educational Studies Program 3.1 Reductions Suppose I know how to solve some problem quickly. How

More information

Statistical Mechanics and Combinatorics : Lecture II

Statistical Mechanics and Combinatorics : Lecture II Statistical Mechanics and Combinatorics : Lecture II Kircho s matrix-tree theorem Deinition (Spanning tree) A subgraph T o a graph G(V, E) is a spanning tree i it is a tree that contains every vertex in

More information

Lecture 5 Polynomial Identity Testing

Lecture 5 Polynomial Identity Testing Lecture 5 Polynomial Identity Testing Michael P. Kim 18 April 2017 1 Outline and Motivation In this lecture we will cover a fundamental problem in complexity theory polynomial identity testing (PIT). We

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

Maximum Flow. Reading: CLRS Chapter 26. CSE 6331 Algorithms Steve Lai

Maximum Flow. Reading: CLRS Chapter 26. CSE 6331 Algorithms Steve Lai Maximum Flow Reading: CLRS Chapter 26. CSE 6331 Algorithms Steve Lai Flow Network A low network G ( V, E) is a directed graph with a source node sv, a sink node tv, a capacity unction c. Each edge ( u,

More information

( x) f = where P and Q are polynomials.

( x) f = where P and Q are polynomials. 9.8 Graphing Rational Functions Lets begin with a deinition. Deinition: Rational Function A rational unction is a unction o the orm ( ) ( ) ( ) P where P and Q are polynomials. Q An eample o a simple rational

More information

CSC 5170: Theory of Computational Complexity Lecture 4 The Chinese University of Hong Kong 1 February 2010

CSC 5170: Theory of Computational Complexity Lecture 4 The Chinese University of Hong Kong 1 February 2010 CSC 5170: Theory of Computational Complexity Lecture 4 The Chinese University of Hong Kong 1 February 2010 Computational complexity studies the amount of resources necessary to perform given computations.

More information

15.1 Proof of the Cook-Levin Theorem: SAT is NP-complete

15.1 Proof of the Cook-Levin Theorem: SAT is NP-complete CS125 Lecture 15 Fall 2016 15.1 Proof of the Cook-Levin Theorem: SAT is NP-complete Already know SAT NP, so only need to show SAT is NP-hard. Let L be any language in NP. Let M be a NTM that decides L

More information

Lecture 3: Nondeterminism, NP, and NP-completeness

Lecture 3: Nondeterminism, NP, and NP-completeness CSE 531: Computational Complexity I Winter 2016 Lecture 3: Nondeterminism, NP, and NP-completeness January 13, 2016 Lecturer: Paul Beame Scribe: Paul Beame 1 Nondeterminism and NP Recall the definition

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

DRAFT. Algebraic computation models. Chapter 14

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

More information

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

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

More information

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

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

More information

NP-Completeness. A language B is NP-complete iff B NP. This property means B is NP hard

NP-Completeness. A language B is NP-complete iff B NP. This property means B is NP hard NP-Completeness A language B is NP-complete iff B NP A NP A P B This property means B is NP hard 1 3SAT is NP-complete 2 Result Idea: B is known to be NP complete Use it to prove NP-Completeness of C IF

More information

CS151 Complexity Theory. Lecture 1 April 3, 2017

CS151 Complexity Theory. Lecture 1 April 3, 2017 CS151 Complexity Theory Lecture 1 April 3, 2017 Complexity Theory Classify problems according to the computational resources required running time storage space parallelism randomness rounds of interaction,

More information

Umans Complexity Theory Lectures

Umans Complexity Theory Lectures New topic(s) Umans Complexity Theory Lectures Lecture 15: Approximation Algorithms and Probabilistically Checable Proos (PCPs) Optimization problems,, and Probabilistically Checable Proos 2 Optimization

More information

15-855: Intensive Intro to Complexity Theory Spring Lecture 7: The Permanent, Toda s Theorem, XXX

15-855: Intensive Intro to Complexity Theory Spring Lecture 7: The Permanent, Toda s Theorem, XXX 15-855: Intensive Intro to Complexity Theory Spring 2009 Lecture 7: The Permanent, Toda s Theorem, XXX 1 #P and Permanent Recall the class of counting problems, #P, introduced last lecture. It was introduced

More information

9.3 Graphing Functions by Plotting Points, The Domain and Range of Functions

9.3 Graphing Functions by Plotting Points, The Domain and Range of Functions 9. Graphing Functions by Plotting Points, The Domain and Range o Functions Now that we have a basic idea o what unctions are and how to deal with them, we would like to start talking about the graph o

More information

CSC 5170: Theory of Computational Complexity Lecture 9 The Chinese University of Hong Kong 15 March 2010

CSC 5170: Theory of Computational Complexity Lecture 9 The Chinese University of Hong Kong 15 March 2010 CSC 5170: Theory of Computational Complexity Lecture 9 The Chinese University of Hong Kong 15 March 2010 We now embark on a study of computational classes that are more general than NP. As these classes

More information

Lecture 3: Reductions and Completeness

Lecture 3: Reductions and Completeness CS 710: Complexity Theory 9/13/2011 Lecture 3: Reductions and Completeness Instructor: Dieter van Melkebeek Scribe: Brian Nixon Last lecture we introduced the notion of a universal Turing machine for deterministic

More information

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

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

More information

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

Time-Space Tradeoffs for SAT

Time-Space Tradeoffs for SAT Lecture 8 Time-Space Tradeoffs for SAT April 22, 2004 Lecturer: Paul Beame Notes: Definition 8.1. TIMESPACE(T (n), S(n)) = {L {0, 1} offline, multitape TM M such that L = L(M) and M uses time O(T (n))

More information

Time to learn about NP-completeness!

Time to learn about NP-completeness! Time to learn about NP-completeness! Harvey Mudd College March 19, 2007 Languages A language is a set of strings Examples The language of strings of all zeros with odd length The language of strings with

More information

Lab on Taylor Polynomials. This Lab is accompanied by an Answer Sheet that you are to complete and turn in to your instructor.

Lab on Taylor Polynomials. This Lab is accompanied by an Answer Sheet that you are to complete and turn in to your instructor. Lab on Taylor Polynomials This Lab is accompanied by an Answer Sheet that you are to complete and turn in to your instructor. In this Lab we will approimate complicated unctions by simple unctions. The

More information

Lecture 7: The Polynomial-Time Hierarchy. 1 Nondeterministic Space is Closed under Complement

Lecture 7: The Polynomial-Time Hierarchy. 1 Nondeterministic Space is Closed under Complement CS 710: Complexity Theory 9/29/2011 Lecture 7: The Polynomial-Time Hierarchy Instructor: Dieter van Melkebeek Scribe: Xi Wu In this lecture we first finish the discussion of space-bounded nondeterminism

More information

TIME COMPLEXITY AND POLYNOMIAL TIME; NON DETERMINISTIC TURING MACHINES AND NP. THURSDAY Mar 20

TIME COMPLEXITY AND POLYNOMIAL TIME; NON DETERMINISTIC TURING MACHINES AND NP. THURSDAY Mar 20 TIME COMPLEXITY AND POLYNOMIAL TIME; NON DETERMINISTIC TURING MACHINES AND NP THURSDAY Mar 20 COMPLEXITY THEORY Studies what can and can t be computed under limited resources such as time, space, etc Today:

More information

6.841/18.405J: Advanced Complexity Wednesday, February 12, Lecture Lecture 3

6.841/18.405J: Advanced Complexity Wednesday, February 12, Lecture Lecture 3 6.841/18.405J: Advanced Complexity Wednesday, February 12, 2003 Lecture Lecture 3 Instructor: Madhu Sudan Scribe: Bobby Kleinberg 1 The language MinDNF At the end of the last lecture, we introduced the

More information

Time to learn about NP-completeness!

Time to learn about NP-completeness! Time to learn about NP-completeness! Harvey Mudd College March 19, 2007 Languages A language is a set of strings Examples The language of strings of all a s with odd length The language of strings with

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

RATIONAL FUNCTIONS. Finding Asymptotes..347 The Domain Finding Intercepts Graphing Rational Functions

RATIONAL FUNCTIONS. Finding Asymptotes..347 The Domain Finding Intercepts Graphing Rational Functions RATIONAL FUNCTIONS Finding Asymptotes..347 The Domain....350 Finding Intercepts.....35 Graphing Rational Functions... 35 345 Objectives The ollowing is a list o objectives or this section o the workbook.

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

The Complexity of the Permanent and Related Problems

The Complexity of the Permanent and Related Problems The Complexity of the Permanent and Related Problems Tim Abbott and Alex Schwendner May 9, 2007 Contents 1 The Permanent 2 1.1 Variations on the Determinant...................... 2 1.2 Graph Interpretation...........................

More information

SEPARATED AND PROPER MORPHISMS

SEPARATED AND PROPER MORPHISMS SEPARATED AND PROPER MORPHISMS BRIAN OSSERMAN The notions o separatedness and properness are the algebraic geometry analogues o the Hausdor condition and compactness in topology. For varieties over the

More information

Figure 1: Bayesian network for problem 1. P (A = t) = 0.3 (1) P (C = t) = 0.6 (2) Table 1: CPTs for problem 1. (c) P (E B) C P (D = t) f 0.9 t 0.

Figure 1: Bayesian network for problem 1. P (A = t) = 0.3 (1) P (C = t) = 0.6 (2) Table 1: CPTs for problem 1. (c) P (E B) C P (D = t) f 0.9 t 0. Probabilistic Artiicial Intelligence Problem Set 3 Oct 27, 2017 1. Variable elimination In this exercise you will use variable elimination to perorm inerence on a bayesian network. Consider the network

More information

CS294: Pseudorandomness and Combinatorial Constructions September 13, Notes for Lecture 5

CS294: Pseudorandomness and Combinatorial Constructions September 13, Notes for Lecture 5 UC Berkeley Handout N5 CS94: Pseudorandomness and Combinatorial Constructions September 3, 005 Professor Luca Trevisan Scribe: Gatis Midrijanis Notes for Lecture 5 In the few lectures we are going to look

More information

Chapter 34: NP-Completeness

Chapter 34: NP-Completeness Graph Algorithms - Spring 2011 Set 17. Lecturer: Huilan Chang Reference: Cormen, Leiserson, Rivest, and Stein, Introduction to Algorithms, 2nd Edition, The MIT Press. Chapter 34: NP-Completeness 2. Polynomial-time

More information

Finger Search in the Implicit Model

Finger Search in the Implicit Model Finger Search in the Implicit Model Gerth Stølting Brodal, Jesper Sindahl Nielsen, Jakob Truelsen MADALGO, Department o Computer Science, Aarhus University, Denmark. {gerth,jasn,jakobt}@madalgo.au.dk Abstract.

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

1 More finite deterministic automata

1 More finite deterministic automata CS 125 Section #6 Finite automata October 18, 2016 1 More finite deterministic automata Exercise. Consider the following game with two players: Repeatedly flip a coin. On heads, player 1 gets a point.

More information

Complete problems for classes in PH, The Polynomial-Time Hierarchy (PH) oracle is like a subroutine, or function in

Complete problems for classes in PH, The Polynomial-Time Hierarchy (PH) oracle is like a subroutine, or function in Oracle Turing Machines Nondeterministic OTM defined in the same way (transition relation, rather than function) oracle is like a subroutine, or function in your favorite PL but each call counts as single

More information

Counting bases of representable matroids

Counting bases of representable matroids Counting bases of representable matroids Michael Snook School of Mathematics, Statistics and Operations Research Victoria University of Wellington Wellington, New Zealand michael.snook@msor.vuw.ac.nz Submitted:

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

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

MTAT Complexity Theory October 20th-21st, Lecture 7

MTAT Complexity Theory October 20th-21st, Lecture 7 MTAT.07.004 Complexity Theory October 20th-21st, 2011 Lecturer: Peeter Laud Lecture 7 Scribe(s): Riivo Talviste Polynomial hierarchy 1 Turing reducibility From the algorithmics course, we know the notion

More information

Outline. Complexity Theory. Example. Sketch of a log-space TM for palindromes. Log-space computations. Example VU , SS 2018

Outline. Complexity Theory. Example. Sketch of a log-space TM for palindromes. Log-space computations. Example VU , SS 2018 Complexity Theory Complexity Theory Outline Complexity Theory VU 181.142, SS 2018 3. Logarithmic Space Reinhard Pichler Institute of Logic and Computation DBAI Group TU Wien 3. Logarithmic Space 3.1 Computational

More information

Categories and Natural Transformations

Categories and Natural Transformations Categories and Natural Transormations Ethan Jerzak 17 August 2007 1 Introduction The motivation or studying Category Theory is to ormalise the underlying similarities between a broad range o mathematical

More information

SEPARATED AND PROPER MORPHISMS

SEPARATED AND PROPER MORPHISMS SEPARATED AND PROPER MORPHISMS BRIAN OSSERMAN Last quarter, we introduced the closed diagonal condition or a prevariety to be a prevariety, and the universally closed condition or a variety to be complete.

More information

NP-Complete problems

NP-Complete problems NP-Complete problems NP-complete problems (NPC): A subset of NP. If any NP-complete problem can be solved in polynomial time, then every problem in NP has a polynomial time solution. NP-complete languages

More information

Advanced topic: Space complexity

Advanced topic: Space complexity Advanced topic: Space complexity CSCI 3130 Formal Languages and Automata Theory Siu On CHAN Chinese University of Hong Kong Fall 2016 1/28 Review: time complexity We have looked at how long it takes to

More information

Theory of Computer Science to Msc Students, Spring Lecture 2

Theory of Computer Science to Msc Students, Spring Lecture 2 Theory of Computer Science to Msc Students, Spring 2007 Lecture 2 Lecturer: Dorit Aharonov Scribe: Bar Shalem and Amitai Gilad Revised: Shahar Dobzinski, March 2007 1 BPP and NP The theory of computer

More information

(C) The rationals and the reals as linearly ordered sets. Contents. 1 The characterizing results

(C) The rationals and the reals as linearly ordered sets. Contents. 1 The characterizing results (C) The rationals and the reals as linearly ordered sets We know that both Q and R are something special. When we think about about either o these we usually view it as a ield, or at least some kind o

More information

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

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

More information

6.5.3 An NP-complete domino game

6.5.3 An NP-complete domino game 26 Chapter 6. Complexity Theory 3SAT NP. We know from Theorem 6.5.7 that this is true. A P 3SAT, for every language A NP. Hence, we have to show this for languages A such as kcolor, HC, SOS, NPrim, KS,

More information

Numerical Methods - Lecture 2. Numerical Methods. Lecture 2. Analysis of errors in numerical methods

Numerical Methods - Lecture 2. Numerical Methods. Lecture 2. Analysis of errors in numerical methods Numerical Methods - Lecture 1 Numerical Methods Lecture. Analysis o errors in numerical methods Numerical Methods - Lecture Why represent numbers in loating point ormat? Eample 1. How a number 56.78 can

More information

Basic mathematics of economic models. 3. Maximization

Basic mathematics of economic models. 3. Maximization John Riley 1 January 16 Basic mathematics o economic models 3 Maimization 31 Single variable maimization 1 3 Multi variable maimization 6 33 Concave unctions 9 34 Maimization with non-negativity constraints

More information

Theory of Computation. Ch.8 Space Complexity. wherein all branches of its computation halt on all

Theory of Computation. Ch.8 Space Complexity. wherein all branches of its computation halt on all Definition 8.1 Let M be a deterministic Turing machine, DTM, that halts on all inputs. The space complexity of M is the function f : N N, where f(n) is the maximum number of tape cells that M scans on

More information

1 PSPACE-Completeness

1 PSPACE-Completeness CS 6743 Lecture 14 1 Fall 2007 1 PSPACE-Completeness Recall the NP-complete problem SAT: Is a given Boolean formula φ(x 1,..., x n ) satisfiable? The same question can be stated equivalently as: Is the

More information

Web Appendix for The Value of Switching Costs

Web Appendix for The Value of Switching Costs Web Appendix or The Value o Switching Costs Gary Biglaiser University o North Carolina, Chapel Hill Jacques Crémer Toulouse School o Economics (GREMAQ, CNRS and IDEI) Gergely Dobos Gazdasági Versenyhivatal

More information

Q = Set of states, IE661: Scheduling Theory (Fall 2003) Primer to Complexity Theory Satyaki Ghosh Dastidar

Q = Set of states, IE661: Scheduling Theory (Fall 2003) Primer to Complexity Theory Satyaki Ghosh Dastidar IE661: Scheduling Theory (Fall 2003) Primer to Complexity Theory Satyaki Ghosh Dastidar Turing Machine A Turing machine is an abstract representation of a computing device. It consists of a read/write

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

Stanford University CS254: Computational Complexity Handout 8 Luca Trevisan 4/21/2010

Stanford University CS254: Computational Complexity Handout 8 Luca Trevisan 4/21/2010 Stanford University CS254: Computational Complexity Handout 8 Luca Trevisan 4/2/200 Counting Problems Today we describe counting problems and the class #P that they define, and we show that every counting

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

CS154, Lecture 13: P vs NP

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

More information

CSCI3390-Lecture 14: The class NP

CSCI3390-Lecture 14: The class NP CSCI3390-Lecture 14: The class NP 1 Problems and Witnesses All of the decision problems described below have the form: Is there a solution to X? where X is the given problem instance. If the instance is

More information

CS 320, Fall Dr. Geri Georg, Instructor 320 NP 1

CS 320, Fall Dr. Geri Georg, Instructor 320 NP 1 NP CS 320, Fall 2017 Dr. Geri Georg, Instructor georg@colostate.edu 320 NP 1 NP Complete A class of problems where: No polynomial time algorithm has been discovered No proof that one doesn t exist 320

More information

Time Complexity (1) CSCI Spring Original Slides were written by Dr. Frederick W Maier. CSCI 2670 Time Complexity (1)

Time Complexity (1) CSCI Spring Original Slides were written by Dr. Frederick W Maier. CSCI 2670 Time Complexity (1) Time Complexity (1) CSCI 2670 Original Slides were written by Dr. Frederick W Maier Spring 2014 Time Complexity So far we ve dealt with determining whether or not a problem is decidable. But even if it

More information

ITCS:CCT09 : Computational Complexity Theory Apr 8, Lecture 7

ITCS:CCT09 : Computational Complexity Theory Apr 8, Lecture 7 ITCS:CCT09 : Computational Complexity Theory Apr 8, 2009 Lecturer: Jayalal Sarma M.N. Lecture 7 Scribe: Shiteng Chen In this lecture, we will discuss one of the basic concepts in complexity theory; namely

More information

NP and Computational Intractability

NP and Computational Intractability NP and Computational Intractability 1 Review Basic reduction strategies. Simple equivalence: INDEPENDENT-SET P VERTEX-COVER. Special case to general case: VERTEX-COVER P SET-COVER. Encoding with gadgets:

More information

CSCE 551 Final Exam, Spring 2004 Answer Key

CSCE 551 Final Exam, Spring 2004 Answer Key CSCE 551 Final Exam, Spring 2004 Answer Key 1. (10 points) Using any method you like (including intuition), give the unique minimal DFA equivalent to the following NFA: 0 1 2 0 5 1 3 4 If your answer is

More information

Micro-canonical ensemble model of particles obeying Bose-Einstein and Fermi-Dirac statistics

Micro-canonical ensemble model of particles obeying Bose-Einstein and Fermi-Dirac statistics Indian Journal o Pure & Applied Physics Vol. 4, October 004, pp. 749-757 Micro-canonical ensemble model o particles obeying Bose-Einstein and Fermi-Dirac statistics Y K Ayodo, K M Khanna & T W Sakwa Department

More information

MTAT Complexity Theory October 13th-14th, Lecture 6

MTAT Complexity Theory October 13th-14th, Lecture 6 MTAT.07.004 Complexity Theory October 13th-14th, 2011 Lecturer: Peeter Laud Lecture 6 Scribe(s): Riivo Talviste 1 Logarithmic memory Turing machines working in logarithmic space become interesting when

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

Lecture 2. 1 More N P-Compete Languages. Notes on Complexity Theory: Fall 2005 Last updated: September, Jonathan Katz

Lecture 2. 1 More N P-Compete Languages. Notes on Complexity Theory: Fall 2005 Last updated: September, Jonathan Katz Notes on Complexity Theory: Fall 2005 Last updated: September, 2005 Jonathan Katz Lecture 2 1 More N P-Compete Languages It will be nice to find more natural N P-complete languages. To that end, we ine

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

Lecture 24: Approximate Counting

Lecture 24: Approximate Counting CS 710: Complexity Theory 12/1/2011 Lecture 24: Approximate Counting Instructor: Dieter van Melkebeek Scribe: David Guild and Gautam Prakriya Last time we introduced counting problems and defined the class

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

Boolean circuits. Lecture Definitions

Boolean circuits. Lecture Definitions Lecture 20 Boolean circuits In this lecture we will discuss the Boolean circuit model of computation and its connection to the Turing machine model. Although the Boolean circuit model is fundamentally

More information

Chapter 2 : Time complexity

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

More information

2. ETA EVALUATIONS USING WEBER FUNCTIONS. Introduction

2. ETA EVALUATIONS USING WEBER FUNCTIONS. Introduction . ETA EVALUATIONS USING WEBER FUNCTIONS Introduction So ar we have seen some o the methods or providing eta evaluations that appear in the literature and we have seen some o the interesting properties

More information