An Infinite Automaton Characterization of Double Exponential Time
An Infinite Automaton Characterization of Double Exponential Time Gennaro Parlato University of Illinois at Urbana-Champaign Università degli Studi di Salerno Salvatore La Torre (U. Salerno) P. Madhusudan (U. Illinois U-C) 1/25
Infinite automata o Input alphabet o Fix an alphabet States – all words * o Initial and final states are defined by two regular languages INIT, FINAL o transitions defined using rewriting: for each a , there is a transducer Ta transforming words to words u a u’ iff Ta transforms u to u’ 2/25
Example: Infinite automaton for { anbncn | n>0} a $ a a xx x o o o c y c b b yxx b yyx b xxx b yy c yyy Ta defines { (xn, xn+1) / n > 0} {($, x)} Tb defines { (ym xn, ym+1 xn-1) / n > 0, m 0} Tc defines { (ym xn, ym+1 xn-1) / n > 0, m 0} 3/25
Infinite automata using regular trasducers o Transitions defined using regular trasducers n A regular trasducer reads an input word and writes an output word using finitely many states n A regular trasducer has edges of the form q –a/b q’ where a, b є { } n Eg. {(an, (bc)n)} is a regular relation a/b q 0 /c q 1 4/25
Infinite automata & computational complexity o A remarkable theorem (Morvan-Stirling ’ 01) Theorem Infinite automaton with regular transducers precisely define context-sensitive languages (i. e. NLINSPACE) n Note: no ostensible bounds of time or space are placed on the machine! 5/25
Infinite automata with pushdown transducers o Consider infinite automata with rewriting using pushdown automata o Pushdown transducer transform words to words using a finite-state control and a work-stack o Eg. {(an, bn cn) / n > 0 } can be effected (non regular relation) o Infinite automata with pushdown transducer relations define r. e. languages (undecidable) 6/25
Infinite automata with restricted pushdown transducers o Restricted pushdown transducers: n Each transducer can switch between read the input tape and popping the stack only a bounded number of times n Still powerful o Eg. {(an, bn cn) / n > 0 } can still be effected Theorem Infinite automata with restricted pushdown transducers O(n) define precisely the class 2 ETIME ( in 22 time) o o o Note: Again, no ostensible space or time limits States on a run can run for a very long time A logical characterization of 2 ETIME by restricting the power of rewriting 7/25
Known results o Rational graphs capture Context-Sensitive Languages (Morvan-Stirling, 2001) o Synchronized rational graphs are sufficient to capture CSL’s (Rispal, 2002) o Term-automatic graphs capture ETIME (Meyer, 2007) o Prefix-recognizable graphs capture Context-Free Languages (Caucal, 1996) o Survey on Infinite Automata (Thomas, 2001) 8/25
Outline of the talk o Infinite automata o 2 ETIME Upper Bound o 2 ETIME Lower Bound o Conclusions 9/25
Upper Bound o Two steps: 1. (polynomial time) reduction of membership for infinite automata with restricted pushdown transducers to emptiness for bounded-phase multi-stack pushdown automata (k-MPA) 2. 2 Etime solution of k-MPA emptiness O(poly(k)) n Improvement of the 2|A| 2 [LICS’ 07] solution given in 10/25
Bounded-phase multi-stack pushdown automata [La Torre, P. Madhusudan, Parlato, LICS’ 07] finite control phase-switch push 1 RUN push 2 phase 1 pop 2 o Finite set of states Q o o o An initial state q 0 Q Final states F Q Actions: n internal move n push onto one stack n pop from one stack phase-switch push 1 pop 1 phase 2 push 1 pop 1 phase 3 A phase is a sub-run where only n n A unique stack can be popped all stacks can be pushed onto 11/25
Reduction o We reduce membership of BPTIAs to emptiness of k-MPAs a 1 u 0 a 2 u 1 c 2 Ta 1 Ta 2 u 2 am um-1 um cm Tam Simulating of the Inf. Aut. on w=a 1 a 2 … am with an MPA Guess u 0 є L(INIT) and push it into SIN control states INIT c 1 RES c 2 RES cm RES FINAL For every i=1, 2, …, m: 1) simulate Ta reading from SIN and i writing onto S OUT 2) Empty the original stack SIN SOUT original stack 3) Move S OUT into SIN Accept if um є L(FINAL) can be accomplished with O(|w|) phases 12/25
Emptiness for k-MPAs o Reduction to emptiness of tree automata o The key idea is the use of Stack trees 13/25
Stack Trees [LICS’ 07] a e b 1 2 3 4 a a’ a’ b 5 6 7 8 a b’ 10 e b’ 9 11 a’ 12 1 a, a’ – push/pop 1 st st b, b’ – push/pop 2 nd st e – internal (e, 1) (b, 1) 2 3 11 Nested edges become local Linear edges lost!! (a, 1) 4 (a’, 1) (a, 1) (b, 1) 7 (a, 1) (b’, 2) 5 (a’, 1) 6 (b’, 2) 8 (a’, 3) 12 9 10 (e, 2) 14/25
Emptiness for k-MPAs o Reduction to emptiness of tree automata o The key idea is the use of stack-trees o Two main parts: n the set of stack-trees is regular o linear order (Tree Aut. of size 2 O(k)) n Simulation of a k-MPA on the stack-trees o Successor (Tree Walking Aut. of size 2 O(k)) 15/25
linear order (x<y) a) x and y in diff phases -- easy: phase(x) < phase(y) c) x and y of the same phase but in diff subtrees: -- hard: x<y px > py b) x and y of same phase and same tree –- easy where px =Parent. Root(x) x precedes y in the prefix traversal of the tree py= Parent. Root (y) Intuition for case c) … py … px push … root(x) … x … root(y) … y pop px x > py < y 16/25
Tree automata for the linear order a) x and y in diff phases -- easy: phase(x) < phase(y) b) x and y of same phase c) x and y of the same phase but in diff subtrees: -- hard: x<y px > py and same tree –- easy where px =Parent. Root(x) x precedes y in the prefix traversal of the tree py= Parent. Root (y) Tree automaton for c) Simulate the TA for a) or b) to Inductive definition check zx, zy n zx zy Base case : a) and b) n Check if z reach x and zy Inductive step : x c) State space px x … o 2 O(k) … reaches y with the same phase sequence (guessed in the root) py y ≤ #phases 17/25
Successor a) if x and y in diff phases --easy c) End. Phase(x) and x and y of the same phase but in diff subtrees: --hard y=Next. Phase(x) z Parent. Root(x); z’ Predecessor(z) while phase. T(Right. Child(z’)) ≠ phase. T(x) z’ Predecessor(z); y = Right. Child(z’); } b) If x and y of same phase and same tree –- easy x is the predecessor of y in the prefix traversal of the tree Motivation for case c) … py push … px push … rootx pop x y pop 18/25
Tree walking automaton for Successor o o o Look at Successor and Predecessor as a recursive program P At most k (=#phases) alive calls at any time Since k is fixed, P can be executed with finite memory O(k) The tree walking automata simulates P in its control Size of the tree walking automata = 2 O(k) Procedure Successor(x) if End. Phase(x) then return Next. Phase(phase T(x)); elseif (y Prefix. Succ(x) exists) then return(y); else { z Parent. Root(x); z’ Predecessor(z) while phase. T(Right. Child(z’)) ≠ phase. T(x) z’ Predecessor(z); return Right. Child(z’); } Procedure Predecessor(x) if Begin. Phase(x) then return Prev. Phase(phase. T(x)); elseif (y Prefix. Pred(x) exists) then return(y); else { z Parent. Root(x); z’ Successor(z) while phase. T(Right. Child(z’)) ≠ phase. T(x) z’ Successor(z); return Right. Child(z’); } 19/25
Outline of the talk o Infinite automata o 2 ETIME Upper Bound o 2 ETIME Lower Bound o Conclusions 20/25
Lower bound (reduction) o Reduction from n the membership problem for alternating machines working in 2 O(w) space to n the membership problem for BPTAs Guess a TM run on w a 1 Extract all the consecutive confs from the TM run a 2 … am Check all consecutive confs are correct 22/25
Checking the moves The sequence of moves: #u 1#v 1 #u 2#v 2. . . #um#vm o Checking if ui vi is similar to checking if c = c’ o In each step transform every #ui#vi into two pairs of half size. Repeat until we get only pairs of length 1. (O(|w|) steps) #u 1#v 1 #u 2#v 2. . . #um#vm o For j=1, …, |w| n For i=1, …, m o #even(vm) #even(um). . . #even(v 2) #even(u 2) #even(v 1) #even(u 1) #odd(vm) #odd(um). . . #odd(v 2) #odd(u 2) #odd(v 1) #odd(u 1) o n o Push all even symbols of ui/vi onto the stack Write all odd symbols of ui/vi on the output tape Copy the stack content on the output tape Check symbol equality phases required output tape log 2|w| = |w| 23/25
Outline of the talk o Infinite automata o 2 ETIME Upper Bound o 2 ETIME Lower Bound o Conclusions 24/25
Conclusions o Characterization of 2 ETIME with infinite automata o Alternate characterizations of complexity classes using rewriting theory o Rewriting is classic (Thue, Post) but never applied to complexity theory o Exact computational complexity of the emptiness problem for bounded-phase multi-stack pushdown automata 25/25
Conclusions o Can we show alternate proofs of classic results using infinite automata? n Eg. NL=co-NL NLINSPACE= co-NLINSPACE … o Can we capture P or NP? o Expressive power of deterministic infinite automata 26/25
- Slides: 25