1 / 16

Understanding Grammars in Computer Science: Types and Relationships

This chapter provides an overview of grammars in computer science, emphasizing the automata and grammar approaches as discussed by Sipser and Schoening. It explores various types of grammars, including regular, context-free, and context-sensitive grammars, and their respective parsing and recognition capabilities. Key concepts such as derivation, ambiguity, and the Chomsky Hierarchy are covered, illustrating the distinctions among different grammar types and their corresponding automata. The relationships between deterministic and non-deterministic machines are also highlighted, along with crucial closure properties and decidability issues.

tanika
Télécharger la présentation

Understanding Grammars in Computer Science: Types and Relationships

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Applied Computer Science IIChapter : Grammars Prof. Dr. Luc De Raedt Institut für Informatik Albert-Ludwigs Universität Freiburg Germany

  2. Overview • Sipser : the automata/machine approach • Schoening : the grammar approach • State links among the two appraoches • See more types of grammars : • Regular grammars • Context-free • Context-sensitive • Grammar • Based on : Uwe Schoening’s “Theoretische Informatik – Kurzgefasst”, Spektrum.

  3. Grammars • Most concepts carry over from CFGs, i.e. derivation, language accepted by grammar, ambiguity, leftmost derivation, …

  4. Parsing • Construct meaning (parse tree)

  5. Chomsky Hierarchy • Type 0 : every grammar; Turing recognisable language • Type 1 : context-sensitive • Type 2 : context free • Type 3 : regular • Exception for

  6. Difference Type 0 and 1 • See figure

  7. Implies figure p 20!

  8. Earlier

  9. Machines corresponding to languages • Type 3, regular languages : • Regular grammar, DFA, NFA, regular expression • Type 2, context-free languages : • Context free grammar, PDA • Type 1, context-sensitive language • Context sensitive grammar, LBA • Type 0, Turing recognizable • Grammar, Turing machine

  10. Deterministic versus non-deterministic machines • NFA and DFA are equivalent • PDA and DPA are not equivalent • DPA : deterministic subset of PDA • LBA and DLBA are not equivalent • DLBA : deterministic subset of PDA • NTM and DTM are equivalent

  11. Closure properties

  12. Decidability

More Related