Random Context and Programmed Grammars of Finite Index Have The Same Generative Power Doc. RNDr. Alexander Meduna, CSc. Ing. Zbyněk Křivka DIFS, FIT, Brno.

Slides:



Advertisements
Similar presentations
Languages Generated by Programmed Grammars with Various Graphs
Advertisements

Erik Jonsson School of Engineering and Computer Science FEARLESS Engineering CS 4384 – 001 Automata Theory Thursday: Context-Free.
Translator Architecture Code Generator ParserTokenizer string of characters (source code) string of tokens abstract program string of integers (object.
1 Introduction to Computability Theory Lecture12: Decidable Languages Prof. Amos Israeli.
CS5371 Theory of Computation
Sets Definition of a Set: NAME = {list of elements or description of elements} i.e. B = {1,2,3} or C = {x  Z + | -4 < x < 4} Axiom of Extension: A set.
CS Master – Introduction to the Theory of Computation Jan Maluszynski - HT Lecture 4 Context-free grammars Jan Maluszynski, IDA, 2007
1 Converting NPDAs to Context-Free Grammars. 2 For any NPDA we will construct a context-free grammar with.
1 Grammars. 2 Grammars express languages Example: the English language.
Discussion #31/20 Discussion #3 Grammar Formalization & Parse-Tree Construction.
1 Reverse of a Regular Language. 2 Theorem: The reverse of a regular language is a regular language Proof idea: Construct NFA that accepts : invert the.
Fig. 3-1, p. 67. Fig. 3-2, p. 67 Fig. 3-3, p. 68.
Normal forms for Context-Free Grammars
Transparency No. P2C1-1 Formal Language and Automata Theory Part II Pushdown Automata and Context-Free Languages.
Lindenmayer Systems . Lindenmayer systems There is no distinction between terminal and non-terminal symbols. All the words derived from a given word.
1 Context-Free Languages. 2 Regular Languages 3 Context-Free Languages.
Lecture 9UofH - COSC Dr. Verma 1 COSC 3340: Introduction to Theory of Computation University of Houston Dr. Verma Lecture 9.
Context-Free Grammars Chapter 3. 2 Context-Free Grammars and Languages n Defn A context-free grammar is a quadruple (V, , P, S), where  V is.
Context-free Grammars
1 PDAs Accept Context-Free Languages. 2 Context-Free Languages (Grammars) Languages Accepted by PDAs Theorem:
Problem of the DAY Create a regular context-free grammar that generates L= {w  {a,b}* : the number of a’s in w is not divisible by 3} Hint: start by designing.
Lecture 21: Languages and Grammars. Natural Language vs. Formal Language.
Formal Grammars Denning, Sections 3.3 to 3.6. Formal Grammar, Defined A formal grammar G is a four-tuple G = (N,T,P,  ), where N is a finite nonempty.
CSCI 4325 / 6339 Theory of Computation Zhixiang Chen Department of Computer Science University of Texas-Pan American.
Scattered Context Grammars Alexander Meduna Faculty of Information Technology Brno University of Technology Brno, Czech Republic, Europe.
DIPLOMA THESIS Peter Černo Clearing Restarting Automata Supervised by RNDr. František Mráz, CSc.
::ICS 804:: Theory of Computation - Ibrahim Otieno SCI/ICT Building Rm. G15.
1 Homework #7 (Models of Computation, Spring, 2001) Due: Section 1; April 16 (Monday) Section 2; April 17 (Tuesday) 2. Covert the following context-free.
Context-Free Grammars Normal Forms Chapter 11. Normal Forms A normal form F for a set C of data objects is a form, i.e., a set of syntactically valid.
Context-Free Grammars – Chomsky Normal Form Lecture 16 Section 2.1 Wed, Sep 26, 2007.
Pushdown Automata CS 130: Theory of Computation HMU textbook, Chap 6.
Pushdown Automata (PDAs)
Context Free Grammars CIS 361. Introduction Finite Automata accept all regular languages and only regular languages Many simple languages are non regular:
Regulated Pushdown Automata Alexander Meduna 1/22 Faculty of Information Technology Brno University of Technology Brno, Czech Republic, Europe.
Part VII. Models for Context-Free Languages 1/50.
Complexity and Computability Theory I Lecture #9 Instructor: Rina Zviel-Girshin Lea Epstein.
Phrase-structure grammar A phrase-structure grammar is a quadruple G = (V, T, P, S) where V is a finite set of symbols called nonterminals, T is a set.
Regular Grammars Chapter 7. Regular Grammars A regular grammar G is a quadruple (V, , R, S), where: ● V is the rule alphabet, which contains nonterminals.
Grammar G = (V N, V T, P, S) –V N : Nonterminal symbols –V T : Terminal symbols V N  V T = , V N ∪ V T = V – P : a finite set of production rules α 
Parsing Introduction Syntactic Analysis I. Parsing Introduction 2 The Role of the Parser The Syntactic Analyzer, or Parser, is the heart of the front.
Midterm 1 Breakdown >79 3 >29 7 >69 5 >19 5 >59 7 >49 9 >39 7.
Regular Grammars Chapter 7 1. Regular Grammars A regular grammar G is a quadruple (V, , R, S), where: ● V is the rule alphabet, which contains nonterminals.
Deep Pushdown Automata Alexander Meduna Brno University of Technology, Czech Republic  Based on Meduna, A.: Deep Pushdown Automata,
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.
1 Simplification of Context-Free Grammars Some useful substitution rules. Removing useless productions. Removing -productions. Removing unit-productions.
1 Chapter 6 Simplification of CFGs and Normal Forms.
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.
CSC312 Automata Theory Lecture # 26 Chapter # 12 by Cohen Context Free Grammars.
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.
9/15/2010CS485, Lecture 2, Fall Lecture 2: Introduction to Syntax (Revised based on the Tucker’s slides)
How YACC is constructed. How Yacc works To construct a parsing machine for arithmetic expressions, a special case considered to simplify the account of.
Chapter 4: Syntax analysis Syntax analysis is done by the parser. –Detects whether the program is written following the grammar rules and reports syntax.
CSCI 4325 / 6339 Theory of Computation Zhixiang Chen Department of Computer Science University of Texas-Pan American.
1 CDT314 FABER Formal Languages, Automata and Models of Computation Lecture 8 Mälardalen University 2011.
Unrestricted Grammars
Refining the Nonterminal Complexity of Graph-controlled Grammars Faculty of Informatics TU Wien, Wien, Austria Rudolf FREUND Wilhelm-Schickard-Institut.
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 15 Ambiguous Grammars Topics: Context Free Grammars Language generated by a grammar Proofs with L(G) Ambiguous grammars October 20, 2008 CSCE 355.
Organization of Programming Languages Meeting 3 January 15, 2016.
Chapter 2. Formal Languages Dept. of Computer Engineering, Hansung University, Sung-Dong Kim.
Formal Language & Automata Theory
L-systems L-systems are grammatical systems introduced by Lyndenmayer to describe biological developments such as the growth of plants and cellular organisms.
Context free grammar.
CS314 – Section 5 Recitation 3
PARSE TREES.
Course 2 Introduction to Formal Languages and Automata Theory (part 2)
Chapter 7 Regular Grammars
Decidability continued….
Presentation transcript:

Random Context and Programmed Grammars of Finite Index Have The Same Generative Power Doc. RNDr. Alexander Meduna, CSc. Ing. Zbyněk Křivka DIFS, FIT, Brno University of Technology, Czech Republic

Contents Introduction, Motivation Preliminaries: –Programmed Grammars, –Random Context Grammars, –Finite Index Families of Languages & Relationships Main Result Conclusion, Discussion

A quadruple G = (V, T, P, S), where: –V … total alphabet (a finite set of symbols) –T … alphabet of terminals –P … set of rules of the form: p: A  x, where A  (V – T), x  V* and p is a unique label of the rule –S … axiom (the starting nonterminal) Derivation step: uAv  uxv [p: A  x], where u,v,x  V*, A  (V – T) Language: L(G) = { w | S  * w, w  T* }. Context-free Grammar

Created in sixtieth of 20th century Modified form of the rules: –p:  A  x, g(p) , where A  (V – T), x  V* –g(p) is a set of rule labels Derivation step: uAv  uxv [p] = wBz  wyz [q], where q  g(p), u,v,w,z,x,y  V*, A,B  (V – T) –For every used rule is given set of next potentially applicable rules Programmed Grammar

Random Context Grammar Created in sixtieth of 20th century Modified form of the rules: –p:  A i  x, f(p) , where A i  (V – T), x  V* –f(p)  (V – T) is a set of nonterminals called permitting context Derivation step: u 0 A 1 u 1 …u i-1 A i u i …u n-1 A n u n  u 0 A 1 …u i-1 xu i …A n u n [p], where u 0,u 1,…, u n  V*, {A 1,…,A n }= f(p) –Rule p is applicable if sentential form contains all nonterminals from f(p).

Grammar of Finite Index For a derivation S  * x, such that w 0  w 1  …  w n, where n  1, w i  V*, 1  i  n, S = w 0, w n = x, x  T* Ind(S  * x, G) = max { occur(w i,V – T) | 1  i  n } G of index k – the smallest positive integer that every word x  L(G) satisfies Ind( S  *x,G)  k. G of finite index – exists some k  1 such that G is of index k.

Families of Languages P finac RC finac P fin P EDT0L RC fin SM LIN ? CF 1989

Main Result P finac RC finac P fin P EDT0L RC fin SM LIN ? CF Our result, but…

Main Result P finac RC finac P fin P EDT0L RC fin SM LIN ? CF K fin Our alternative way of the proof 1996

Main Result - Theorem Theorem: P fin = RC fin 1989 [Dassow, Paun] : RC fin  P fin 1996 [Fernau, Holzer] : K fin = P fin …NOT USED Second direction of inclusion proved by construction.

Basic Idea Nonterminals of form  p q, A, j, h  4 essential atomical steps of the algorithm: 1)Inside of all nonterminals update h to h+m-1 (number after application of p). 2)In nonterminals following rewritten nonterminal, change their positions. 3)Rewrite a nonterminal by chosen rule p. 4)Choose next rule q to be applied as would the programmed grammar do.

Example of Simulation 1 Step in Programmed Grammar of index k: x 0 Ax 1 Bx 2 Cx 3  x 0 Ax 1 yx 2 Cx 3 [p:B  y,{q}] Simulation in Random Context Grammar of index k: x 0  p,A,1,3  x 1  p,B,2,3  x 2  p,C,3,3  x 3  x 0  p q,A,1,2  x 1  p,B,2,3  x 2  p,C,3,3  x 3  x 0  p q,A,1,2  x 1  p q,B‘,2,2  x 2  p,C,3,3  x 3  x 0  p q,A,1,2  x 1  p q,B‘,2,2  x 2  p q,C,2,2  x 3  x 0  p q,A,1,2  x 1 y x 2  p q,C,2,2  x 3  x 0  q,A,1,2  x 1 y x 2  p q,C,2,2  x 3  x 0  q,A,1,2  x 1 y x 2  q,C,2,2  x 3 where x 0,…,x 3,y  T*, A,B,C  (V PG – T)*,  …   (V RC – T)*

Conclusion Alternative way of the proof P fin =RC fin. A Practical usage of this result ? Other open problems in theory of regulated grammars of finite index Thank you for your attention!