Advanced Topics in Algorithms and Data Structures Lecture 8.2 page 1 Some tools Our circuit C will consist of T ( n ) levels. For each time step of the.

Slides:



Advertisements
Similar presentations
Recognising Languages We will tackle the problem of defining languages by considering how we could recognise them. Problem: Is there a method of recognising.
Advertisements

Multi-tape Turing Machines: Informal Description
Part VI NP-Hardness. Lecture 23 Whats NP? Hard Problems.
Introduction to Computability Theory
Lecture 24 MAS 714 Hartmut Klauck
THE CHURCH-TURING T H E S I S “ TURING MACHINES” Pages COMPUTABILITY THEORY.
Cook’s Theorem The Foundation of NP-Completeness.
CSCI 4325 / 6339 Theory of Computation Zhixiang Chen.
Lecture 21 Nondeterministic Polynomial time, and the class NP FIT2014 Theory of Computation Monash University Faculty of Information Technology Slides.
Advanced Topics in Algorithms and Data Structures Lecture 7.1, page 1 An overview of lecture 7 An optimal parallel algorithm for the 2D convex hull problem,
Complexity 12-1 Complexity Andrei Bulatov Non-Deterministic Space.
Complexity 15-1 Complexity Andrei Bulatov Hierarchy Theorem.
Complexity 11-1 Complexity Andrei Bulatov Space Complexity.
Advanced Topics in Algorithms and Data Structures Lecture 6.1 – pg 1 An overview of lecture 6 A parallel search algorithm A parallel merging algorithm.
Advanced Topics in Algorithms and Data Structures Page 1 Parallel merging through partitioning The partitioning strategy consists of: Breaking up the given.
Complexity 13-1 Complexity Andrei Bulatov Hierarchy Theorem.
1 L is in NP means: There is a language L’ in P and a polynomial p so that L 1 · L 2 means: For some polynomial time computable map r : 8 x: x 2 L 1 iff.
Computability and Complexity 14-1 Computability and Complexity Andrei Bulatov Cook’s Theorem.
Advanced Topics in Algorithms and Data Structures
1 Introduction to Computability Theory Lecture11: Variants of Turing Machines Prof. Amos Israeli.
Courtesy Costas Busch - RPI1 A Universal Turing Machine.
ECE 331 – Digital System Design
CPSC 411, Fall 2008: Set 12 1 CPSC 411 Design and Analysis of Algorithms Set 12: Undecidability Prof. Jennifer Welch Fall 2008.
Tractable and intractable problems for parallel computers
1 Linear Bounded Automata LBAs. 2 Linear Bounded Automata are like Turing Machines with a restriction: The working space of the tape is the space of the.
1 dKS, Spring Some practical information Lecturers: Kristoffer Arnsfelt Hansen and Peter Bro Miltersen. Homepage:
Computability and Complexity 32-1 Computability and Complexity Andrei Bulatov Boolean Circuits.
CHAPTER 4 Decidability Contents Decidable Languages
Computability and Complexity 20-1 Computability and Complexity Andrei Bulatov Class NL.
Quantum Automata Formalism. These are general questions related to complexity of quantum algorithms, combinational and sequential.
Aho-Corasick String Matching An Efficient String Matching.
Fall 2004COMP 3351 A Universal Turing Machine. Fall 2004COMP 3352 Turing Machines are “hardwired” they execute only one program A limitation of Turing.
1 Introduction to Computability Theory Lecture11: The Halting Problem Prof. Amos Israeli.
Theory of Computing Lecture 19 MAS 714 Hartmut Klauck.
Section 11.4 Language Classes Based On Randomization
1 L is in NP means: There is a language L’ in P and a polynomial p so that L 1 ≤ L 2 means: For some polynomial time computable map r : x: x L 1 iff r(x)
Complexity 2-1 Problems and Languages Complexity Andrei Bulatov.
Theory of Computing Lecture 15 MAS 714 Hartmut Klauck.
Computational Complexity Theory Lecture 2: Reductions, NP-completeness, Cook-Levin theorem Indian Institute of Science.
Theory of Computing Lecture 17 MAS 714 Hartmut Klauck.
1 1 CDT314 FABER Formal Languages, Automata and Models of Computation Lecture 15-1 Mälardalen University 2012.
Complexity 25-1 Complexity Andrei Bulatov Counting Problems.
A Universal Turing Machine
1 P P := the class of decision problems (languages) decided by a Turing machine so that for some polynomial p and all x, the machine terminates after at.
1Computer Sciences Department. Book: INTRODUCTION TO THE THEORY OF COMPUTATION, SECOND EDITION, by: MICHAEL SIPSER Reference 3Computer Sciences Department.
1 Linear Bounded Automata LBAs. 2 Linear Bounded Automata (LBAs) are the same as Turing Machines with one difference: The input string tape space is the.
 2005 SDU Lecture13 Reducibility — A methodology for proving un- decidability.
CSE 589 Part V One of the symptoms of an approaching nervous breakdown is the belief that one’s work is terribly important. Bertrand Russell.
Strings Basic data type in computational biology A string is an ordered succession of characters or symbols from a finite set called an alphabet Sequence.
Fundamentals of Informatics Lecture 13 Reduction Bas Luttik.
Computability and Complexity 2-1 Problems and Languages Computability and Complexity Andrei Bulatov.
1 Turing Machines and Equivalent Models Section 13.1 Turing Machines.
Fall 2013 CMU CS Computational Complexity Lecture 2 Diagonalization, 9/12/2013.
CSCI 2670 Introduction to Theory of Computing December 2, 2004.
1 Finite Model Theory Lecture 5 Turing Machines and Finite Models.
Theory of Computational Complexity Yuji Ishikawa Avis lab. M1.
1 SAT SAT: Given a Boolean function in CNF representation, is there a way to assign truth values to the variables so that the function evaluates to true?
1 Design and Analysis of Algorithms Yoram Moses Lecture 13 June 17, 2010
1 A Universal Turing Machine. 2 Turing Machines are “hardwired” they execute only one program A limitation of Turing Machines: Real Computers are re-programmable.
L is in NP means: There is a language L’ in P and a polynomial p so that L1 ≤ L2 means: For some polynomial time computable map r :  x: x  L1 iff.
Part VI NP-Hardness.
The Definition of Algorithm
Umans Complexity Theory Lectures
Theory of Computation Lecture 22: Turing Machines III
Decidable Languages A language L is decidable if there is a Turing machine ML such that given any word w  0*, then: Input of ML: a  b  … w Output of.
Recall last lecture and Nondeterministic TMs
Instructor: Aaron Roth
Turing Machines Everything is an Integer
Theory of Computation Lecture 23: Turing Machines III
332:437 Lecture 14 Turing Machines and State Machine Sequences
Presentation transcript:

Advanced Topics in Algorithms and Data Structures Lecture 8.2 page 1 Some tools Our circuit C will consist of T ( n ) levels. For each time step of the Turing machine M, one level of our circuit will emulate the behavior of M. Level l will contain the gates computing the Boolean function H ( i, l ), C ( i, j, l ), S ( k, l ) for 1  i  T ( n ). Note that, we don’t know exactly how M recognizes L, but in our circuit C, we capture all possible steps of M at every level.

Advanced Topics in Algorithms and Data Structures Lecture 8.2 page 2 Some tools The number of gates at every level is T ( n ). We will first specify H ( i, 0 ), C ( i, j, 0 ), S ( k, 0 ). These are the inputs to our circuit. We will then show how to express H ( i, t + 1), C ( i, j, t + 1), S ( k, t + 1) in terms of H ( *, t ), C ( *, *, t ), S ( *, t ). This will give us a correct description of the circuit C.

Advanced Topics in Algorithms and Data Structures Lecture 8.2 page 3 Input gates for our circuit For t = 0, the tape head is scanning cell 1, the input bits are stored in cell 1 to n and M is in state q 1. H ( i, 0 ) = 1 if i = 1, 0 otherwise. Since, the head is scanning cell 1. C ( i, j, 0 ) = 1 if cell i contains initially a j. S ( k, 0 ) = 1, if k = 1, 0 otherwise.

Advanced Topics in Algorithms and Data Structures Lecture 8.2 page 4 Gates at a general level Let us consider constructing H ( i, t +1) when we know H ( *, t ), C ( *, *, t ), S ( *, t ). H ( i, t +1) = 1 if and only if the head scans cell i at time t +1. Since the Turing machine M moves its head only one cell at each time step, It must be either on cell i - 1 or on cell i + 1 at time t. Let us consider the case when the head is at cell i - 1 at time t

Advanced Topics in Algorithms and Data Structures Lecture 8.2 page 5 Gates at a general level H ( i, t +1) = 1 if and only if the head moves right and goes to cell i at time t +1. Suppose the content of cell i - 1 is a j and the Turing machine M is in state q k. Hence, to move the head to cell i, our transition function  should be such that:  ( q k, a j ) = ( , , R ). That is, if the current state is q k and cell i - 1 contains character a j, the head moves right.

Advanced Topics in Algorithms and Data Structures Lecture 8.2 page 6 Gates at a general level Suppose, I R is the set of all pairs {( k, j ) :  ( q k, a j ) = ( , , R )}. We do not know the exact movement of the head of M when M recognizes L. So, we have to take into account all possible state transitions that may result in the head moving to cell i at time t + 1. Consider a pair ( k, j )  I R.

Advanced Topics in Algorithms and Data Structures Lecture 8.2 page 7 Gates at a general level For the pair ( k, j )  I R, the action of the Turing machine M can be written as: C ( i - 1, j, t )  S ( k, t ) Hence, if –the head of M is at cell i – 1 –cell i – 1 contains the character a j, and –M is in state q k, The head of M will move to the cell i if and only if: H ( i - 1, t )  ( C ( i - 1, j, t )  S ( k, t )).

Advanced Topics in Algorithms and Data Structures Lecture 8.2 page 8 Gates at a general level But we do not know the state of M or the content of cell i - 1 at time t. Hence, we have to consider all possible states and all possible characters in cell i - 1. We can write this as: This takes into account all possible characters a j in cell i - 1 and all possible states q k of M so that the head moves to cell i.

Advanced Topics in Algorithms and Data Structures Lecture 8.2 page 9 Gates at a general level Similarly, we have to take into account the cases when the head of M is in the cell i +1 at time t and moves to cell i at time t +1. The complete specification is:

Advanced Topics in Algorithms and Data Structures Lecture 8.2 page 10 A view of the circuit A view of the circuit for H(i,t+1) H(i,t+1)H(i+1,t+1)

Advanced Topics in Algorithms and Data Structures Lecture 8.2 page 11 Complexity of creating H(i,t +1) Hence, H ( i, t +1) can be expressed as a sequence of AND and OR gates of length O (| Q ||  |) = sm. If we consider the number of states | Q | = s of M and the size of the alphabet |  | = m as constants. We can compute all the H ( i, t +1)s (remember, 1  i  T ( n )) in O (1) time using ( T ( n )) 2 processors. This is clearly an NC algorithm.

Advanced Topics in Algorithms and Data Structures Lecture 8.2 page 12 C(i,j,t +1) Recall that C ( i, j, t +1) represents the fact that cell i contains a j at time t +1. Hence, C ( i, j, t +1) = 1 if either, –cell i contains a j and the tape head does not scan cell i at time t, or, –the tape head writes a j in cell i at time t +1.

Advanced Topics in Algorithms and Data Structures Lecture 8.2 page 13 C(i,j,t +1) Hence, C ( i, j, t +1) = where, Hence, C ( i, j, t +1) can be expressed as a constant-length sequence of AND and OR gates. All the C ( i, j, t +1) s can be computed in O (1) time using O (( T ( n )) 2 ) processors.

Advanced Topics in Algorithms and Data Structures Lecture 8.2 page 14 A view of the circuit A view of the circuit for C(i,j,t+1) C(i,j,t+1)C(i+1,j,t+1)

Advanced Topics in Algorithms and Data Structures Lecture 8.2 page 15 S(k,t +1) Recall that, S ( k, t +1) = 1 if and only if the state of M is q k at time t +1. Let ( k’, j ) is a pair such that,. In other words, if M is in state q k’, and the current character on the tape is a j, then M goes to state q k. Then,

Advanced Topics in Algorithms and Data Structures Lecture 8.2 page 16 S(k,t +1) Since, 1  i  T ( n ), the function S ( k, t +1) can be expressed by a sequence of AND and OR gates of length T ( n ). Such sequences can be generated in O (1) time using O (( T ( n )) 2 ) processors. This concludes the construction of the CVP that is equivalent to a Turing machine M accepting an arbitrary language L  P.

Advanced Topics in Algorithms and Data Structures Lecture 8.2 page 17 The value of the circuit The value of the circuit will be given by C (1, *, T ( n )). It is clear from the description that the circuit can be constructed by an NC algorithm, since T ( n ) is a polynomial in n. The output of the circuit is 1 if and only if M recognizes L. Since L is an arbitrary language in P, it follows that CVP is P-complete.

Advanced Topics in Algorithms and Data Structures Lecture 8.2 page 18 Implications If L 1 is NC-reducible to L 2 and L 2 is NC-reducible to L 3, then L 1 is NC-reducible to L 3. That is NC-reducibility is transitive. Let L be a P-complete problem. If L  NC, then NC = P.

Advanced Topics in Algorithms and Data Structures Lecture 8.2 page 19 Proving other problems P- complete Let a language L be P-complete. If L is NC- reducible to another language L’  P, then L’ is also P-complete. This is used for proving P-completeness of many other problems. For example if we can reduce the CVP problem to another problem in P, that problem will also be P-complete. We conclude with a list of P-complete problems.

Advanced Topics in Algorithms and Data Structures Lecture 8.2 page 20 Proving other problems P- complete Ordered depth-first search : Given a directed graph G = ( V, E ) specified by adjacency lists and three vertices s, u, v, determine whether vertex u is visited before vertex v in the depth-first traversal of G starting at s.

Advanced Topics in Algorithms and Data Structures Lecture 8.2 page 21 Proving other problems P- complete Maximum flow : Given a network with integer-valued capacities and two distinguished vertices, the source s and the sink t, determine whether the value of the maximum flow is odd.

Advanced Topics in Algorithms and Data Structures Lecture 8.2 page 22 Proving other problems P- complete Linear inequalities : Given an n x m matrix, and an n -dimensional vector b, all entries being integers, determine whether there exists a rational vector x such that Ax  b.