SlideServe
Menu
Préférences
© SlideServe · v2026

Understanding Linear Grammars: Right and Left Linear Forms with Practical Examples

yale avatar
43 diapositives · 600 Views · Sep 11, 2014

This resource, presented by Prof. Busch of LSU, explores the concept of linear grammars, focusing on the characteristics of right-linear and left-linear grammars. It discusses how these grammars generate regular languages through structured productions. The materials include theoretical foundations, proofs, and practical examples of constructing NFAs (Nondeterministic Finite Automata) from linear grammars. A deep dive into regular languages highlights key theorems and their applications, offering clear insights into regular grammar generation and language classification.

Understanding Linear Grammars: Right and Left Linear Forms with Practical Examples - slide 1
01 / 43Understanding Linear Grammars: Right and Left Linear Forms with Practical Examples
1 / 17

Télécharger la présentation

Understanding Linear Grammars: Right and Left Linear Forms with Practical Examples
Une image / un lien ci-dessous est fourni (tel quel) pour télécharger la présentation

Politique de téléchargement : le contenu du site vous est fourni TEL QUEL pour votre information et votre usage personnel ; il ne peut être vendu, concédé sous licence ni partagé sur d’autres sites sans l’accord de son auteur.Le contenu vous est fourni TEL QUEL, pour votre information et votre usage personnel uniquement. Téléchargez la présentation en cliquant sur ce lien. Lors du téléchargement, si vous ne parvenez pas à télécharger une présentation, l’éditeur a peut-être supprimé le fichier de son serveur.Pendant le téléchargement, si vous ne parvenez pas à obtenir une présentation, le fichier a peut-être été supprimé par l’éditeur.

F I N

Plus de contenu associé

Transcription de la présentation
  1. Linear Grammars Grammars with at most one variable at the right side of a production Examples: Prof. Busch - LSU

  2. A Non-Linear Grammar Grammar : Number of in string Prof. Busch - LSU

  3. Another Linear Grammar Grammar : Prof. Busch - LSU

  4. Right-Linear Grammars All productions have form: Example: or string of terminals Prof. Busch - LSU

  5. Left-Linear Grammars All productions have form: Example: or string of terminals Prof. Busch - LSU

  6. Regular Grammars Prof. Busch - LSU

  7. Regular Grammars A regular grammaris any right-linear or left-linear grammar Examples: Prof. Busch - LSU

  8. Observation Regular grammars generate regular languages Examples: Prof. Busch - LSU

  9. Regular Grammars GenerateRegular Languages Prof. Busch - LSU

  10. Theorem Languages Generated by Regular Grammars Regular Languages Prof. Busch - LSU

  11. Theorem - Part 1 Languages Generated by Regular Grammars Regular Languages Any regular grammar generates a regular language Prof. Busch - LSU

  12. Theorem - Part 2 Languages Generated by Regular Grammars Regular Languages Any regular language is generated by a regular grammar Prof. Busch - LSU

  13. Proof – Part 1 Languages Generated by Regular Grammars Regular Languages The language generated by any regular grammar is regular Prof. Busch - LSU

  14. The case of Right-Linear Grammars Let be a right-linear grammar We will prove: is regular Proof idea: We will construct NFA with Prof. Busch - LSU

  15. Grammar is right-linear Example: Prof. Busch - LSU

  16. Construct NFA such that every state is a grammar variable: special final state Prof. Busch - LSU

  17. Add edges for each production: Prof. Busch - LSU

  18. Prof. Busch - LSU

  19. Prof. Busch - LSU

  20. Prof. Busch - LSU

  21. Prof. Busch - LSU

  22. Prof. Busch - LSU

  23. NFA Grammar Prof. Busch - LSU

  24. In General A right-linear grammar has variables: and productions: or Prof. Busch - LSU

  25. We construct the NFA such that: each variable corresponds to a node: special final state Prof. Busch - LSU

  26. For each production: we add transitions and intermediate nodes ……… Prof. Busch - LSU

  27. For each production: we add transitions and intermediate nodes ……… Prof. Busch - LSU

  28. Resulting NFA looks like this: It holds that: Prof. Busch - LSU

  29. The case of Left-Linear Grammars Let be a left-linear grammar We will prove: is regular Proof idea: We will construct a right-linear grammar with Prof. Busch - LSU

  30. Since is left-linear grammar the productions look like: Prof. Busch - LSU

  31. Construct right-linear grammar Left linear Right linear Prof. Busch - LSU

  32. Construct right-linear grammar Left linear Right linear Prof. Busch - LSU

  33. It is easy to see that: Since is right-linear, we have: Regular Language Regular Language Regular Language Prof. Busch - LSU

  34. Proof - Part 2 Languages Generated by Regular Grammars Regular Languages Any regular language is generated by some regular grammar Prof. Busch - LSU

  35. Any regular language is generated by some regular grammar Proof idea: Let be the NFA with . Construct from a regular grammar such that Prof. Busch - LSU

  36. Since is regular there is an NFA such that Example: Prof. Busch - LSU

  37. Convert to a right-linear grammar Prof. Busch - LSU

  38. Prof. Busch - LSU

  39. Prof. Busch - LSU

  40. Prof. Busch - LSU

  41. In General For any transition: Add production: variable terminal variable Prof. Busch - LSU

  42. For any final state: Add production: Prof. Busch - LSU

  43. Since is right-linear grammar is also a regular grammar with Prof. Busch - LSU