Limited Automata and Context-Free Languages - Università degli

Limited Automata and Context-Free Languages Giovanni Pighizzini

Andrea Pisoni

Dipartimento di Informatica Università degli Studi di Milano, Italy

NCMA 2013 Umeå, Sweden August 13–14, 2013

The Chomsky Hierarchy

type 0

1-tape Turing Machines

type 1

Linear Bounded Automata Pushdown Automata Finite Automata

type 2

type 3

Limited Automata [Hibbard’67] One-tape Turing machines with restricted rewritings

Definition Fixed an integer d ≥ 1, a d -limited automaton is I

a one-tape Turing machine

I

which is allowed to rewrite the content of each tape cell only in the first d visits

Limited Automata [Hibbard’67] One-tape Turing machines with restricted rewritings

Definition Fixed an integer d ≥ 1, a d -limited automaton is I

a one-tape Turing machine

I

which is allowed to rewrite the content of each tape cell only in the first d visits

Limited Automata [Hibbard’67] One-tape Turing machines with restricted rewritings

Definition Fixed an integer d ≥ 1, a d -limited automaton is I

a one-tape Turing machine

I

which is allowed to rewrite the content of each tape cell only in the first d visits

Computational power I

For each d ≥ 2, d -limited automata characterize context-free languages [Hibbard’67]

I

1-limited automata characterize regular languages [Wagner&Wechsung’86]

The Chomsky Hierarchy

type 0

1-tape Turing Machines

type 1

Linear Bounded Automata Pushdown Automata Finite Automata

type 2

type 3

The Chomsky Hierarchy

type 0

1-tape Turing Machines

type 1

Linear Bounded Automata 2-Limited Automata Finite Automata

type 2

type 3

Our Contributions

I

2-Limited Automata ≡ Pushdown Automata: descriptional complexity point of view

I

Determinism vs Nondeterminism

Our Contributions

I

2-Limited Automata ≡ Pushdown Automata: descriptional complexity point of view

2-LAs → PDAs Exponential gap

I

Determinism vs Nondeterminism

Our Contributions

I

2-Limited Automata ≡ Pushdown Automata: descriptional complexity point of view

2-LAs → PDAs Exponential gap

I

Determinism vs Nondeterminism

PDAs → 2-LAs Polynomial upper bound

Our Contributions

I

2-Limited Automata ≡ Pushdown Automata: descriptional complexity point of view

2-LAs → PDAs Exponential gap

I

Determinism vs Nondeterminism

PDAs → 2-LAs Polynomial upper bound

Our Contributions

I

2-Limited Automata ≡ Pushdown Automata: descriptional complexity point of view

2-LAs → PDAs Exponential gap

I

PDAs → 2-LAs Polynomial upper bound

Determinism vs Nondeterminism

Deterministic Context-Free Languages ≡ Deterministic 2-LAs

Example: Balanced Parentheses B

(

)

(

(

(

)

)

)

C

6

(i) (ii) (iii) (iv) (v)

Move to the right to search a closed parenthesis Rewrite it by # Move to the left to search an open parenthesis Rewrite it by # Repeat from the beginning

Example: Balanced Parentheses B

−→ (i) (ii) (iii) (iv) (v)

(

)

(

(

(

)

)

)

C

6

Move to the right to search a closed parenthesis Rewrite it by # Move to the left to search an open parenthesis Rewrite it by # Repeat from the beginning

Example: Balanced Parentheses B

−→ (i) (ii) (iii) (iv) (v)

(

)

(

(

(

)

)

)

C

6

Move to the right to search a closed parenthesis Rewrite it by # Move to the left to search an open parenthesis Rewrite it by # Repeat from the beginning

Example: Balanced Parentheses B

−→ (i) (ii) (iii) (iv) (v)

(

#

(

(

(

)

)

)

C

6

Move to the right to search a closed parenthesis Rewrite it by # Move to the left to search an open parenthesis Rewrite it by # Repeat from the beginning

Example: Balanced Parentheses B

(

# 6

(i) (ii) (iii) (iv) (v)

(

(

(

)

)

)

C

←−

Move to the right to search a closed parenthesis Rewrite it by # Move to the left to search an open parenthesis Rewrite it by # Repeat from the beginning

Example: Balanced Parentheses B

( 6

(i) (ii) (iii) (iv) (v)

#

(

(

(

)

)

)

C

←−

Move to the right to search a closed parenthesis Rewrite it by # Move to the left to search an open parenthesis Rewrite it by # Repeat from the beginning

Example: Balanced Parentheses B # # 6

(i) (ii) (iii) (iv) (v)

(

(

(

)

)

)

C

←−

Move to the right to search a closed parenthesis Rewrite it by # Move to the left to search an open parenthesis Rewrite it by # Repeat from the beginning

Example: Balanced Parentheses B # # 6

(i) (ii) (iii) (iv) (v)

(

(

(

)

)

)

C

←−

Move to the right to search a closed parenthesis Rewrite it by # Move to the left to search an open parenthesis Rewrite it by # Repeat from the beginning

Example: Balanced Parentheses B # #

−→ (i) (ii) (iii) (iv) (v)

(

(

(

)

)

)

C

6

Move to the right to search a closed parenthesis Rewrite it by # Move to the left to search an open parenthesis Rewrite it by # Repeat from the beginning

Example: Balanced Parentheses B # #

−→ (i) (ii) (iii) (iv) (v)

(

(

(

)

)

)

C

6

Move to the right to search a closed parenthesis Rewrite it by # Move to the left to search an open parenthesis Rewrite it by # Repeat from the beginning

Example: Balanced Parentheses B # #

−→ (i) (ii) (iii) (iv) (v)

(

(

(

)

)

)

C

6

Move to the right to search a closed parenthesis Rewrite it by # Move to the left to search an open parenthesis Rewrite it by # Repeat from the beginning

Example: Balanced Parentheses B # #

−→ (i) (ii) (iii) (iv) (v)

(

(

(

)

)

)

C

6

Move to the right to search a closed parenthesis Rewrite it by # Move to the left to search an open parenthesis Rewrite it by # Repeat from the beginning

Example: Balanced Parentheses B # #

−→ (i) (ii) (iii) (iv) (v)

(

(

(

)

)

)

C

6

Move to the right to search a closed parenthesis Rewrite it by # Move to the left to search an open parenthesis Rewrite it by # Repeat from the beginning

Example: Balanced Parentheses B # #

−→ (i) (ii) (iii) (iv) (v)

(

(

(

)

)

)

C

6

Move to the right to search a closed parenthesis Rewrite it by # Move to the left to search an open parenthesis Rewrite it by # Repeat from the beginning

Example: Balanced Parentheses B # #

−→ (i) (ii) (iii) (iv) (v)

(

(

(

#

)

)

C

6

Move to the right to search a closed parenthesis Rewrite it by # Move to the left to search an open parenthesis Rewrite it by # Repeat from the beginning

Example: Balanced Parentheses B # #

(

(

(

# 6

(i) (ii) (iii) (iv) (v)

)

)

C

←−

Move to the right to search a closed parenthesis Rewrite it by # Move to the left to search an open parenthesis Rewrite it by # Repeat from the beginning

Example: Balanced Parentheses B # #

(

(

( 6

(i) (ii) (iii) (iv) (v)

#

)

)

C

←−

Move to the right to search a closed parenthesis Rewrite it by # Move to the left to search an open parenthesis Rewrite it by # Repeat from the beginning

Example: Balanced Parentheses B # #

(

(

# # 6

(i) (ii) (iii) (iv) (v)

)

)

C

←−

Move to the right to search a closed parenthesis Rewrite it by # Move to the left to search an open parenthesis Rewrite it by # Repeat from the beginning

Example: Balanced Parentheses B # #

−→ (i) (ii) (iii) (iv) (v)

(

(

# #

)

)

C

6

Move to the right to search a closed parenthesis Rewrite it by # Move to the left to search an open parenthesis Rewrite it by # Repeat from the beginning

Example: Balanced Parentheses B # #

−→ (i) (ii) (iii) (iv) (v)

(

(

# #

)

)

C

6

Move to the right to search a closed parenthesis Rewrite it by # Move to the left to search an open parenthesis Rewrite it by # Repeat from the beginning

Example: Balanced Parentheses B # #

−→ (i) (ii) (iii) (iv) (v)

(

(

# #

)

)

C

6

Move to the right to search a closed parenthesis Rewrite it by # Move to the left to search an open parenthesis Rewrite it by # Repeat from the beginning

Example: Balanced Parentheses B # #

−→ (i) (ii) (iii) (iv) (v)

(

(

# # #

)

C

6

Move to the right to search a closed parenthesis Rewrite it by # Move to the left to search an open parenthesis Rewrite it by # Repeat from the beginning

Example: Balanced Parentheses B # #

(

(

# # # 6

(i) (ii) (iii) (iv) (v)

)

C

←−

Move to the right to search a closed parenthesis Rewrite it by # Move to the left to search an open parenthesis Rewrite it by # Repeat from the beginning

Example: Balanced Parentheses B # #

(

(

# # # 6

(i) (ii) (iii) (iv) (v)

)

C

←−

Move to the right to search a closed parenthesis Rewrite it by # Move to the left to search an open parenthesis Rewrite it by # Repeat from the beginning

Example: Balanced Parentheses B # #

(

(

# # # 6

(i) (ii) (iii) (iv) (v)

)

C

←−

Move to the right to search a closed parenthesis Rewrite it by # Move to the left to search an open parenthesis Rewrite it by # Repeat from the beginning

Example: Balanced Parentheses B # #

(

( 6

(i) (ii) (iii) (iv) (v)

# # #

)

C

←−

Move to the right to search a closed parenthesis Rewrite it by # Move to the left to search an open parenthesis Rewrite it by # Repeat from the beginning

Example: Balanced Parentheses B # #

(

# # # # 6

(i) (ii) (iii) (iv) (v)

)

C

←−

Move to the right to search a closed parenthesis Rewrite it by # Move to the left to search an open parenthesis Rewrite it by # Repeat from the beginning

Example: Balanced Parentheses B # #

−→ (i) (ii) (iii) (iv) (v)

(

# # # #

)

C

6

Move to the right to search a closed parenthesis Rewrite it by # Move to the left to search an open parenthesis Rewrite it by # Repeat from the beginning

Example: Balanced Parentheses B # #

−→ (i) (ii) (iii) (iv) (v)

(

# # # #

)

C

6

Move to the right to search a closed parenthesis Rewrite it by # Move to the left to search an open parenthesis Rewrite it by # Repeat from the beginning

Example: Balanced Parentheses B # #

−→ (i) (ii) (iii) (iv) (v)

(

# # # #

)

C

6

Move to the right to search a closed parenthesis Rewrite it by # Move to the left to search an open parenthesis Rewrite it by # Repeat from the beginning

Example: Balanced Parentheses B # #

−→ (i) (ii) (iii) (iv) (v)

(

# # # #

)

C

6

Move to the right to search a closed parenthesis Rewrite it by # Move to the left to search an open parenthesis Rewrite it by # Repeat from the beginning

Example: Balanced Parentheses B # #

−→ (i) (ii) (iii) (iv) (v)

(

# # # #

)

C

6

Move to the right to search a closed parenthesis Rewrite it by # Move to the left to search an open parenthesis Rewrite it by # Repeat from the beginning

Example: Balanced Parentheses B # #

−→ (i) (ii) (iii) (iv) (v)

(

# # # #

)

C

6

Move to the right to search a closed parenthesis Rewrite it by # Move to the left to search an open parenthesis Rewrite it by # Repeat from the beginning

Example: Balanced Parentheses B # #

(

# # # # # C 6 ←−

(i) (ii) (iii) (iv) (v)

Move to the right to search a closed parenthesis Rewrite it by # Move to the left to search an open parenthesis Rewrite it by # Repeat from the beginning

Example: Balanced Parentheses B # #

(

# # # # # C 6

(i) (ii) (iii) (iv) (v)

←−

Move to the right to search a closed parenthesis Rewrite it by # Move to the left to search an open parenthesis Rewrite it by # Repeat from the beginning

Example: Balanced Parentheses B # #

(

# # # # # C 6

(i) (ii) (iii) (iv) (v)

←−

Move to the right to search a closed parenthesis Rewrite it by # Move to the left to search an open parenthesis Rewrite it by # Repeat from the beginning

Example: Balanced Parentheses B # #

(

# # # # # C 6

(i) (ii) (iii) (iv) (v)

←−

Move to the right to search a closed parenthesis Rewrite it by # Move to the left to search an open parenthesis Rewrite it by # Repeat from the beginning

Example: Balanced Parentheses B # #

(

# # # # # C 6

(i) (ii) (iii) (iv) (v)

←−

Move to the right to search a closed parenthesis Rewrite it by # Move to the left to search an open parenthesis Rewrite it by # Repeat from the beginning

Example: Balanced Parentheses B # #

( 6

(i) (ii) (iii) (iv) (v)

# # # # # C

←−

Move to the right to search a closed parenthesis Rewrite it by # Move to the left to search an open parenthesis Rewrite it by # Repeat from the beginning

Example: Balanced Parentheses B # # # # # # # # C 6

(i) (ii) (iii) (iv) (v)

←−

Move to the right to search a closed parenthesis Rewrite it by # Move to the left to search an open parenthesis Rewrite it by # Repeat from the beginning

Example: Balanced Parentheses B # # # # # # # # C

−→ (i) (ii) (iii) (iv) (v)

6

Move to the right to search a closed parenthesis Rewrite it by # Move to the left to search an open parenthesis Rewrite it by # Repeat from the beginning

Example: Balanced Parentheses B # # # # # # # # C

−→ (i) (ii) (iii) (iv) (v)

6

Move to the right to search a closed parenthesis Rewrite it by # Move to the left to search an open parenthesis Rewrite it by # Repeat from the beginning

Example: Balanced Parentheses B # # # # # # # # C

−→ (i) (ii) (iii) (iv) (v)

6

Move to the right to search a closed parenthesis Rewrite it by # Move to the left to search an open parenthesis Rewrite it by # Repeat from the beginning

Example: Balanced Parentheses B # # # # # # # # C

−→ (i) (ii) (iii) (iv) (v)

6

Move to the right to search a closed parenthesis Rewrite it by # Move to the left to search an open parenthesis Rewrite it by # Repeat from the beginning

Example: Balanced Parentheses B # # # # # # # # C

−→ (i) (ii) (iii) (iv) (v)

6

Move to the right to search a closed parenthesis Rewrite it by # Move to the left to search an open parenthesis Rewrite it by # Repeat from the beginning

Example: Balanced Parentheses B # # # # # # # # C

−→ (i) (ii) (iii) (iv) (v)

6

Move to the right to search a closed parenthesis Rewrite it by # Move to the left to search an open parenthesis Rewrite it by # Repeat from the beginning

Example: Balanced Parentheses B # # # # # # # # C

←− 6 (i) (ii) (iii) (iv) (v)

Move to the right to search a closed parenthesis Rewrite it by # Move to the left to search an open parenthesis Rewrite it by # Repeat from the beginning

Special cases: (i’) If in (i) the right end of the tape is reached then scan all the tape and accept iff all tape cells contain # (iii’) If in (iii) the left end of the tape is reached then reject

Example: Balanced Parentheses B # # # # # # # # C 6 ←−

(i) (ii) (iii) (iv) (v)

Move to the right to search a closed parenthesis Rewrite it by # Move to the left to search an open parenthesis Rewrite it by # Repeat from the beginning

Special cases: (i’) If in (i) the right end of the tape is reached then scan all the tape and accept iff all tape cells contain # (iii’) If in (iii) the left end of the tape is reached then reject

Example: Balanced Parentheses B # # # # # # # # C 6

(i) (ii) (iii) (iv) (v)

←−

Move to the right to search a closed parenthesis Rewrite it by # Move to the left to search an open parenthesis Rewrite it by # Repeat from the beginning

Special cases: (i’) If in (i) the right end of the tape is reached then scan all the tape and accept iff all tape cells contain # (iii’) If in (iii) the left end of the tape is reached then reject

Example: Balanced Parentheses B # # # # # # # # C 6

(i) (ii) (iii) (iv) (v)

←−

Move to the right to search a closed parenthesis Rewrite it by # Move to the left to search an open parenthesis Rewrite it by # Repeat from the beginning

Special cases: (i’) If in (i) the right end of the tape is reached then scan all the tape and accept iff all tape cells contain # (iii’) If in (iii) the left end of the tape is reached then reject

Example: Balanced Parentheses B # # # # # # # # C 6

(i) (ii) (iii) (iv) (v)

←−

Move to the right to search a closed parenthesis Rewrite it by # Move to the left to search an open parenthesis Rewrite it by # Repeat from the beginning

Special cases: (i’) If in (i) the right end of the tape is reached then scan all the tape and accept iff all tape cells contain # (iii’) If in (iii) the left end of the tape is reached then reject

Example: Balanced Parentheses B # # # # # # # # C 6

(i) (ii) (iii) (iv) (v)

←−

Move to the right to search a closed parenthesis Rewrite it by # Move to the left to search an open parenthesis Rewrite it by # Repeat from the beginning

Special cases: (i’) If in (i) the right end of the tape is reached then scan all the tape and accept iff all tape cells contain # (iii’) If in (iii) the left end of the tape is reached then reject

Example: Balanced Parentheses B # # # # # # # # C 6

(i) (ii) (iii) (iv) (v)

←−

Move to the right to search a closed parenthesis Rewrite it by # Move to the left to search an open parenthesis Rewrite it by # Repeat from the beginning

Special cases: (i’) If in (i) the right end of the tape is reached then scan all the tape and accept iff all tape cells contain # (iii’) If in (iii) the left end of the tape is reached then reject

Example: Balanced Parentheses B # # # # # # # # C 6

(i) (ii) (iii) (iv) (v)

←−

Move to the right to search a closed parenthesis Rewrite it by # Move to the left to search an open parenthesis Rewrite it by # Repeat from the beginning

Special cases: (i’) If in (i) the right end of the tape is reached then scan all the tape and accept iff all tape cells contain # (iii’) If in (iii) the left end of the tape is reached then reject

Example: Balanced Parentheses B # # # # # # # # C 6

(i) (ii) (iii) (iv) (v)

←−

Move to the right to search a closed parenthesis Rewrite it by # Move to the left to search an open parenthesis Rewrite it by # Repeat from the beginning

Special cases: (i’) If in (i) the right end of the tape is reached then scan all the tape and accept iff all tape cells contain # (iii’) If in (iii) the left end of the tape is reached then reject

Example: Balanced Parentheses B # # # # # # # # C 6

(i) (ii) (iii) (iv) (v)

yes!

Move to the right to search a closed parenthesis Rewrite it by # Move to the left to search an open parenthesis Rewrite it by # Repeat from the beginning

Special cases: (i’) If in (i) the right end of the tape is reached then scan all the tape and accept iff all tape cells contain # (iii’) If in (iii) the left end of the tape is reached then reject

Example: Balanced Parentheses B # # # # # # # # C

(i) (ii) (iii) (iv) (v)

Move to the right to search a closed parenthesis Rewrite it by # Move to the left to search an open parenthesis Rewrite it by # Repeat from the beginning

Special cases: (i’) If in (i) the right end of the tape is reached then scan all the tape and accept iff all tape cells contain # (iii’) If in (iii) the left end of the tape is reached then reject

Example: Balanced Parentheses B # # # # # # # # C

(i) (ii) (iii) (iv) (v)

Move to the right to search a closed parenthesis Rewrite it by # Move to the left to search an open parenthesis Rewrite it by # Repeat from the beginning

Special cases: (i’) If in (i) the right end of the tape is reached then scan all the tape and accept iff all tape cells contain # (iii’) If in (iii) the left end of the tape is reached then reject Each cell is rewritten only in the first 2 visits!

Simulation of 2-Limited Automata by Pushdown Automata

Problem How much it costs, in the description size, the simulation of 2-LAs by PDAs?

This work Exponential cost!

Simulation of 2-Limited Automata by Pushdown Automata

Problem How much it costs, in the description size, the simulation of 2-LAs by PDAs?

This work Exponential cost!

Transition Tables of 2-LAs I I

Fixed a 2-limited automaton Transition table τw

w is a “frozen” string

τw ⊆ Q × {−1, +1} × Q × {−1, +1} w

w q

q p p

(q, d 0 , p, d 00 ) ∈ τw iff M on a tape segment containing w has a computation path: entering the segment in q from d 0 exiting the segment in p from d 00 left = −1, right = +1

Transition Tables of 2-LAs I I

Fixed a 2-limited automaton Transition table τw

w is a “frozen” string

τw ⊆ Q × {−1, +1} × Q × {−1, +1} −→

j

w

q

p

(q, −1, p, −1) ∈ τw

(q, d 0 , p, d 00 ) ∈ τw iff M on a tape segment containing w has a computation path: entering the segment in q from d 0 exiting the segment in p from d 00 left = −1, right = +1

Transition Tables of 2-LAs I I

Fixed a 2-limited automaton Transition table τw

w is a “frozen” string

τw ⊆ Q × {−1, +1} × Q × {−1, +1} ←−

w

q

j

p

(q, −1, p, −1) ∈ τw

(q, d 0 , p, d 00 ) ∈ τw iff M on a tape segment containing w has a computation path: entering the segment in q from d 0 exiting the segment in p from d 00 left = −1, right = +1

Transition Tables of 2-LAs I I

Fixed a 2-limited automaton Transition table τw

w is a “frozen” string

τw ⊆ Q × {−1, +1} × Q × {−1, +1} w

w

p p

←−

j

q

q

(q, −1, p, −1) ∈ τw

(q, +1, p, −1) ∈ τw

(q, d 0 , p, d 00 ) ∈ τw iff M on a tape segment containing w has a computation path: entering the segment in q from d 0 exiting the segment in p from d 00 left = −1, right = +1

Transition Tables of 2-LAs I I

Fixed a 2-limited automaton Transition table τw

w is a “frozen” string

τw ⊆ Q × {−1, +1} × Q × {−1, +1} w

←−

w q

q

j

p p

(q, −1, p, −1) ∈ τw

(q, +1, p, −1) ∈ τw

(q, d 0 , p, d 00 ) ∈ τw iff M on a tape segment containing w has a computation path: entering the segment in q from d 0 exiting the segment in p from d 00 left = −1, right = +1

Simulation of 2-LAs by PDAs Initial configuration B a b c d e f g h i . . .C 6

2-LA

q0

Simulation of 2-LAs by PDAs Initial configuration B a b c d e f g h i . . .C 6

2-LA

q0

a b c d e f g h i ... 6

PDA

q0 -

Simulation of 2-LAs by PDAs Initial configuration B a b c d e f g h i . . .C 6

2-LA

q0

a b c d e f g h i ... 6

PDA

q0 -

Some computation steps... B a b c d e f g h i . . .C 6

... 2-LA

q0

Simulation of 2-LAs by PDAs Initial configuration B a b c d e f g h i . . .C 6

2-LA

q0

a b c d e f g h i ... 6

PDA

q0 -

Some computation steps... B X b c d e f g h i . . .C 6

... 2-LA

...

Simulation of 2-LAs by PDAs Initial configuration B a b c d e f g h i . . .C 6

2-LA

q0

a b c d e f g h i ... 6

PDA

q0 -

Some computation steps... B X B c d e f g h i . . .C   6

... 2-LA

...

Simulation of 2-LAs by PDAs Initial configuration B a b c d e f g h i . . .C 6

2-LA

q0

a b c d e f g h i ... 6

PDA

q0 -

Some computation steps... B A B c d e f g h i . . .C 6 

... 2-LA

...

Simulation of 2-LAs by PDAs Initial configuration B a b c d e f g h i . . .C 6

2-LA

q0

a b c d e f g h i ... 6

PDA

q0 -

Some computation steps... B A B c d e f g h i . . .C  6 

... 2-LA

...

Simulation of 2-LAs by PDAs Initial configuration B a b c d e f g h i . . .C 6

2-LA

q0

a b c d e f g h i ... 6

PDA

q0 -

Some computation steps... B A B X d e f g h i . . .C   6

... 2-LA

...

Simulation of 2-LAs by PDAs Initial configuration B a b c d e f g h i . . .C 6

2-LA

q0

a b c d e f g h i ... 6

PDA

q0 -

Some computation steps... B A B X Y e f g h i . . .C   6

... 2-LA

...

Simulation of 2-LAs by PDAs Initial configuration B a b c d e f g h i . . .C 6

2-LA

q0

a b c d e f g h i ... 6

PDA

q0 -

Some computation steps... B A B X Y Z f g h i . . .C   6

... 2-LA

...

Simulation of 2-LAs by PDAs Initial configuration B a b c d e f g h i . . .C 6

2-LA

q0

a b c d e f g h i ... 6

PDA

q0 -

Some computation steps... B A B X Y Z F g h i . . .C     6

... 2-LA

...

Simulation of 2-LAs by PDAs Initial configuration B a b c d e f g h i . . .C 6

2-LA

q0

a b c d e f g h i ... 6

PDA

q0 -

Some computation steps... B A B X Y Z E F g h i . . .C   6 

... 2-LA

...

Simulation of 2-LAs by PDAs Initial configuration B a b c d e f g h i . . .C 6

2-LA

q0

a b c d e f g h i ... 6

PDA

q0 -

Some computation steps... B A B X Y Z E F g h i . . .C    6 

... 2-LA

q

Simulation of 2-LAs by PDAs Initial configuration B a b c d e f g h i . . .C 6

2-LA

q0

a b c d e f g h i ... 6

PDA

q0 -

After some steps... B A B X Y Z E F g h i . . .C    6 

2-LA

q

a b c d e f g h i ... 6 - τEF Y X q τAB PDA

Simulation of 2-LAs by PDAs Initial configuration B a b c d e f g h i . . .C 6

2-LA

q0

a b c d e f g h i ... 6

PDA

q0 -

After some steps... B A B X Y Z E F g h i . . .C 6

2-LA

q

a b c d e f g h i ... 6 - τEF Y X q τAB PDA

Simulation of 2-LAs by PDAs Initial configuration B a b c d e f g h i . . .C 6

2-LA

q0

a b c d e f g h i ... 6

PDA

q0 -

After some steps...  B A B X Y Z E F g h i . . .C  6

2-LA

q

a b c d e f g h i ... 6 - τEFn Y X q τAB PDA

Simulation of 2-LAs by PDAs Initial configuration B a b c d e f g h i . . .C 6

2-LA

q0

a b c d e f g h i ... 6

PDA

q0 -

After some steps... B A B X Yn Z E F g h i . . .C 6

2-LA

q

a b c d e f g h i ... 6 - τEF Yn X q τAB PDA

Simulation of 2-LAs by PDAs Initial configuration B a b c d e f g h i . . .C 6

2-LA

q0

a b c d e f g h i ... 6

PDA

q0 -

After some steps... B A B Xn Y Z E F g h i . . .C 6

2-LA

q

a b c d e f g h i ... 6 - τEF Y Xn q τ PDA AB

Simulation of 2-LAs by PDAs Initial configuration B a b c d e f g h i . . .C 6

2-LA

q0

a b c d e f g h i ... 6

PDA

q0 -

After some steps...  B A B X Y Z E F g h i . . .C  6

2-LA

q

a b c d e f g h i ... 6 - τEF Y X q τABn PDA

Simulation of 2-LAs by PDAs B A B X Y E F g h i . . .C    6 

2-LA

q

a b c d e f g h i ... 6 - τEF Y X q τAB PDA

Simulation of 2-LAs by PDAs B A B X Y E F g h i . . .C    6 

2-LA

q

δ(q, g ) 3 (p, Z , +1) move to the right



a b c d e f g h i ... 6 - τEF Y X q τAB PDA

Simulation of 2-LAs by PDAs B A B X Y E F g h i . . .C    6 

2-LA

q

δ(q, g ) 3 (p, Z , +1) move to the right

⇓ B A B X Y E F Z h i . . .C     6

2-LA

p

a b c d e f g h i ... 6 - τEF Y X q τAB PDA

Simulation of 2-LAs by PDAs B A B X Y E F g h i . . .C    6 

2-LA

q

a b c d e f g h i ... 6 - τEF Y X q τAB PDA

δ(q, g ) 3 (p, Z , +1)

normal mode

move to the right

push and direct simulation





B A B X Y E F Z h i . . .C     6

2-LA

p

. a b c d e f g h i . .Z 6 τEF Y X p τAB PDA

Simulation of 2-LAs by PDAs B A B X Y E F g h i . . .C    6 

2-LA

q

a b c d e f g h i ... 6 - τEF Y X q τAB PDA

δ(q, g ) 3 (p, Z , +1)

normal mode

move to the right

push and direct simulation





B A B X Y E F Zn h i . . .C 6

2-LA

p

. a b c d e f g h i . .Zn 6 τEF Y X p τAB PDA

Simulation of 2-LAs by PDAs B A B X Y E F Z h i . . .C     6

2-LA

p

. a b c d e f g h i . .Z 6 τEF Y X p τAB PDA

Simulation of 2-LAs by PDAs B A B X Y E F Z h i . . .C     6

2-LA

p

δ(p, h) 3 (r , H, −1) move to the left



. a b c d e f g h i . .Z 6 τEF Y X p τAB PDA

Simulation of 2-LAs by PDAs B A B X Y E F Z h i . . .C     6

2-LA

p

δ(p, h) 3 (r , H, −1) move to the left



B A B X Y E F Z H i . . .C      6 

2-LA

r

. a b c d e f g h i . .Z 6 τEF Y X p τAB PDA

Simulation of 2-LAs by PDAs B A B X Y E F Z h i . . .C     6

2-LA

p

δ(p, h) 3 (r , H, −1) move to the left



B A B X Y E F Z H i . . .C      6 

2-LA

r

. a b c d e f g h i . .Z 6 τEF Y X p τAB PDA

back mode

⇓ . a b c d e f g h i . .Z 6 τEF Y X r , τH τAB PDA

Simulation of 2-LAs by PDAs B A B X Y E F Z h i . . .C     6

2-LA

p

δ(p, h) 3 (r , H, −1) move to the left



B A B X Y E F Z Hn i . . .C 6

2-LA

r

. a b c d e f g h i . .Z 6 τEF Y X p τAB PDA

back mode

⇓ . a b c d e f g h i . .Z 6 τEF Y X r , τHn τAB PDA

Simulation of 2-LAs by PDAs B A B X Y E F Z H i . . .C      6 

2-LA

r

. a b c d e f g h i . .Z 6 τEF Y X r , τH τAB PDA

Simulation of 2-LAs by PDAs B A B X Y E F Z H i . . .C      6 

2-LA

r

δ(r , Z ) 3 (q, G , −1) move to the left



. a b c d e f g h i . .Z 6 τEF Y X r , τH τAB PDA

Simulation of 2-LAs by PDAs B A B X Y E F Z H i . . .C      6 

2-LA

r

δ(r , Z ) 3 (q, G , −1) move to the left



B A B X Y E F G H i . . .C   6   

2-LA

q

. a b c d e f g h i . .Z 6 τEF Y X r , τH τAB PDA

Simulation of 2-LAs by PDAs B A B X Y E F Z H i . . .C      6 

2-LA

r

δ(r , Z ) 3 (q, G , −1) move to the left



B A B X Y E F G H i . . .C   6   

2-LA

q

. a b c d e f g h i . .Z 6 τEF Y X r , τH τAB PDA

back mode

⇓ a b c d e f g h i ... 6 - τEF Y X q, τGH τAB PDA

Simulation of 2-LAs by PDAs B A B X Y E F Z H i . . .C      6 

2-LA

r

δ(r , Z ) 3 (q, G , −1) move to the left



 B A B X Y E F G H i . . .C  6

2-LA

q

. a b c d e f g h i . .Z 6 τEF Y X r , τH τAB PDA

back mode

⇓ a b c d e f g h i ... 6 - τEF Y X q, τGHn τAB PDA

Simulation of 2-LAs by PDAs B A B X Y E F G H i . . .C   6   

2-LA

q

a b c d e f g h i ... 6 - τEF Y X q, τGH τAB PDA

Simulation of 2-LAs by PDAs B A B X Y E F G H i . . .C   6   

2-LA

q

(q, +1, s, −1) ∈ τEF exit to the left



a b c d e f g h i ... 6 - τEF Y X q, τGH τAB PDA

Simulation of 2-LAs by PDAs B A B X Y E F G H i . . .C   6   

2-LA

q

(q, +1, s, −1) ∈ τEF exit to the left



B A B X Y E F G H i . . .C     6 

2-LA

s

a b c d e f g h i ... 6 - τEF Y X q, τGH τAB PDA

Simulation of 2-LAs by PDAs B A B X Y E F G H i . . .C   6   

2-LA

q

(q, +1, s, −1) ∈ τEF exit to the left



B A B X Y E F G H i . . .C     6 

2-LA

s

a b c d e f g h i ... 6 - τEF Y X q, τGH τAB PDA

back mode

⇓ a b c d e f g h i ... 6 - Y X s, τE ···H τAB PDA

Simulation of 2-LAs by PDAs B A B X Y E F G H i . . .C   6   

2-LA

q

(q, +1, s, −1) ∈ τEF exit to the left



 B A B X Y E F G H i . . .C 

6

2-LA

s

a b c d e f g h i ... 6 - τEF Y X q, τGH τAB PDA

back mode

⇓ a b c d e f g h i ... 6 - Y  X s, τE ···H τAB PDA



Simulation of 2-LAs by PDAs B A B X Y E F G H i . . .C     6 

2-LA

s

a b c d e f g h i ... 6 - Y X s, τE ···H τAB PDA

Simulation of 2-LAs by PDAs B A B X Y E F G H i . . .C     6 

2-LA

s

δ(s, Y ) 3 (p, D, +1) move to the right



a b c d e f g h i ... 6 - Y X s, τE ···H τAB PDA

Simulation of 2-LAs by PDAs B A B X Y E F G H i . . .C     6 

2-LA

s

δ(s, Y ) 3 (p, D, +1) move to the right

⇓ B A B X D E F G H i . . .C      X X6 

2-LA

p

a b c d e f g h i ... 6 - Y X s, τE ···H τAB PDA

Simulation of 2-LAs by PDAs B A B X Y E F G H i . . .C     6 

2-LA

s

δ(s, Y ) 3 (p, D, +1)

a b c d e f g h i ... 6 - Y X s, τE ···H τAB PDA

move to the right

back mode





B A B X D E F G H i . . .C      X X6 

2-LA

p

a b c d e f g h i ... 6 - τD X p, τE ···H τAB PDA

Simulation of 2-LAs by PDAs B A B X Y E F G H i . . .C     6 

2-LA

s

δ(s, Y ) 3 (p, D, +1)

a b c d e f g h i ... 6 - Y X s, τE ···H τAB PDA

move to the right

back mode





 B A B X D E F G H i . . .C 

6

2-LA

p

a b c d e f g h i ... 6 - τD  X p, τE ···H τAB PDA



Simulation of 2-LAs by PDAs B A B X Y E F G H i . . .C     6 

2-LA

s

δ(s, Y ) 3 (p, D, +1)

a b c d e f g h i ... 6 - Y X s, τE ···H τAB PDA

move to the right

back mode





B A B X Dn E F G H i . . .C 6

2-LA

p

a b c d e f g h i ... 6 - τDn X p, τE ···H τAB PDA

Simulation of 2-LAs by PDAs B A B X D E F G H i . . .C      X X6 

2-LA

p

a b c d e f g h i ... 6 - τD X p, τE ···H τAB PDA

Simulation of 2-LAs by PDAs B A B X D E F G H i . . .C      X X6 

2-LA

p

(p, −1, r , +1) ∈ τE ···H exit to the right



a b c d e f g h i ... 6 - τD X p, τE ···H τAB PDA

Simulation of 2-LAs by PDAs B A B X D E F G H i . . .C      X X6 

2-LA

p

(p, −1, r , +1) ∈ τE ···H exit to the right

⇓ B A B X D E F G H i . . .C       6 X X

2-LA

r

a b c d e f g h i ... 6 - τD X p, τE ···H τAB PDA

Simulation of 2-LAs by PDAs B A B X D E F G H i . . .C      X X6 

2-LA

p

a b c d e f g h i ... 6 - τD X p, τE ···H τAB PDA

(p, −1, r , +1) ∈ τE ···H

resume normal mode

exit to the right

move to the right





B A B X D E F G H i . . .C       6 X X

2-LA

r

a b c d e f g h i ... 6 -τD···H X r τAB PDA

Simulation of 2-LAs by PDAs B A B X D E F G H i . . .C      X X6 

2-LA

p

a b c d e f g h i ... 6 - τD X p, τE ···H τAB PDA

(p, −1, r , +1) ∈ τE ···H

resume normal mode

exit to the right

move to the right





 B A B X D E F G H i . . .C 

6

2-LA

r

a b c d e f g h i ... 6  -τD···H

X r τAB PDA

Simulation of 2-LAs by PDAs B A B X D E F G H i . . .C      X X6 

2-LA

p

a b c d e f g h i ... 6 - τD X p, τE ···H τAB PDA

(p, −1, r , +1) ∈ τE ···H

resume normal mode

exit to the right

move to the right





B A B Xn D E F G H i . . .C 6

2-LA

r

a b c d e f g h i ... 6 -τD···H Xn r τ PDA AB

Simulation of 2-LAs by PDAs B A B X D E F G H i . . .C      X X6 

2-LA

p

a b c d e f g h i ... 6 - τD X p, τE ···H τAB PDA

(p, −1, r , +1) ∈ τE ···H

resume normal mode

exit to the right

move to the right





 B A B X D E F G H i . . .C  6

2-LA

r

a b c d e f g h i ... 6 -τD···H X r τABn PDA

Simulation of 2-LAs by PDAs Summing up...

Cost of the simulation I In the resulting PDA transition tables are used for states pushdown alphabet I

Exponential upper bound for the size of the resulting PDA

I

Optimal

Simulation of 2-LAs by PDAs Summing up...

Cost of the simulation I In the resulting PDA transition tables are used for states pushdown alphabet I

Exponential upper bound for the size of the resulting PDA

I

Optimal

Simulation of 2-LAs by PDAs Summing up...

Cost of the simulation I In the resulting PDA transition tables are used for states pushdown alphabet I

Exponential upper bound for the size of the resulting PDA

I

Optimal

Simulation of 2-LAs by PDAs Summing up...

Cost of the simulation I In the resulting PDA transition tables are used for states pushdown alphabet I

Exponential upper bound for the size of the resulting PDA

I

Optimal

Determinism vs nondeterminism I

Determinism is preserved by the simulation provided that the input of the PDA is right end-marked

I

Double exponential size for the simulation of D2-LAs by DPDAs

I

Conjecture: this cost cannot be reduced

Simulation of 2-LAs by PDAs Summing up...

Cost of the simulation I In the resulting PDA transition tables are used for states pushdown alphabet I

Exponential upper bound for the size of the resulting PDA

I

Optimal

Determinism vs nondeterminism I

Determinism is preserved by the simulation provided that the input of the PDA is right end-marked

I

Double exponential size for the simulation of D2-LAs by DPDAs

I

Conjecture: this cost cannot be reduced

Simulation of 2-LAs by PDAs Summing up...

Cost of the simulation I In the resulting PDA transition tables are used for states pushdown alphabet I

Exponential upper bound for the size of the resulting PDA

I

Optimal

Determinism vs nondeterminism I

Determinism is preserved by the simulation provided that the input of the PDA is right end-marked

I

Double exponential size for the simulation of D2-LAs by DPDAs

I

Conjecture: this cost cannot be reduced

Simulation of Pushdown Automata by 2-Limited Automata

PDAs → 2-LAs Polynomial cost! (in the description size)

Simulation of Pushdown Automata by 2-Limited Automata

PDAs → 2-LAs Polynomial cost!

DPDAs → D2-LAs Polynomial cost! (in the description size)

Simulation of PDAs by 2-LAs a b c d e f g h i ... 6 - Z Y X q PDA X

Simulation of PDAs by 2-LAs a b c d e f g h i ... 6 - Z Y X q PDA X

B X   X Y f g h i . . .C 6

2-LA

q, Z

Simulation of PDAs by 2-LAs a b c d e f g h i ... 6 - Zm Y X q PDA X

B X   X Y f g h i . . .C 6

2-LA

q, Zm

Simulation of PDAs by 2-LAs a b c d e f g h i ... 6 - Z  Y X q PDA X 

 B X   X Y f g h i . . .C

6

2-LA

q, Z

Simulation of PDAs by 2-LAs a b c d e f g h i ... 6 - Z Y X q PDA X

B X   X Y f g h i . . .C 6

2-LA

q, Z

Normal form for (D)PDAs: I

at each step, the stack height increases at most by 1

I

-moves cannot push on the stack

Each (D)PDA can be simulated by an equivalent (D)2-LA of polynomial size

Determinism vs Nondeterminism in Limited Automata Corollary of the simulations Deterministic 2-LAs ≡ Deterministic Context-Free Languages On the other hand, the language L = {an bn c | n ≥ 0} ∪ {an b2n d | n ≥ 0} is accepted by a deterministic 3-LA, but it is not a DCFL Infinite hierarchy [Hibbard’67] For each d ≥ 2 there is a language which is accepted by a deterministic d -limited automaton and that cannot be accepted by any deterministic (d − 1)-limited automaton

Determinism vs Nondeterminism in Limited Automata Corollary of the simulations Deterministic 2-LAs ≡ Deterministic Context-Free Languages On the other hand, the language L = {an bn c | n ≥ 0} ∪ {an b2n d | n ≥ 0} is accepted by a deterministic 3-LA, but it is not a DCFL Infinite hierarchy [Hibbard’67] For each d ≥ 2 there is a language which is accepted by a deterministic d -limited automaton and that cannot be accepted by any deterministic (d − 1)-limited automaton

Determinism vs Nondeterminism in Limited Automata Corollary of the simulations Deterministic 2-LAs ≡ Deterministic Context-Free Languages On the other hand, the language L = {an bn c | n ≥ 0} ∪ {an b2n d | n ≥ 0} is accepted by a deterministic 3-LA, but it is not a DCFL Infinite hierarchy [Hibbard’67] For each d ≥ 2 there is a language which is accepted by a deterministic d -limited automaton and that cannot be accepted by any deterministic (d − 1)-limited automaton

Futher Investigations

I

Descriptional complexity aspects for d > 2 We conjecture that for d > 2 the size gap from d -limited automata to PDAs remains exponential

I

Descriptional complexity aspects in the unary case Unary context-free language are regular [Ginbsurg&Rice’62]

n

Ex: Ln = (a2 )∗

2-LA DPDA minimal DFA minimal 2NFA

size O(n) O(n) 2n 2n

Futher Investigations

I

Descriptional complexity aspects for d > 2 We conjecture that for d > 2 the size gap from d -limited automata to PDAs remains exponential

I

Descriptional complexity aspects in the unary case Unary context-free language are regular [Ginbsurg&Rice’62]

n

Ex: Ln = (a2 )∗

2-LA DPDA minimal DFA minimal 2NFA

size O(n) O(n) 2n 2n

Futher Investigations

I

Descriptional complexity aspects for d > 2 We conjecture that for d > 2 the size gap from d -limited automata to PDAs remains exponential

I

Descriptional complexity aspects in the unary case Unary context-free language are regular [Ginbsurg&Rice’62]

n

Ex: Ln = (a2 )∗

2-LA DPDA minimal DFA minimal 2NFA

size O(n) O(n) 2n 2n

Futher Investigations

I

Descriptional complexity aspects for d > 2 We conjecture that for d > 2 the size gap from d -limited automata to PDAs remains exponential

I

Descriptional complexity aspects in the unary case Unary context-free language are regular [Ginbsurg&Rice’62]

n

Ex: Ln = (a2 )∗

2-LA DPDA minimal DFA minimal 2NFA

size O(n) O(n) 2n 2n

Thank you for your attention!