4.3. General Phrase-Structure Grammars 4.3

Total Page:16

File Type:pdf, Size:1020Kb

4.3. General Phrase-Structure Grammars 4.3 4. Turing Machines and R. E. and Context-Sensitive Languages 4.3. General Phrase-Structure Grammars 4.3. General Phrase-Structure Grammars A phrase-structure grammar is a 4-tupleG=(N,T,S,P), where P (N T) (N T) is afinite semi-Thue system onN T such ⊆ ∪ ∗ × ∪ ∗ ∪ that � 1 for all(� r) P (see Section 2). | | N ≥ → ∈ Theorem 4.20 For each phrase-structure grammar G, the language L(G) is recursively enumerable. Proof. ForG=(N,T,S,P) we describe a 2-tape-NTMM that accepts the languageL(G): The inputw is stored on tape 1, and on tape 2, M guesses a derivation ofG, starting fromS. As soon as a terminal wordz has been generated on tape 2,M checks whetherz=w holds. In the affirmative,M halts, while in the negative, M enters an infinite loop. Hence,L(M)=L(G). Prof. Dr. F. Otto (Universität Kassel) Automata and Grammars 269 / 294 4. Turing Machines and R. E. and Context-Sensitive Languages 4.3. General Phrase-Structure Grammars Theorem 4.21 If L is a recursively enumerable language, then there exists a phrase-structure grammar G such that L(G)=L. Proof. LetL Σ be r.e., and letM=(Q,Σ,Γ,✷,δ,q ,q ) be a 1-TM ⊆ ∗ 0 1 s.t.L(M)=L. We construct a grammerG=(N,Σ,A 1,P) by taking N := ((Σ ε ) Γ) Q A ,A ,A , ∪{ } × ∪ ∪{ 1 2 3} and definingP as follows: (1)A q A , (4)A [ε,✷]A , 1 → 0 2 3 → 3 (2)A [a,a]A for alla Σ, (5)A ε. 2 → 2 ∈ 3 → (3)A A , 2 → 3 Using these productionsG generates a sentential form q [a ,a ][a ,a ] [a ,a ][ε,✷] [ε,✷] 0 1 1 2 2 ··· n n ··· for a wordw=a a a Σ . This sentential form encodes the initial 1 2 ··· n ∈ ∗ configuration of the TMM on inputw. Prof. Dr. F. Otto (Universität Kassel) Automata and Grammars 270 / 294 4. Turing Machines and R. E. and Context-Sensitive Languages 4.3. General Phrase-Structure Grammars Proof of Theorem 4.21 (cont.) Further,P contains the following productions for simulatingM: (6) q[a,X] [a,Y]p, ifδ(q,X)=(p,Y,R), → (7) [b,Z]q[a,X] p[b,Z][a,Y] for allb Σ ε andZ Γ, → ∈ ∪{ } ∈ ifδ(q,X)=(p,Y,L), (8) q[a,X] p[a,Y], ifδ(q,X)=(p,Y,0). → Ifq w✷ m upv holds for someu,v Γ ,p Q, andm 0, then 0 �M∗ ∈ ∗ ∈ ≥ m q [a ,a ][a ,a ] [a ,a ][ε,✷] ∗ 0 1 1 2 2 ··· n n →P [a1,u 1] [a k ,u k ]p[ak+1 ,v 1] [a n,v n k ][ε,v n k+1 ] [ε,v n+m k ], ··· ··· − − ··· − whereu=u 1u2 ...u k andv=v 1v2 ...v n+m k . − Prof. Dr. F. Otto (Universität Kassel) Automata and Grammars 271 / 294 4. Turing Machines and R. E. and Context-Sensitive Languages 4.3. General Phrase-Structure Grammars Proof of Theorem 4.21 (cont.) Finally,P also contains some productions for treating halting configurations: [a,X]q q aq 1 → 1 1 (9) q [a,X] q aq for alla Σ ε andX Γ. 1 → 1 1 ∈ ∪{ } ∈ q ε 1 → Ifq w ∗ uq v, that is, ifw L(M), then: 0 � M 1 ∈ A q [a ,a ][a ,a ] [a ,a ][ε,✷] m 1 →∗ 0 1 1 2 2 ··· n n ∗ [a1,u 1] [a k ,u k ]q1[ak+1 ,v 1] [a n,v n k ] [ε,v n+m k ] → ··· ··· − ··· − a a a =w, →∗ 1 2 ··· n which shows thatL(M) L(G). ⊆ Conversely, ifw L(G), then we see from the construction above that ∈ M halts on inputw, which implies thatL(G)=L(M). Prof. Dr. F. Otto (Universität Kassel) Automata and Grammars 272 / 294 4. Turing Machines and R. E. and Context-Sensitive Languages 4.3. General Phrase-Structure Grammars Corollary 4.22 A language L is recursively enumerable if and only if it is generated by a phrase-structure grammar. From the various characterizations of the class of r.e. languages, we obtain the following closure properties. Corollary 4.23 (a) The class RE is closed under union, intersection, product, Kleene star, reversal, and inverse morphisms. (b) The class RE is not closed under complementation. Prof. Dr. F. Otto (Universität Kassel) Automata and Grammars 273 / 294 4. Turing Machines and R. E. and Context-Sensitive Languages 4.4. Context-Sensitive Languages 4.4. Context-Sensitive Languages A grammarG=(N,T,S,P) is context-sensitive if each production (� r) P has the formαXβ αuβ, whereX N, → ∈ → ∈ α,β,u (N T) , andu=ε. In addition,G may contain the production ∈ ∪ ∗ � (S ε), ifS does not occur on the right-hand side of any production. → A languageL is called context-sensitive if there exists a context-sensitive grammarG such thatL=L(G). By CSL(Σ) we denote the set of all context-sensitive languages onΣ, and CSL denotes the class of all context-sensitive languages. A grammarG=(N,T,S,P) is called monotone if � r holds for | |≤| | each production(� r) P. Also a monotone grammar may contain → ∈ the production(S ε) ifS does not occur on the right-hand side of → any production. Prof. Dr. F. Otto (Universität Kassel) Automata and Grammars 274 / 294 4. Turing Machines and R. E. and Context-Sensitive Languages 4.4. Context-Sensitive Languages Theorem 4.24 (a) For each context-sensitive grammar G, there is a monotone grammar G� such that L(G�) =L(G) (b) For each monotone grammar G�, there is a context-sensitive grammar G such that L(G)=L(G �). Proof. (a) (b): By definition each context-sensitive grammar is monotone. ⇒ (b) (a): LetG = (N ,T,S ,P ) be a monotone grammar. ⇒ � � � � FromG � we constructG �� = (N��,T,S �,P ��) by taking N�� :=N � A a T andP �� :=h(P �) A a a T , ∪{ a | ∈ } ∪{ a → | ∈ } whereh is defined throughA A(A N ) anda A (a T). �→ ∈ � �→ a ∈ G�� is monotone, and all the new productions are context-sensitive. It remains to replace the productions inh(P �) by context-sensitive productions. Prof. Dr. F. Otto (Universität Kassel) Automata and Grammars 275 / 294 4. Turing Machines and R. E. and Context-Sensitive Languages 4.4. Context-Sensitive Languages Proof of Theorem 4.24 (cont.) LetA A B B (2 m n) be a production fromh(P ), 1 ··· m → 1 ··· n ≤ ≤ � whereA ,B N . We introduce new nonterminalsZ ,Z ,...,Z and i j ∈ �� 1 2 m replace the above production by the following ones: A A Z A A 1 ··· m → 1 2 ··· m Z1A2 A m Z 1Z2A3 A m ··· →. ··· . Z1Z2 Z m 1Am Z 1 Z mBm+1 B n ··· − → ··· ··· Z1 Z mBm+1 B n B 1Z2 Z mBm+1 B n ··· ··· →. ··· ··· . B1 B m 1ZmBm+1 B n B 1 B m 1BmBm+1 B n. ··· − ··· → ··· − ··· The new productions are context-sensitive. It’s obvious that they simulate the old production. On the other hand, the new productions can only be used for this purpose, as the new nonterminals Z1,Z 2,...,Z m do not occur in any other production. By repeating the process above for each production fromh(P �), we obtain a context-sensitive grammarG such thatL(G)=L(G �) Prof. Dr. F. Otto (Universität Kassel) Automata and Grammars 276 / 294 4. Turing Machines and R. E. and Context-Sensitive Languages 4.4. Context-Sensitive Languages Example. LetG be the following monotone grammar: G=( S,B , a,b,c ,S, S aSBc,S abc, cB Bc, bB bb ). { } { } { → → → → } We claim thatL(G)=L := a nbncn n 1 . { | ≥ } Claim 1: L L(G). ⊆ Proof of Claim 1. We show thata nbncn L(G) by induction onn. ∈ Forn= 1, we haveS abc. → Assume thatS anbncn has been shown for somen 1. → ∗ ≥ We consider the following derivation: n n n n+1 n n+1 n+1 n+1 n+1 S aSBc ∗ a a b c Bc ∗ a b Bc a b c . → → · · → → Prof. Dr. F. Otto (Universität Kassel) Automata and Grammars 277 / 294 4. Turing Machines and R. E. and Context-Sensitive Languages 4.4. Context-Sensitive Languages Example (cont.) Claim 2: L(G) L. ⊆ Proof of Claim 2. By applying production 1 repeatedly, we obtain a sentential form anS(Bc) n, which is rewritten into a sentential forma nSα by production 3, whereα B,c + and α = α =n. ∈{ } | | B | | c In order to get rid ofS, production 2 must be applied, that is, we obtaina nSα a n+1bcα. → To get rid of all nonterminalsB inα, all occurrences ofc must be moved to the right and then allB are rewritten intob by production 4, that is,a n+1bcα an+1bBncn+1 an+1bn+1cn+1. → ∗ →∗ Hence,L(G) L. ⊆ Together Claims 1 and 2 show thatL(G)=L. Prof. Dr. F. Otto (Universität Kassel) Automata and Grammars 278 / 294 4. Turing Machines and R. E. and Context-Sensitive Languages 4.4. Context-Sensitive Languages Each context-free grammar in CNF (Theorem 3.9) is context-sensitive. On the other hand, a nbncn n 1 CFL (see thefirst example { | ≥ } �∈ after Theorem 3.14). Corollary 4.25 CFL� CSL. A grammarG=(N,T,S,P) is in Kuroda Normal Form, if it only contains productions of the following forms: (A a),(A BC),(AB CD), wherea T andA,B,C,D N. → → → ∈ ∈ With respect to the production(S ε), we have the same restriction → as before. Theorem 4.26 Given a context-sensitive grammar G, one can effectively construct an equivalent context-sensitive grammar G� that is in Kuroda Normal Form.
Recommended publications
  • Formal Languages and Automata Theory Géza Horváth, Benedek Nagy Szerzői Jog © 2014 Géza Horváth, Benedek Nagy, University of Debrecen
    Formal Languages and Automata Theory Géza Horváth, Benedek Nagy Created by XMLmind XSL-FO Converter. Formal Languages and Automata Theory Géza Horváth, Benedek Nagy Szerzői jog © 2014 Géza Horváth, Benedek Nagy, University of Debrecen Created by XMLmind XSL-FO Converter. Tartalom Formal Languages and Automata Theory .......................................................................................... vi Introduction ...................................................................................................................................... vii 1. Elements of Formal Languages ...................................................................................................... 1 1. 1.1. Basic Terms .................................................................................................................... 1 2. 1.2. Formal Systems .............................................................................................................. 2 3. 1.3. Generative Grammars .................................................................................................... 5 4. 1.4. Chomsky Hierarchy ....................................................................................................... 6 2. Regular Languages and Finite Automata ...................................................................................... 12 1. 2.1. Regular Grammars ....................................................................................................... 12 2. 2.2. Regular Expressions ....................................................................................................
    [Show full text]
  • INF2080 Context-Sensitive Langugaes
    INF2080 Context-Sensitive Langugaes Daniel Lupp Universitetet i Oslo 15th February 2017 Department of University of Informatics Oslo INF2080 Lecture :: 15th February 1 / 20 Context-Free Grammar Definition (Context-Free Grammar) A context-free grammar is a 4-tuple (V ; Σ; R; S) where 1 V is a finite set of variables 2 Σ is a finite set disjoint from V of terminals 3 R is a finite set of rules, each consisting of a variable and of a string of variables and terminals 4 and S is the start variable Rules are of the form A ! B1B2B3 ::: Bm, where A 2 V and each Bi 2 V [ Σ. INF2080 Lecture :: 15th February 2 / 20 consider the following toy programming language, where you can “declare” and “assign” a variable a value. S ! declare v; S j assign v : x; S this is context-free... but what if we only want to allow assignment after declaration and an infinite amount of variable names? ! context-sensitive! Why Context-Sensitive? Many building blocks of programming languages are context-free, but not all! INF2080 Lecture :: 15th February 3 / 20 this is context-free... but what if we only want to allow assignment after declaration and an infinite amount of variable names? ! context-sensitive! Why Context-Sensitive? Many building blocks of programming languages are context-free, but not all! consider the following toy programming language, where you can “declare” and “assign” a variable a value. S ! declare v; S j assign v : x; S INF2080 Lecture :: 15th February 3 / 20 but what if we only want to allow assignment after declaration and an infinite amount of variable names? ! context-sensitive! Why Context-Sensitive? Many building blocks of programming languages are context-free, but not all! consider the following toy programming language, where you can “declare” and “assign” a variable a value.
    [Show full text]
  • Automata and Grammars
    Automata and Grammars Prof. Dr. Friedrich Otto Fachbereich Elektrotechnik/Informatik, Universität Kassel 34109 Kassel, Germany E-mail: [email protected] SS 2018 Prof. Dr. F. Otto (Universität Kassel) Automata and Grammars 1 / 294 Lectures and Seminary SS 2018 Lectures: Thursday 9:00 - 10:30, Room S 11 Start: Thursday, February 22, 2018, 9:00. Seminary: Thursday 10:40 - 12:10, Room S 11 Start: Thursday, February 22, 2018, 10:40. Prof. Dr. F. Otto (Universität Kassel) Automata and Grammars 2 / 294 Exercises: From Thursday to Thursday next week! To pass seminary: At least two successful presentations in class (10 %) and passing of midtem exam on April 5 (10:40 - 11:40) (20 %) Final Exam: (dates have been fixed!) Written exam (2 hours) on May 31 (9:00 - 11:30) in S 11 Oral exam (30 minutes per student) on June 14 (9:00 - 12:30) in S 10 Written exam (2. try) on June 21 (9:00 - 11:30) in S 11 Oral exam (2. try) on June 28 (9:00 - 12:30) in S 11 The written exam accounts for 50 % of the final grade, while the oral exam accounts for 20 % of the final grade. Moodle: Course ”Automata and Grammars” NTIN071. Prof. Dr. F. Otto (Universität Kassel) Automata and Grammars 3 / 294 Literature: P.J. Denning, J.E. Dennis, J.E. Qualitz; Machines, Languages, and Computation. Prentice-Hall, Englewood Cliffs, N.J., 1978. M. Harrison; Introduction to Formal Language Theory. Addison-Wesley, Reading, M.A., 1978. J.E. Hopcroft, R. Motwani, J.D. Ullman; Introduction to Automata Theory, Languages, and Computation.
    [Show full text]
  • Languages Generated by Context-Free and Type AB → BA Rules
    Magyar Kutatók 8. Nemzetközi Szimpóziuma 8th International Symposium of Hungarian Researchers on Computational Intelligence and Informatics Languages Generated by Context-Free and Type AB → BA Rules Benedek Nagy Faculty of Informatics, University of Debrecen, H-4010 PO Box 12, Hungary, Research Group on Mathematical Linguistics, Rovira i Virgili University, Tarragona, Spain [email protected] Abstract: Derivations using branch-interchanging and language family obtained by context-free and interchange (AB → BA) rules are analysed. This language family is between the context-free and context-sensitive families helping to fill the gap between them. Closure properties are analysed. Only semi-linear languages can be generated in this way. Keywords: formal languages, Chomsky hierarchy, derivation trees, interchange (permutation) rule, semi-linear languages, mildly context-sensitivity 1 Introduction The Chomsky type grammars and the generated language families are one of the most basic and most important fields of theoretical computer science. The field is fairly old, the basic concepts and results are from the middle of the last century (see, for instance, [2, 6, 7]). The context-free grammars (and languages) are widely used due to their generating power and simple way of derivation. The derivation trees represent the context-free derivations. There is a big gap between the efficiency of context-free and context-sensitive grammars. There are very ‘simple’ non-context-free languages, for instance {an^2 |n ∈ N}, {anbncn|n ∈ N}, etc. It was known in the early 70’s that every context-sensitive language can be generated by rules only of the following types AB → AC, AB → BA, A → BC, A → B and A → a (where A,B,C are nonterminals and a is a terminal symbol).
    [Show full text]
  • CDM [1Ex]Context-Sensitive Grammars
    CDM Context-Sensitive Grammars Klaus Sutner Carnegie Mellon Universality 70-cont-sens 2017/12/15 23:17 1 Context-Sensitive Grammars Linear Bounded Automata LBA and Counting Where Are We? 3 Context-free languages based on grammars with productions A ! α are very important since they describe many aspects of programming languages and admit very efficient parsers. CFLs have a natural machine model (PDA) that is useful e.g. to evaluate arithmetic expressions. Properties of CFLs are mostly undecidable, Emptiness and Finiteness being notable exceptions. Postfix Calculators 4 Hewlett-Packard figured out 40 years ago the reverse Polish notation is by far the best way to perform lengthy arithmetic calculations. Very easy to implement with a stack. The old warhorse dc also uses RPN. 10 20 30 + * n 500 10 20 30 f 30 20 10 ^ n 1073741824000000000000000000000000000000 Languages versus Machines 5 Why the hedging about \aspects of programming languages"? Because some properties of programming language lie beyond the power of CFLs. Here is a classical example: variables must be declared before they can be used. begin int x; ... x = 17; ... end Obviously, we would want the compiler to address this kind of situation. Languages versus Machines 6 To deal with problems like this one we need to strengthen our grammars. The key is to remove the constraint of being \context-free." This leads to another important grammar based class of languages: context-sensitive languages. As it turns out, CSL are plenty strong enough to describe programming languages|but in the real world it does not matter, it is better to think of programming language as being context-free, plus a few extra constraints.
    [Show full text]
  • Context-Sensitive Grammars and Linear- Bounded Automata
    I. J. Computer Network and Information Security, 2016, 1, 61-66 Published Online January 2016 in MECS (http://www.mecs-press.org/) DOI: 10.5815/ijcnis.2016.01.08 Context-Sensitive Grammars and Linear- Bounded Automata Prem Nath The Patent Office, CP-2, Sector-5, Salt Lake, Kolkata-700091, India Email: [email protected] Abstract—Linear-bounded automata (LBA) accept The head moves left or right on the tape utilizing finite context-sensitive languages (CSLs) and CSLs are number of states. A finite contiguous portion of the tape generated by context-sensitive grammars (CSGs). So, for whose length is a linear function of the length of the every CSG/CSL there is a LBA. A CSG is converted into initial input can be accessed by the read/write head. This normal form like Kuroda normal form (KNF) and then limitation makes LBA a more accurate model of corresponding LBA is designed. There is no algorithm or computers that actually exists than a Turing machine in theorem for designing a linear-bounded automaton (LBA) some respects. for a context-sensitive grammar without converting the LBA are designed to use limited storage (limited tape). grammar into some kind of normal form like Kuroda So, as a safety feature, we shall employ end markers normal form (KNF). I have proposed an algorithm for ($ on the left and on the right) on tape and the head this purpose which does not require any modification or never goes past these markers. This will ensure that the normalization of a CSG. storage bound is maintained and helps to keep LBA from leaving their tape.
    [Show full text]
  • Appendix8 Shape Grammars in Chapter 9 There Is a Reference to Possible Applications of Shape Grammars. One Such Application Conc
    Appendix8 Shape Grammars In Chapter 9 there is a reference to possible applications of shape grammars. One such application concerns artificial biological materials constructed from a finite number of specially created (stable) Holliday type moleculesb. Shape grammars might be of practical value in a number of other applications as well. A shape grammar is defined as follows. SG = (VM, VT, %, I), where VT is a finite set of terminal symbols VM is a finite set of marker symbols (that act like non-terminals) I e Vj V^ VJ is the start symbol. The production rules of the shape grammar % are phrase structured, and the rules may be applied serially, or in parallel (the same as with Lindenmeyer systems). % is composed of rules of the form u => v, where u is a mix of Vf with V^ , and v is a mix of Vj with V^. Objects in VT and VM may have any location, orientation, or scaling (think in terms of location in a Cartesian grid or some other coordinate system, rotation, and size), in two or more dimensions. As an example, VM The marker disks may be at any one of the four branches, and marks an active area. In the example that follows, these marked active areas are where ligases may act. In the following rule for /£, the four cruciform symbols on the right of the production rule are of the same size, none are rotated, and all four have the locations indicated. J. Gips, Shape Grammars and Their Uses: Artificial Perception, Shape Generation and Computer Aesthetics, 1975, Birkhftuser.
    [Show full text]
  • INF2080 Context-Sensitive Langugaes
    INF2080 Context-Sensitive Langugaes Daniel Lupp Universitetet i Oslo 24th February 2016 Department of University of Informatics Oslo INF2080 Lecture :: 24th February 1 / 20 Context-Free Grammar Definition (Context-Free Grammar) A context-free grammar is a 4-tuple (V ; Σ; R; S) where 1 V is a finite set of variables 2 Σ is a finite set disjoint from V of terminals 3 R is a finite set of rules, each consisting of a variable and of a string of variables and terminals 4 and S is the start variable Rules are of the form A ! B1B2B3 ::: Bm, where A 2 V and each Bi 2 V [ Σ. INF2080 Lecture :: 24th February 2 / 20 Why Context-Sensitive? Many building blocks of programming languages are context-free, but not all! consider the following toy programming language, where you can “declare” and “assign” a variable a value. S ! declare v; S j assign v : x; S this is context-free... but what if we only want to allow assignment after declaration and an infinite amount of variable names? ! context-sensitive! INF2080 Lecture :: 24th February 3 / 20 Context-Sensitive Languages Some believe natural languages reside in the class of context-sensitive languages, though this is a controversial topic amongst linguists. But many characteristics of natural languages (e.g., verb-noun agreement) are context-sensitive! INF2080 Lecture :: 24th February 4 / 20 Context-Sensitive Grammars So, instead of allowing for a single variable on the left-hand side of a rule, we allow for a context: αBγ ! αβγ (1) with α; β; γ 2 (V [ Σ)∗, but β 6= ".
    [Show full text]
  • An Introduction to the Theory of Formal Languages and Automata
    JANUA LINGUARUM STUDIA MEMORIAE NICOLAI VAN WIJK DEDICATA edenda curat C. H. VAN SCHOONEVELD Indiana University Series Minor, 192/1 FORMAL GRAMMARS IN LINGUISTICS AND PSYCHOLINGUISTICS VOLUME I An Introduction to the Theory of Formal Languages and Automata by W. J. M. LEVELT 1974 MOUTON THE HAGUE • PARIS © Copyright 1974 in The Netherlands Mouton & Co. N. V., Publishers, The Hague No part of this book may be translated or reproduced in any form, by print, photoprint, microfilm, or any other means, without written permission from the publishers Translation: ANDREW BARNAS Printed in Belgium by N.I.C.I., Ghent PREFACE In the latter half of the 1950's, Noam Chomsky began to develop mathematical models for the description of natural languages. Two disciplines originated in his work and have grown to maturity. The first of these is the theory of formal grammars, a branch of mathematics which has proven to be of great interest to informa­ tion and computer sciences. The second is generative, or more specifically, transformational linguistics. Although these disciplines are independent and develop each according to its own aims and criteria, they remain closely interwoven. Without access to the theory of formal languages, for example, the contemporary study of the foundations of linguistics would be unthinkable. The collaboration of Chomsky and the psycholinguist, George Miller, around 1960 led to a considerable impact of transforma­ tional linguistics on the psychology of language. During a period of near feverish experimental activity, psycholinguists studied the various ways in which the new linguistic notions might be used in the development of models for language user and language acquisi­ tion.
    [Show full text]
  • Normal Forms with Ap- Plications Obecné Gramatiky: Normální Formy a Jejich Aplikace
    BRNO UNIVERSITY OF TECHNOLOGY VYSOKÉ UČENÍ TECHNICKÉ V BRNĚ FACULTY OF INFORMATION TECHNOLOGY FAKULTA INFORMAČNÍCH TECHNOLOGIÍ DEPARTMENT OF INFORMATION SYSTEMS ÚSTAV INFORMAČNÍCH SYSTÉMŮ GENERAL GRAMMARS: NORMAL FORMS WITH AP- PLICATIONS OBECNÉ GRAMATIKY: NORMÁLNÍ FORMY A JEJICH APLIKACE BACHELOR’S THESIS BAKALÁŘSKÁ PRÁCE AUTHOR DOMINIKA KLOBUČNÍKOVÁ AUTOR PRÁCE SUPERVISOR Prof. RNDr. ALEXANDER MEDUNA, CSc. VEDOUCÍ PRÁCE BRNO 2017 Abstract This thesis deals with the topic of unrestricted grammars, normal forms, and their applica- tions. It focuses on context-sensitive grammars as their special cases. Based on the analysis of the set, an algorithm was designed using the principles of the Cocke-Younger-Kasami algorithm to make a decision of whether an input string is a sentence of a context-sensitive grammar. The final application, which implements this algorithm, works with context- sensitive grammars in the Penttonen normal form. Abstrakt Táto práca sa zaoberá problematikou obecných gramatík, normálnych foriem a ich apliká- cií. Zameriava sa na kontextové gramatiky ako ich špeciálne prípady. Na základe analýzy tejto množiny bol navrhnutý algoritmus využívajúci princípy Cocke-Younger-Kasami algo- ritmu za účelom rozhodnutia, či zadaný reťazec je vetou jazyka definovaného kontextovou gramatikou. Výsledná aplikácia implementujúca toto riešenie je navrhnutá pre prácu s kon- textovými gramatikami v Penttonenovej normálnej forme. Keywords formal languages, grammars, syntax analysis, normal forms, Kuroda, Penttonen, CYK, CKY, Cocke-Younger-Kasami Klíčová slova formálne jazyky, gramatiky, syntaktická analýza, normálne formy, Kuroda, Penttonen, CYK, CKY, Cocke-Younger-Kasami Reference KLOBUČNÍKOVÁ, Dominika. General Grammars: Normal Forms with Applications. Brno, 2017. Bachelor’s thesis. Brno University of Technology, Faculty of Information Technology. Supervisor Prof. RNDr.
    [Show full text]
  • Chapter 2 Syntax-Based Machine Translation
    Design of a Non-ambiguous Predictive Parser for BangIa Natural Language Sentence with Error Rec!,very Capability by Fazle Elahi Faisal Roll No: 040505037P A thesis submitted for the partial fulfillment of the requirement for the degree of Master of Science in Computer Science and Engineering (M. Sc. Engg.) MASTER OF SCIENCE IN COMPUTER SCIENCE AND ENGINEERING • -, . Department of Computer Science and Engineering (CSE) BANGLADESH UNIVERSITY OF ENGINEERING AND TECHNOLOGY (BUET) Dhaka - 1000, Bangladesh December, 2008 1" < G The thesis titled "Design of a Non-ambiguous Predictive Parser for BangIa Natural Language Sentence with Error Recovery Capability", submitted by Fazle Elahi Faisal, Roll No: 040505037P, Session: April 2005, has been accepted as satisfactory in partial fulfillment of the requirement for the degree of Master of Science in Computer Science and Engineering (M. Sc. Engg.) on December 31, 2008. BOARD OF EXAMINERS 1. Dr. Muhammad Masroor Ali Chairman Professor (Supervisor) Department of Computer Science and Engineering Bangladesh University of Engineering and Technology Dhaka - 1000, Bangladesh 9xw-~ 2. Dr'MClSaidur Rahman Member Professor and Head (Ex-officio) Department of Computer Science and Engineering Bangladesh University of Engineering and Technology. Dhaka - 1000, Bangladesh I~_' 3. Dr. M. Kaykobad Member Professor Department of Computer Science and Engineering Bangladesh University of Engineering and Technology Dhaka ~ 1000, Bangladesh 4. D . Md. Humayun Kabir Member Associate Professor Department of Computer Science and Engineering Bangladesh University of Engineering and Technology Dhaka - 1000, Bangladesh ~ 5. Dr. Mohammad Zahidur Rahman Member Associate Professor (External) D Jahangirnagar University Savar, Dhaka, Bangladesh CANDIDATE'S DECLARATION It is hereby declared that this thesis or any part of it has not been submitted elsewhere for the award if any degree or diploma.
    [Show full text]
  • Chicago Journal of Theoretical Computer Science the MIT Press
    Chicago Journal of Theoretical Computer Science The MIT Press Volume 1996, Article 4 13 November 1996 ISSN 1073–0486. MIT Press Journals, 55 Hayward St., Cambridge, MA 02142 USA; (617)253-2889; [email protected], [email protected]. Published one article at a time in LATEX source form on the Internet. Pag- ination varies from copy to copy. For more information and other articles see: http://www-mitpress.mit.edu/jrnls-catalog/chicago.html • http://www.cs.uchicago.edu/publications/cjtcs/ • gopher.mit.edu • gopher.cs.uchicago.edu • anonymous ftp at mitpress.mit.edu • anonymous ftp at cs.uchicago.edu • Buntrock and Niemann Weakly Growing CSGs (Info) The Chicago Journal of Theoretical Computer Science is abstracted or in- R R R dexed in Research Alert, SciSearch, Current Contents /Engineering Com- R puting & Technology, and CompuMath Citation Index. c 1996 The Massachusetts Institute of Technology. Subscribers are licensed to use journal articles in a variety of ways, limited only as required to insure fair attribution to authors and the journal, and to prohibit use in a competing commercial product. See the journal’s World Wide Web site for further details. Address inquiries to the Subsidiary Rights Manager, MIT Press Journals; (617)253-2864; [email protected]. The Chicago Journal of Theoretical Computer Science is a peer-reviewed scholarly journal in theoretical computer science. The journal is committed to providing a forum for significant results on theoretical aspects of all topics in computer science. Editor in chief: Janos
    [Show full text]