1 / 26

Lower Bounds on the Time-complexity of Non-regular Languages on One-tape Turing Machine

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. q 1. On each operation the machine

lorretta
Télécharger la présentation

Lower Bounds on the Time-complexity of Non-regular Languages on One-tape Turing Machine

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


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

  2. Single-tape Turing Machine q1 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.

  3. Single-tape Turing Machine q2 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.

  4. Motivational Example Consider the language L = { 0k1k | k ≥ 0} M1 = ̎ On input string ω : Can We do better? • 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.̎ TIME(n2)

  5. TIME(n log n) Motivational Example Cont’d. M2 = ̎ 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?

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

  7. Crossing Sequence wt ws Y X q1 q3 q7 C (wsX : Ywt) = (q1, q2, …, q7) 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 ith crossing of the boundary.

  8. Properties of Crossing Sequences ω3 ω1 ω2 • 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. C (ω1 : ω2ω3) = C (ω1ω2: ω3)

  9. If C (ω1 : ω2ω3) = C (ω1ω2: ω3) ω2 ω1 ω3 q1 q1 q2 q2 ω3 ω1 q1 q2

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

  11. 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) There will exist 0 < n1 < n2 < … such that R(ni) > R(n), for ni > n si is the string of length ni for which R(ni)-long crossing sequencesare generated n

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

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

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

  15. If T(n) = o (n log n) then R(n) must be bounded by a constant ??? 1. T(ni) = sum of the lengths of all crossing sequences. 2. If R(ni) is not bound, then 3. no crossing sequence can be generated more than twice R(ni) ≥ log ni - 2

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

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

  18. Right-invariant Definition: The equivalence relation ≡L is right-invariant iff x ≡L y and x L y L x ≡L y  for all z, x.z ≡L y.z (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.

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

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

  21. 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 ith 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.

  22. Hennie65 • Number of all crossing sequences of length at most k is finite (≤ Qk + 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.

  23. 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 t1 and t2 are two finite left-end segments, belonging to the same class. Now consider t1tx and t2tx, where tx is finite. Since t1 can be replaced by t2 without changing the crossing sequences in tx portion, t1tx and t2tx will have same set of supported, transient, accepting and non accepting crossing sequences (i.e., t1tx ≡M t2tx). tx t2 tx t1 C C’ C C’

  24. More Result There is no algorithm to decide whether a nonregular context-free language generated by grammar G can be recognized in time T(n)=nlogn

  25. References • Hennie, F.C. One-tape, offline Turing machine computations, Inf. Contr. 8 (1965), 553-578. • Hartmanis, J. Computational complexity of one-tape Turing machine computations, JACM, Volume 2, Issue 15 (1968), 325-339. • 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

  26. Questions? Thank you!

More Related