130 likes | 262 Views
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, B rno U niversity of T echnology , Czech Republic. Contents. Introduction, Motivation Preliminaries: Programmed Grammars,
E N D
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
Context-free Grammar • 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), xV* and p is a unique label of the rule • S … axiom (the starting nonterminal) • Derivation step:uAv uxv [p: A x], where u,v,xV*, A(V – T) • Language: L(G) = { w | S * w, wT* }.
Programmed Grammar • Created in sixtieth of 20th century • Modified form of the rules: • p: A x, g(p), where A(V – T), xV* • 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,yV*, A,B(V – T) • For every used rule is given set of next potentially applicable rules
Random Context Grammar • Created in sixtieth of 20th century • Modified form of the rules: • p: Ai x, f(p), where Ai(V – T), xV* • f(p) (V – T) is a set of nonterminals called permitting context • Derivation step:u0A1u1…ui-1Aiui…un-1Anun u0A1…ui-1xui…Anun[p], where u0,u1,…, unV*, {A1,…,An}= 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 w0 w1 … wn, where n 1, wiV*, 1 i n, S = w0, wn = x, xT* • Ind(S* x, G) = max { occur(wi,V – T) | 1 i n } • G of index k – the smallest positive integer that every word xL(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 EDT0L ? CF acPfin Pfin acRCfin 1989 SMLIN RCfin
Main Result P EDT0L ? CF acPfin Pfin acRCfin Our result, but… SMLIN RCfin
Main Result P EDT0L Kfin ? CF 1996 acPfin Pfin acRCfin Our alternative way of the proof SMLIN RCfin
Main Result - Theorem Theorem: Pfin = RCfin 1989[Dassow, Paun]: RCfinPfin 1996[Fernau, Holzer]: Kfin=Pfin…NOT USED Second direction of inclusion proved by construction.
Basic Idea • Nonterminals of form pq, A, j, h • 4 essential atomical steps of the algorithm: • Inside of all nonterminals update h to h+m-1 (number after application of p). • In nonterminals following rewritten nonterminal, change their positions. • Rewrite a nonterminal by chosen rule p. • Choose next rule q to be applied as would the programmed grammar do.
Example of Simulation • 1 Step in Programmed Grammar of index k: x0Ax1Bx2Cx3 x0Ax1yx2Cx3 [p:B y,{q}] • Simulation in Random Context Grammar of index k:x0 p,A,1,3 x1 p,B,2,3 x2 p,C,3,3 x3x0 pq,A,1,2 x1 p,B,2,3 x2 p,C,3,3 x3 x0 pq,A,1,2 x1 pq,B‘,2,2 x2 p,C,3,3 x3 x0 pq,A,1,2 x1 pq,B‘,2,2 x2 pq,C,2,2 x3 x0 pq,A,1,2 x1 y x2 pq,C,2,2 x3 x0q,A,1,2x1 y x2pq,C,2,2x3 x0q,A,1,2x1 y x2q,C,2,2x3 • where x0,…,x3,yT*, A,B,C(VPG – T)*, …(VRC – T)*
Conclusion • Alternative way of the proof Pfin=RCfin. • A Practical usage of this result ? • Other open problems in theory of regulated grammars of finite index Thank you for your attention!