regulated pushdown automata

22
Regulated Regulated Pushdown Automata Pushdown Automata Alexander Meduna Alexander Meduna 1/22 Faculty of Information Technology Brno University of Technology Brno, Czech Republic, Europe Presented at Kyoto Sangyo University, Kyoto, Japan March 9, 2006

Upload: clint

Post on 13-Jan-2016

41 views

Category:

Documents


0 download

DESCRIPTION

Regulated Pushdown Automata. 1 /2 2. Alexander Meduna. Faculty of Information Technology Brno University of Technology Brno, Czech Republic, Europe. Presented at Kyoto Sangyo University, Kyoto, Japan March 9, 2006. Fundamental References. 2 /2 2. Meduna Alexander, Kolář Dušan: - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Regulated Pushdown Automata

Regulated Pushdown Regulated Pushdown AutomataAutomata

Alexander MedunaAlexander Meduna

1/22

Faculty of Information Technology

Brno University of Technology

Brno, Czech Republic, Europe

Presented at

Kyoto Sangyo University, Kyoto, Japan

March 9, 2006

Page 2: Regulated Pushdown Automata

Fundamental References

• Meduna Alexander, Kolář Dušan:Regulated Pushdown Automata, Acta Cybernetica,Vol. 2000, No. 4, p. 653-664

• Meduna Alexander, Kolář Dušan:One-Turn Regulated Pushdown Automata and Their Reduction, Fundamenta Informatica,Vol. 2002, No. 16, p. 399-405

2/22

Page 3: Regulated Pushdown Automata

Inspiration: Regulated Grammars

• Grammar G:

1. S AC2. A aAb3. A ab4. C Cc5. C c

• = {1}{24}*{35}

3/22

Page 4: Regulated Pushdown Automata

Regulated Grammars 1/2

1. S AC2. A aAb3. A ab4. C Cc5. C c

= {1}{24}*{35}

• Without , G generates aabbccc:

S AC [1] aAbC [2] aAbCc [4] aabbCc [3] aabbCcc [4] aabbccc [5]

L(G) = {anbncm: n, m 1}

• Grammar G:

4/22

Page 5: Regulated Pushdown Automata

Regulated Grammars 2/2

S AC [1] aAbC [2] aAbCc [4] aabbCc [3] aabbcc [5]

L(G, ) = {anbncn: n 1}

• with , G does not generate aabbccc, because124345 = {1}{24}*{35}

• with , G generates aabbcc:

and 12435

5/22

Page 6: Regulated Pushdown Automata

PDA: Notation

pushdown symbol

• A PDA is based on a finite set of rules of the form:

Aqa xp

states

pushdown stringinput symbol or

6/22

Page 7: Regulated Pushdown Automata

New Concept: Regulated PDAs

1. Ssa Sas2. asa aas3. asb q4. aqb q5. Sqc Sq6. Sqc f

• = {12m34n5n6: m, n 0}

• PDA M:

7/22

Page 8: Regulated Pushdown Automata

Regulated PDAs 1/2

= {12m34n5n6: m, n 0}

Ssaabbccc Sasabbccc [1] Saasbbccc [2] Saqbccc [3] Sqccc [4] Sqcc [5] Sqc [5] f [6]

L(M) = {anbncm: n, m 1}

• PDA M:

1. Ssa Sas2. asa aas3. asb q4. aqb q5. Sqc Sq6. Sqc f

8/22

• Without , M accepts aabbccc:

Page 9: Regulated Pushdown Automata

Regulated PDAs 2/2

L(M, ) = {anbncn: n 1}

• with , M does not accept aabbccc because 1234556 = {12m34n5n6: m, n 0}

• with , M accepts aabbcc:

and 123456

Sasabbcc [1] Saasbbcc [2] Saqbcc[3] Sqcc [4] Sqc [5] f [6]

Ssaabbcc

9/22

Page 10: Regulated Pushdown Automata

Gist: Regulated PDAs• Consider a pushdown automaton, M, and control language, .• M accepts a string, x, if and only if contains a control string according to which M makes a sequence of moves so it reaches a final configuration after reading x.

10/22

Page 11: Regulated Pushdown Automata

Definition: Regulated PDA 1/4A pushdown automaton is a 7-tuple

M = (Q, , , R, s, S, F), where• Q is a finite set of states,• is an input alphabet,• is a pushdown alphabet,• R is a finite set of rules of the form:

Apa wq, where A , p,q Q, a {}, w *

• s Q is the start state• S is the start symbol• F Q is a set of final states

11/22

Page 12: Regulated Pushdown Automata

Definition: Regulated PDA 2/4• Let be an alphabet of rule labels. Let every rule Apa wq be labeled with a unique as

. Apa wq.

• A configuration of M, , is any string from *Q*

• For every x *, y *, and . Apa wq R, M makes a move from configuration xApay to configuration xwqy according to , written as

xApay xwqy []

12/22

Page 13: Regulated Pushdown Automata

Definition: Regulated PDA 3/4• Let be any configuration of M. M makes zero moves from to according to , written as

0 []

• Let there exist a sequence of configurations 0, 1, ..., n for some n 1 such that i-1 i [i], where i , for i = 1,...,n, then M makes n moves from 0 to n according to [1 …n], written as

0 n n [1... n]

13/22

Page 14: Regulated Pushdown Automata

Definition: Regulated PDA 3/4

• If for some n 0, 0 n n [1... n], we write 0 * n [1... n]

14/22

• Let be a control language over , that is, *. With , M accepts its language, L(M, ), as

L(M, ) = {w: w *, Ssw * f [], }

Page 15: Regulated Pushdown Automata

Language Families• LIN - the family of linear languages

• CF - the family of context-free languages

• RE - the family of recursively enumerable

languages

• RPD(REG) - the family of languages accepted

by PDAs regulated by regular

languages

• RPD(LIN) - the family of languages accepted

by PDAs regulated by linear languages

15/22

Page 16: Regulated Pushdown Automata

Theorem 1 and its Proof 1/2

RPD(REG) = CFProof:I. CF RPD(REG) is clear.

II. RPD(REG) CF:• Let L = L(M, ),

Regular languagePDA

• Let = L(G), G - regular grammar based on rules: A aB, A a

16/22

Page 17: Regulated Pushdown Automata

Theorem 1 and its Proof 2/2Transform M regulated by to a PDA N as follows:

1) for every a.Cqb xp from M and every A aB from G, add C<qA>b x<pB> to N2) for every a.Cqb xp from M and every A a from G, add C<qA>b x<pf> to N

3) The set of final states in N:{<pf>: p is a final state in M}

New symbol

17/22

Page 18: Regulated Pushdown Automata

Theorem 2

RPD(LIN) = RE

Proof:

• See [Meduna Alexander, Kolář Dušan:Regulated Pushdown Automata, Acta Cybernetica,Vol. 2000, No. 4, p. 653-664]

18/22

Page 19: Regulated Pushdown Automata

Simplification of RPDAs 1/2I. consider two consecutive moves made by a pushdown automaton, M.

If during the first move M does not shorten its pushdown and during the second move it does, then M makes a turn during the second move.

• A pushdown automaton is one-turn if it makes no more than one turn during any computation starting from an initial configuration.

19/22

Page 20: Regulated Pushdown Automata

One-Turn PDA: Illustration20/22

Moves

Len

gth

of

pu

shd

own

One-turn

Page 21: Regulated Pushdown Automata

Simplification of RPDAs 2/2II. During a move, an atomic regulated PDA changes a state and, in addition, performs exactly one of the following actions:

1. pushes a symbol onto the pushdown2. pops a symbol from the pushdown3. reads an input symbol

21/22

Page 22: Regulated Pushdown Automata

Theorem 3• Every L RE is accepted by an atomic one-turn PDA regulated by , where LIN.

Proof:

22/22

• See [Meduna Alexander, Kolář Dušan:One-Turn Regulated Pushdown Automata and Their Reduction, Fundamenta Informatica,Vol. 2002, No. 16, p. 399-405]

End