Lower Bounds on the Time-complexity of Non-regular Languages on One-tape Turing Machine Miaohua Xu For Theory of Computation II Professor: Geoffrey S.

Slides:



Advertisements
Similar presentations
Algorithms Sipser 3.3 (pages ). CS 311 Fall Computability Hilbert's Tenth Problem: Find a process according to which it can be determined.
Advertisements

Measuring Time Complexity
Turing Machines Memory = an infinitely long tape Persistent storage A read/write tape head that can move around the tape Initially, the tape contains only.
Introduction to Computability Theory
FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY
Variants of Turing machines
1 Nondeterministic Space is Closed Under Complement Presented by Jing Zhang and Yingbo Wang Theory of Computation II Professor: Geoffrey Smith.
THE CHURCH-TURING T H E S I S “ TURING MACHINES” Pages COMPUTABILITY THEORY.
CS21 Decidability and Tractability
1 Introduction to Computability Theory Lecture12: Decidable Languages Prof. Amos Israeli.
Measuring Time Complexity Sipser 7.1 (pages )
P and NP Sipser (pages ). CS 311 Fall Polynomial time P = ∪ k TIME(n k ) … P = ∪ k TIME(n k ) … TIME(n 3 ) TIME(n 2 ) TIME(n)
Algorithms Sipser 3.3 (pages ). CS 311 Mount Holyoke College 2 Computability Hilbert's Tenth Problem: Find “a process according to which it can.
Reducibility Sipser 5.1 (pages ). CS 311 Fall Reducibility.
P, NP, PS, and NPS By Muhannad Harrim. Class P P is the complexity class containing decision problems which can be solved by a Deterministic Turing machine.
Complexity ©D.Moshkovitz 1 Turing Machines. Complexity ©D.Moshkovitz 2 Motivation Our main goal in this course is to analyze problems and categorize them.
FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY Read sections 7.1 – 7.3 of the book for next time.
Decidability. Why study un-solvability? When a problem is algorithmically unsolvable, we realize that the problem must be simplified or altered before.
Programming the TM qa  (,q) (,q) q1q1 0q1q1 R q1q1 1q1q1 R q1q1  h  Qa  (,q) (,q) q1q1 0q2q2  q1q1 1q3q3  q1q1  h  q2q2 0q4q4 R q2q2 1q4q4.
1 Decidability continued. 2 Undecidable Problems Halting Problem: Does machine halt on input ? State-entry Problem: Does machine enter state halt on input.
February 4, 2015CS21 Lecture 131 CS21 Decidability and Tractability Lecture 13 February 4, 2015.
Prof. Busch - LSU1 Turing Machines. Prof. Busch - LSU2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
CS 310 – Fall 2006 Pacific University CS310 Complexity Section 7.1 November 27, 2006.
1 Reducibility. 2 Problem is reduced to problem If we can solve problem then we can solve problem.
CS 461 – Nov. 21 Sections 7.1 – 7.2 Measuring complexity Dividing decidable languages into complexity classes. Algorithm complexity depends on what kind.
Complexity and Computability Theory I Lecture #13 Instructor: Rina Zviel-Girshin Lea Epstein Yael Moses.
 Computability Theory Turing Machines Professor MSc. Ivan A. Escobar
TM Design Universal TM MA/CSSE 474 Theory of Computation.
Pushdown Automata (PDAs)
MA/CSSE 474 Theory of Computation More Reduction Examples Non-SD Reductions.
Introduction to CS Theory Lecture 15 –Turing Machines Piotr Faliszewski
Turing Machines Chapter 17. Languages and Machines SD D Context-Free Languages Regular Languages reg exps FSMs cfgs PDAs unrestricted grammars Turing.
Measuring complexity Section 7.1 Giorgi Japaridze Theory of Computability.
1Computer Sciences Department. Book: INTRODUCTION TO THE THEORY OF COMPUTATION, SECOND EDITION, by: MICHAEL SIPSER Reference 3Computer Sciences Department.
CS 208: Computing Theory Assoc. Prof. Dr. Brahim Hnich Faculty of Computer Sciences Izmir University of Economics.
 2005 SDU Lecture13 Reducibility — A methodology for proving un- decidability.
1Computer Sciences Department. Book: INTRODUCTION TO THE THEORY OF COMPUTATION, SECOND EDITION, by: MICHAEL SIPSER Reference 3Computer Sciences Department.
CSC 3130: Automata theory and formal languages Andrej Bogdanov The Chinese University of Hong Kong Turing Machines.
CS 208: Computing Theory Assoc. Prof. Dr. Brahim Hnich
CSCI 2670 Introduction to Theory of Computing October 13, 2005.
Overview of the theory of computation Episode 3 0 Turing machines The traditional concepts of computability, decidability and recursive enumerability.
Donghyun (David) Kim Department of Mathematics and Computer Science North Carolina Central University 1 Chapter 4 Decidability Some slides are in courtesy.
Automata & Formal Languages, Feodor F. Dragan, Kent State University 1 CHAPTER 3 The Church-Turing Thesis Contents Turing Machines definitions, examples,
Turing Machines CS 130 Theory of Computation HMU Textbook: Chap 8.
1 Turing Machines. 2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
FORMAL LANGUAGES, AUTOMATA, AND COMPUTABILITY * Read chapter 4 of the book for next time * Lecture9x.ppt.
Theory of Computation Automata Theory Dr. Ayman Srour.
Theory of Computational Complexity TA : Junichi Teruyama Iwama lab. D3
CS6800 Advance Theory of Computation Spring 2016 Nasser Alsaedi
CSCI 2670 Introduction to Theory of Computing November 15, 2005.
 2005 SDU Lecture14 Mapping Reducibility, Complexity.
Recursively Enumerable Languages
CSCI 2670 Introduction to Theory of Computing
Time complexity Here we will consider elements of computational complexity theory – an investigation of the time (or other resources) required for solving.
COSC 3340: Introduction to Theory of Computation
Busch Complexity Lectures: Turing Machines
Busch Complexity Lectures: Reductions
CSCI 2670 Introduction to Theory of Computing
Reductions Costas Busch - LSU.
CSE 105 theory of computation
Turing Machines Acceptors; Enumerators
Intro to Theory of Computation
Decidable Languages Costas Busch - LSU.
CS154, Lecture 12: Time Complexity
CSC 4170 Theory of Computation Time complexity Section 7.1.
CSE 105 theory of computation
Instructor: Aaron Roth
Variants of Turing machines
CSC 4170 Theory of Computation Time complexity Section 7.1.
CSE 105 theory of computation
Presentation transcript:

Lower Bounds on the Time-complexity of Non-regular Languages on One-tape Turing Machine Miaohua Xu For Theory of Computation II Professor: Geoffrey S. Smith Florida International University

Single-tape Turing Machine On each operation the machine Writes a new symbol on the tape square under the head. Enters into a new state (not necessarily different than previous state). Moves the reading head either left or right by one tape square. q1q1

Single-tape Turing Machine On each operation the machine Writes a new symbol on the tape square under the head. Enters into a new state (not necessarily different than previous state). Moves the reading head either left or right by one tape square. q2q2

Motivational Example Consider the language L = { 0 k 1 k | k ≥ 0} Scan across the tape and reject if a 0 is found to the right of a 1. Repeat the following if the both 0’s and 1’s remain. Scan across the tape crossing off a single 0 and a single 1. If either 0 or 1 remains, reject. Else accept.̎ M 1 = ̎ On input string ω : Can We do better? TIME(n 2 )

TIME(n log n) Motivational Example Cont’d. M 2 = ̎ On input string ω : Scan across the tape and reject if a 0 is found to the right of a 1. Repeat the following if the both 0’s and 1’s remain. Scan across the tape, checking whether the total number of 0’s and 1’s remaining on the tape is even or odd. If odd, reject. Scan again across tape, crossing off every other 0 and ever other 1. If either 0 or 1 remains, reject. Else accept.̎ Can We do better?

We Can Not Do Any (great) Better Introduction of crossing sequence. Illustration of some properties of crossing sequences. Proving that lengths of crossing sequences must be bounded (Hartmanis68). Proving that bounded length crossing sequences  language must be regular (Hennie65). Theorem: If language A TIME(f(n)), where f(n) belongs to o (n log n), then A is regular. Outline of the proof

Crossing Sequence X Y q1q1 q3q3 q7q7 C (w s X : Yw t ) = (q 1, q 2, …, q 7 ) wsws wtwt Crossing sequence on the boundary between X and Y is the ordered sequence of states s(1), s(2), …, s(n); where s(i) is the state in which machine is in i th crossing of the boundary.

Properties of Crossing Sequences ω1ω1 ω2ω2 ω3ω3 C (ω 1 : ω 2 ω 3 ) = C (ω 1 ω 2 : ω 3 ) Machine head will be in ω 2 portion iff it has crossed (ω 1 : ω 2 ) boundary an odd number of times and (ω 2 : ω 3 ) boundary even number of times. Running time = sum of the lengths of all crossing sequences. if Machine can not halt in ω 2 portion. It will accept (reject) ω 1 ω 2 ω 3 iff it accepts (rejects) ω 1 ω 3.

ω1ω1 ω2ω2 ω3ω3 q1q1 q1q1 q2q2 q2q2 ω1ω1 ω3ω3 q1q1 q2q2 If C (ω 1 : ω 2 ω 3 ) = C (ω 1 ω 2 : ω 3 )

Proof outline again Introduction of crossing sequence. Illustration of some properties of crossing sequences. Proving that lengths of crossing sequences must be bounded if f(n) belongs to o(n log n) Proving that bounded length crossing sequences  language must be regular

Hartmanis68 Definition: R(n) = maximum length of a crossing sequence on an input of size n. Theorem: If the sequence R(n) is not bounded by a constant then running time T(n) = Ω(n log n). Proof: Assume R(n) is not bounded by a constant R(n) n There will exist 0 < n 1 < n 2 < … such that R(n i ) > R(n), for n i > n s i is the string of length n i for which R(n i )-long crossing sequences are generated

Hartmanis68 Cont’d. Proposition: On s i no crossing sequence can be generated more than twice. Let s i = ω 1 ω 2 ω 3 ω 4, ω 1, ω 2, ω 3, ω 4 ≠ ø C (ω 1 : ω 2 ω 3 ω 4 ) = C (ω 1 ω 2 : ω 3 ω 4 ) = C (ω 1 ω 2 ω 3 : ω 4 ) Proof: M will generate a crossing sequence of length R(n i ) either on s′ = ω 1 ω 2 ω 4 or on s′′ = ω 1 ω 3 ω 4. Both strings s′ and s′′ have length < n i, which leads to the contradiction.

ω1ω1 ω2ω2 ω3ω3 If C (ω 1 : ω 2 ω 3 ω 4 ) = C (ω 1 ω 2 : ω 3 ω 4 )= C (ω 1 : ω 2 ω 3 : ω 4 ) ω4ω4 ω1ω1 ω2ω2 ω3ω3 ω4ω4 ω1ω1 ω3ω3 ω4ω4 ω1ω1 ω2ω2 ω4ω4

Hartmanis68 cont’d. Number of crossing sequences on s i ≥ n i (as there are at least n i number of boundaries). no crossing sequence can be generated more than twice. 2Q R(n ) + 1 ≥ n i i R(n i ) ≥ log n i – 2 (the base of logarithm is Q) Number of crossing sequences of length at most r = Σ Q i ≤ Q r + 1 (Q is the number of states) i = 0 i = r Number of crossing sequences of length at most r = Σ Q i ≤ Q r + 1 (Q is the number of states) i = 0 i = r If R(n) = o ( log n) then R(n) must be bounded by a constant

1. T(n i ) = sum of the lengths of all crossing sequences. 2. If R(n i ) is not bound, then 3. no crossing sequence can be generated more than twice If T(n) = o (n log n) then R(n) must be bounded by a constant ??? R(n i ) ≥ log n i - 2 Length of crossing sequence Number of crossing sequences of the length 02 12*|Q| 22*|Q| 2 32*|Q| 3 ……… N-12*|Q| N-1 N2*|Q| N

Hartmanis68 cont’d. T(n) = Ω (n log n) If T(n) = o (n log n) then R(n) must be bounded by a constant

Complete Proof If T(n) is o(n log n) then lengths of all crossing sequences will be bounded by a constant. Done! bounded length crossing sequences  language must be regular If lengths of all crossing sequences is ≤ k (for some constant k), the language can be represented as a union of a number of classes of a finite right- invariance relation. Any language which can be represented as a union of a number of classes of a finite right-invariance relation, must be regular. (Myhill-Nerode Theorem): A language L is regular iff it can be represented as the union of a number of classes of a finite, right–invariant equivalence relation ≡ L.

Right-invariant Definition: The equivalence relation ≡ L is right-invariant iff x ≡ L y and x L  y L (Myhill-Nerode Theorem): A language L is regular iff it can be represented as the union of a number of classes of a finite, right –invariant equivalence relation ≡ L. x ≡ L y  for all z, x.z ≡ L y.z

A language can be represented as the union of a number of classes of a finite, right – invariant equivalence relation  it’s regular

Hennie65: Intuitive Idea Defining the relation ≡ L in terms of crossing sequence. If we know all possible crossing sequences at a boundary then just by knowing the part of string on the right of boundary we can simulate the TM. x ≡ L y if and only the set of crossing sequences which can appear on their right-hand end is same. Determining whether a given crossing sequence can appear at the right of a given left-end tape segment can not be done by considering all tapes that contain the given left-end segment.

Hennie’s Experiment For a given finite left-end tape segment t and finite crossing sequence C = S(1), S(2), …, S(k) do the following experiment. Begin the experiment by placing machine in the start state and causing it to scan leftmost square of t. When machine leaves the right-end of t for i th time (i < k) and is in state S(i), put it in state S(i + 1) and send it back to the rightmost square of t. If the machine halts within t, or gets stuck in some periodic behavior within t, or leaves t in such a way that previous step can not be applied, stop the experiment. If at the end the crossing sequence generated at right end of t is same as C, the segment t is said to support the crossing sequence C. Transient, accepting, non accepting crossing sequences for t.

Hennie65 Number of all crossing sequences of length at most k is finite (≤ Q k + 1 ). Number of subsets of these crossing sequences will also be finite. Every finite left-end tape can be classified according to the crossing sequences of length k or less that it supports at its right end, and according to which of these sequences are transient, which are accepting and which are non accepting. Define the relation ≡ M by x ≡ M y if all the four sets of crossing sequences are same for x and y.

Hennie65 Cont’d. The relation ≡ M is an equivalence relation. Finiteness: Since the number of 4-tuples (supported crossing sequences x transient CS x accepting CS x non accepting CS) is finite, the relation ≡ M will have finite number of equivalence classes. Right-invariance: Let t 1 and t 2 are two finite left-end segments, belonging to the same class. Now consider t 1 t x and t 2 t x, where t x is finite. Since t 1 can be replaced by t 2 without changing the crossing sequences in t x portion, t 1 t x and t 2 t x will have same set of supported, transient, accepting and non accepting crossing sequences (i.e., t 1 t x ≡ M t 2 t x ). t2t2 txtx txtx t1t1 C C C’

More Result LanguagesLower boundsUpper bounds Regular LanguagesO(n) Nonregular CFLsO(nlogn)n 5 -recognizable Particular Nonregular CFLs {0 k 1 k |k>0}O(nlogn) {w|w is palindrome}O(n 2 ) There is no algorithm to decide whether a nonregular context-free language generated by grammar G can be recognized in time T(n)=nlogn

References Hennie, F.C. One-tape, offline Turing machine computations, Inf. Contr. 8 (1965), Hartmanis, J. Computational complexity of one-tape Turing machine computations, JACM, Volume 2, Issue 15 (1968), Aho, Motwani, Ullman Introduction to automata and language theory. Ajay Kr. Verma, Amin Shokrollahi Lower Bounds on the Time-complexity of Non-regular Languages on Single- tape Turing Machine (slides) www-cad.eecs.berkeley.edu/~tah/172/7.pdf -- Lectue 7: Myhill-Nerode Theorem

Questions? Thank you!