Regulated Pushdown Automata Alexander Meduna 1/22 Faculty of Information Technology Brno University of Technology Brno, Czech Republic, Europe.

Slides:



Advertisements
Similar presentations
Chapter 5 Pushdown Automata
Advertisements

Pushdown Automata Chapter 12. Recognizing Context-Free Languages Two notions of recognition: (1) Say yes or no, just like with FSMs (2) Say yes or no,
CFGs and PDAs Sipser 2 (pages ). Long long ago…
Pushdown Automata Part II: PDAs and CFG Chapter 12.
PDAs => CFGs Sipser 2.2 (pages ). Last time…
CFGs and PDAs Sipser 2 (pages ). Last time…
PDAs => CFGs Sipser 2.2 (pages ). Last time…
CFG => PDA Sipser 2 (pages ).
CFG => PDA Sipser 2 (pages ). CS 311 Fall Formally… A pushdown automaton is a sextuple M = (Q, Σ, Γ, δ, q 0, F), where – Q is a finite set.
CS5371 Theory of Computation
CS 302: Discrete Math II A Review. An alphabet Σ is a finite set (e.g., Σ = {0,1}) A string over Σ is a finite-length sequence of elements of Σ For x.
Introduction to the Theory of Computation John Paxton Montana State University Summer 2003.
CS Master – Introduction to the Theory of Computation Jan Maluszynski - HT Lecture 4 Context-free grammars Jan Maluszynski, IDA, 2007
Foundations of (Theoretical) Computer Science Chapter 2 Lecture Notes (Section 2.2: Pushdown Automata) Prof. Karen Daniels, Fall 2009 with acknowledgement.
Pushdown Automaton (PDA)
79 Regular Expression Regular expressions over an alphabet  are defined recursively as follows. (1) Ø, which denotes the empty set, is a regular expression.
CS5371 Theory of Computation Lecture 8: Automata Theory VI (PDA, PDA = CFG)
1 Pushdown Automata PDAs. 2 Pushdown Automaton -- PDA Input String Stack States.
FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY
CS 3240: Languages and Computation Pushdown Automata & CF Grammars NOTE: THESE ARE ONLY PARTIAL SLIDES RELATED TO WEEKS 9 AND 10. PLEASE REFER TO THE TEXTBOOK.
Final Exam Review Cummulative Chapters 0, 1, 2, 3, 4, 5 and 7.
1 CD5560 FABER Formal Languages, Automata and Models of Computation Lecture 8 Mälardalen University 2010.
CSCI 2670 Introduction to Theory of Computing September 21, 2005.
Scattered Context Grammars Alexander Meduna Faculty of Information Technology Brno University of Technology Brno, Czech Republic, Europe.
Chapter 7 PDA and CFLs.
Pushdown Automata (PDA) Intro
CSCI 2670 Introduction to Theory of Computing September 20, 2005.
Pushdown Automata CS 130: Theory of Computation HMU textbook, Chap 6.
Pushdown Automata (PDAs)
Pushdown Automata Part I: PDAs Chapter Recognizing Context-Free Languages Two notions of recognition: (1) Say yes or no, just like with FSMs (2)
Part VII. Models for Context-Free Languages 1/50.
Push-down Automata Section 3.3 Fri, Oct 21, 2005.
Deep Pushdown Automata Alexander Meduna Brno University of Technology, Czech Republic  Based on Meduna, A.: Deep Pushdown Automata,
1 CD5560 FABER Formal Languages, Automata and Models of Computation Lecture 11 Midterm Exam 2 -Context-Free Languages Mälardalen University 2005.
1 CDT314 FABER Formal Languages, Automata and Models of Computation Lecture 6 Mälardalen University 2010.
1 A well-parenthesized string is a string with the same number of (‘s as )’s which has the property that every prefix of the string has at least as many.
CS 208: Computing Theory Assoc. Prof. Dr. Brahim Hnich Faculty of Computer Sciences Izmir University of Economics.
Foundations of (Theoretical) Computer Science Chapter 2 Lecture Notes (Section 2.2: Pushdown Automata) Prof. Karen Daniels, Fall 2010 with acknowledgement.
Grammars A grammar is a 4-tuple G = (V, T, P, S) where 1)V is a set of nonterminal symbols (also called variables or syntactic categories) 2)T is a finite.
Introduction Finite Automata accept all regular languages and only regular languages Even very simple languages are non regular (  = {a,b}): - {a n b.
1 Pushdown Automata There are context-free languages that are not regular. Finite automata cannot recognize all context-free languages.
CSCI 3130: Automata theory and formal languages Andrej Bogdanov The Chinese University of Hong Kong Pushdown.
Formal Languages, Automata and Models of Computation
1/44 #-Rewriting Systems Based upon Brno University of Technology, Czech Republic  Křivka, Z., Meduna, A., Schönecker, R.: Generation.
Mathematical Foundations of Computer Science Chapter 3: Regular Languages and Regular Grammars.
Algorithms for hard problems Automata and tree automata Juris Viksna, 2015.
Pushdown Automata Hopcroft, Motawi, Ullman, Chap 6.
FORMAL LANGUAGES, AUTOMATA, AND COMPUTABILITY
1 CDT314 FABER Formal Languages, Automata and Models of Computation Lecture 8 Mälardalen University 2011.
1 A well-parenthesized string is a string with the same number of (‘s as )’s which has the property that every prefix of the string has at least as many.
Lecture 6: Context-Free Languages
Pushdown Automata Chapter 12. Recognizing Context-Free Languages Two notions of recognition: (1) Say yes or no, just like with FSMs (2) Say yes or no,
1 Chapter Pushdown Automata. 2 Section 12.2 Pushdown Automata A pushdown automaton (PDA) is a finite automaton with a stack that has stack operations.
Akram Salah ISSR Basic Concepts Languages Grammar Automata (Automaton)
1 Section 12.2 Pushdown Automata A pushdown automaton (PDA) is a finite automaton with a stack that has stack operations pop, push, and nop. PDAs always.
Theory of Languages and Automata By: Mojtaba Khezrian.
CS6800 Advance Theory of Computation Spring 2016 Nasser Alsaedi
Lecture 11  2004 SDU Lecture7 Pushdown Automaton.
Pushdown Automata - like NFA-  but also has a stack - transition takes the current state, the current input symbol, and the top-of-the-stack symbol (which.
CSCI 2670 Introduction to Theory of Computing September 22, 2004.
Recap: Nondeterministic Finite Automaton (NFA) A deterministic finite automaton (NFA) is a 5-tuple (Q, , ,s,F) where: Q is a finite set of elements called.
Formal Languages, Automata and Models of Computation
Pushdown Automata PDAs
AUTOMATA THEORY VI.
REGULAR LANGUAGES AND REGULAR GRAMMARS
A HIERARCHY OF FORMAL LANGUAGES AND AUTOMATA
Context-free Languages
Chapter 7 Regular Grammars
Chapter 2 Context-Free Language - 01
Presentation transcript:

Regulated Pushdown Automata Alexander Meduna 1/22 Faculty of Information Technology Brno University of Technology Brno, Czech Republic, Europe

Fundamental References Meduna Alexander, Kolář Dušan: Regulated Pushdown Automata, Acta Cybernetica, Vol. 2000, No. 4, p Meduna Alexander, Kolář Dušan: One-Turn Regulated Pushdown Automata and Their Reduction, Fundamenta Informatica, Vol. 2002, No. 16, p /22

Inspiration: Regulated Grammars Grammar G: 1. S  AC 2. A  aAb 3. A  ab 4. C  Cc 5. C  c  = {1}{24} * {35} 3/22

Regulated Grammars 1/2 1. S  AC 2. A  aAb 3. A  ab 4. C  Cc 5. C  c  = {1}{24} * {35} Without , G generates aabbccc: S  AC[1]  aAbC[2]  aAbCc[4]  aabbCc[3]  aabbCcc[4]  aabbccc[5] L(G) = {a n b n c m : n, m  1} Grammar G: 4/22

Regulated Grammars 2/2 S  AC[1]  aAbC[2]  aAbCc[4]  aabbCc[3]  aabbcc [5] L(G,  ) = {a n b n c n : n  1} with , G does not generate aabbccc, because   = {1}{24} * {35} with , G generates aabbcc: and   5/22

PDA: Notation pushdown symbol A PDA is based on a finite set of rules of the form: Aqa  xpAqa  xp states pushdown string input symbol or  6/22

New Concept: Regulated PDAs 1. Ssa  Sas 2. asa  aas 3. asb  q 4. aqb  q 5. Sqc  Sq 6. Sqc  f  = {12 m 34 n 5 n 6: m, n  0 } PDA M: 7/22

Regulated PDAs 1/2  = {12 m 34 n 5 n 6: m, n  0} Ssaabbccc  Sasabbccc [1]  Saasbbccc[2]  Saqbccc[3]  Sqccc [4]  Sqcc [5]  Sqc [5]  f [6] L(M) = {a n b n c m : n, m  1} PDA M: 1. Ssa  Sas 2. asa  aas 3. asb  q 4. aqb  q 5. Sqc  Sq 6. Sqc  f 8/22 Without , M accepts aabbccc:

Regulated PDAs 2/2 L(M,  ) = {a n b n c n : n  1} with , M does not accept aabbccc because   = {12 m 34 n 5 n 6: m, n  0} with , M accepts aabbcc: and    Sasabbcc [1]  Saasbbcc[2]  Saqbcc[3]  Sqcc[4]  Sqc [5]  f [6] Ssaabbcc 9/22

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

Definition: Regulated PDA 1/4 A 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, Ris 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

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

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

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 [  ],    }

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

Theorem 1 and its Proof 1/2 RPD(REG) = CF Proof: 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

Theorem 1 and its Proof 2/2 Transform 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 b  x to N 2) for every a.Cqb  xp from M and every A  a from G, add C b  x to N 3) The set of final states in N: { : p is a final state in M} New symbol 17/22

Theorem 2 RPD(LIN) = RE Proof: See [ Meduna Alexander, Kolář Dušan: Regulated Pushdown Automata, Acta Cybernetica,Vol. 2000, No. 4, p ] 18/22

Simplification of RPDAs 1/2 I. 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

One-Turn PDA: Illustration 20/22 Moves Length of pushdown One-turn

Simplification of RPDAs 2/2 II. 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 pushdown 2. pops a symbol from the pushdown 3. reads an input symbol 21/22

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 ] End