25
1/25 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 An Infinite Automaton Characterization of Double Exponential Time Gennaro Parlato University of Illinois at Urbana-Champaign Università degli Studi

Embed Size (px)

Citation preview

1/25

An Infinite Automaton Characterization

of Double Exponential Time

Gennaro Parlato

University of Illinois at Urbana-ChampaignUniversità degli Studi di Salerno

Salvatore La Torre (U. Salerno) P. Madhusudan (U. Illinois U-C)

2/25

Infinite automata

Input alphabet

Fix an alphabet States – all words * Initial and final states are defined by two regular

languages INIT, FINAL

transitions defined using rewriting:

for each a there is a transducer Ta transforming

words to words

u u’ iff Ta transforms u to u’ a

3/25

Example: Infinite automaton for { anbncn | n>0}

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}

$ x

xx

xxx

yxx

yyx

yyy

yx

yyy

aa

a

b

b

b

b

b

b

cc

c

4/25

Infinite automata using regular trasducers

Transitions defined using regular trasducers

A regular trasducer reads an input word and writes an output word using finitely many states

A regular trasducer has edges of the form q –a/b q’ where a,b є {}

Eg. {(an,(bc)n)} is a regular relation

q0 q1

a/b

/c

5/25

Infinite automata & computational complexity

A remarkable theorem (Morvan-Stirling ’01)

Note: no ostensible bounds of time or space are placed on the machine!

Theorem Infinite automaton with regular transducers precisely definecontext-sensitive languages (i.e. NLINSPACE)

6/25

Infinite automata with pushdown transducers

Consider infinite automata with rewriting using pushdown automata

Pushdown transducer transform words to words using a finite-state control and a work-stack

Eg. {(an, bn cn) / n > 0 } can be effected (non regular relation)

Infinite automata with pushdown transducer relations define r.e. languages (undecidable)

7/25

Infinite automata with restricted pushdown transducers

Restricted pushdown transducers: Each transducer can switch between read the input

tape and popping the stack only a bounded number of times

Still powerful Eg. {(an, bn cn) / n > 0 } can still be effected

Theorem Infinite automata with restricted pushdown transducers define precisely the class 2ETIME ( in 22O(n)

time)

Note: Again, no ostensible space or time limits States on a run can run for a very long time A logical characterization of 2ETIME by restricting the power of

rewriting

8/25

Known results

Rational graphs capture Context-Sensitive Languages (Morvan-Stirling, 2001)

Synchronized rational graphs are sufficient to capture CSL’s (Rispal, 2002)

Term-automatic graphs capture ETIME (Meyer, 2007)

Prefix-recognizable graphs capture Context-Free Languages (Caucal, 1996)

Survey on Infinite Automata (Thomas, 2001)

9/25

Outline of the talk

Infinite automata

2ETIME Upper Bound

2ETIME Lower Bound

Conclusions

10/25

Upper Bound

Two steps:

1. (polynomial time) reduction ofmembership for infinite automata with restricted pushdown transducers

to emptiness for bounded-phase multi-stack pushdown

automata (k-MPA)

2. 2Etime solution of k-MPA emptiness Improvement of the 2|A| 2O(poly(k))

solution given in [LICS’07]

11/25

Bounded-phase multi-stack pushdown automata[La Torre, P.Madhusudan, Parlato, LICS’07]

finite control

A phase is a sub-run where only A unique stack can be popped all stacks can be pushed onto

Finite set of states Q

An initial state q0Q Final states F Q Actions:

internal move push onto one stack pop from one stack

phase-switch phase-switch

RUN phase1 phase2 phase3

push2push1 push2 pop1 pop2 push1 pop1 push1 pop1

12/25

Simulating of the Inf. Aut. on w=a1a2 … am with an MPA

We reduce membership of BPTIAs to emptiness of k-MPAs

Reduction

a1u0 u1 umu2

a2um-1

am

c1

c1

Ta1

c2

Ta2

cm

Tam

c2 cmINIT FINALRES RES

original stackSIN SOUT

control states

RES

Guess u0 є L(INIT) and push it into SIN

For every i=1,2, …, m:

1) simulate Tai reading from SIN and

writing onto SOUT

2) Empty the original stack

3) Move SOUT into SIN

Accept if um є L(FINAL)can be accomplished with O(|w|) phases

13/25

Emptiness for k-MPAs

Reduction to emptiness of tree automata

The key idea is the use of Stack trees

14/25

a e b a a’ a’ b a b’ e b’ a’

a, a’ – push/pop 1st stb, b’ – push/pop 2nd ste – internal

Nested edges become localLinear edges lost!!

Stack Trees [LICS’07]

(a’,1)

(a,1)

(e,1) (a’, 1)

(b,1)(b,1)

(a,1)

(a,1)

1

2

3

4

5

6

7

8

(a’,3)12

(b’,2)

11(b’,2)

(e,2)

9

10

8 104

1 2 3 5 6 7 9 11 12

15/25

Emptiness for k-MPAs

Reduction to emptiness of tree automata

The key idea is the use of stack-trees

Two main parts: the set of stack-trees is regular

linear order (Tree Aut. of size 2O(k))

Simulation of a k-MPA on the stack-treesSuccessor (Tree Walking Aut. of size 2O(k))

16/25

linear order (x<y)a) x and y in diff phases c) x and y of the same phase -- easy: phase(x) < phase(y) but in diff subtrees: -- hard:

b) x and y of same phase and same tree –- easy x precedes y in the prefix traversal of the tree

x<y px > py

where px =ParentRoot(x)

py= ParentRoot (y)

px > py

x < y

Intuition for case c)

push push pop pop … py … px … root(x) … x … root(y) … y

17/25

a) x and y in diff phases c) x and y of the same phase -- easy: phase(x) < phase(y) but in diff subtrees: -- hard:

b) x and y of same phase and same tree –- easy x precedes y in the prefix traversal of the tree

… …

zyzx

≤ #phases

Tree automata for the linear order

x y

Inductive definitionBase case : a) and b)Inductive step : c)

Tree automaton for c) Simulate the TA for a) or b) to

check zx, zy

Check if zx reach x and zy

reaches y with the same phase sequence (guessed in the root)

State space 2O(k)

px py

x<y px > py

where px =ParentRoot(x)

py= ParentRoot (y)

18/25

Successor

Motivation for case c)

push push pop pop rootx x y … py … … px

a) if x and y in diff phases --easy EndPhase(x) and

y=NextPhase(x)

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

c) x and y of the same phase but in diff subtrees: --hard z ParentRoot(x); z’ Predecessor(z) while phaseT(RightChild(z’))

≠ phaseT(x)

z’ Predecessor(z); y = RightChild(z’);}

19/25

Tree walking automaton for Successor

Procedure Successor(x)if EndPhase(x) then return NextPhase(phaseT(x));

elseif (y PrefixSucc(x) exists) then return(y);else { z ParentRoot(x); z’ Predecessor(z) while phaseT(RightChild(z’))

≠ phaseT(x)

z’ Predecessor(z); return RightChild(z’);}

Procedure Predecessor(x)if BeginPhase(x) then return PrevPhase(phaseT(x));

elseif (y PrefixPred(x) exists) then return(y);else { z ParentRoot(x); z’ Successor(z) while phaseT(RightChild(z’))

≠ phaseT(x)

z’ Successor(z); return RightChild(z’);}

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 = 2O(k)

20/25

Outline of the talk

Infinite automata

2ETIME Upper Bound

2ETIME Lower Bound

Conclusions

22/25

Lower bound (reduction)

Reduction from the membership problem for alternating

machines working in 2O(w) space to the membership problem for BPTAs

a1 am

Guess

a TM run on w

a2

Check all consecutive confs are correct

Extract all the consecutive confs from the TM run

23/25

Checking the moves

The sequence of moves: #u1#v1 #u2#v2 ... #um#vm

Checking if uivi is similar to checking if c = c’

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)

For j=1,…,|w| For i=1,…,m

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

#u1#v1 #u2#v2 ... #um#vm

#even(vm)

#even(um)

...#even(v2)

#even(u2)

#even(v1)

#even(u1)

#odd(vm)

#odd(um)

...#odd(v2)

#odd(u2)

#odd(v1)

#odd(u1)

output tape

phases required

log 2|w| = |w|

24/25

Outline of the talk

Infinite automata

2ETIME Upper Bound

2ETIME Lower Bound

Conclusions

25/25

Conclusions

Characterization of 2ETIME with infinite automata

Alternate characterizations of complexity classes using rewriting theory

Rewriting is classic (Thue, Post) but never applied to complexity theory

Exact computational complexity of the emptiness problem for bounded-phase multi-stack pushdown automata

26/25

Conclusions

Can we show alternate proofs of classic results using infinite automata? Eg. NL=co-NL

NLINSPACE= co-NLINSPACE…

Can we capture P or NP?

Expressive power of deterministic infinite automata