1 / 0

DETERMINISTIC CONTEXT FREE LANGUAGES

DETERMINISTIC CONTEXT FREE LANGUAGES. Ethakota Krishnamurthi Surendranath Manoj Gujjari. What is a CFL(Context Free Language)? Deterministic Context Free Language Description Properties Importance. CONTEXT FREE LANGUAGES.

hyman
Download Presentation

DETERMINISTIC CONTEXT FREE LANGUAGES

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. DETERMINISTIC CONTEXT FREE LANGUAGES

    EthakotaKrishnamurthiSurendranath ManojGujjari
  2. What is a CFL(Context Free Language)? Deterministic Context Free Language Description Properties Importance
  3. CONTEXT FREE LANGUAGES Acontext-free language (CFL) is a language generated by some context-free grammar (CFG). Different CF grammars can generate the same CF language, or conversely, a given CF language can be generated by different CF grammars. The class of context-free languages generalizes the class of regular languages, i.e., every regular language is a context-free language. The reverse of this is not true, i.e., every context-free language is not necessarily regular.
  4. DCFL Deterministic context-free languages are a proper subset of context-free languages. Context free languages that can be accepted by Deterministic Push-Down Automata. DCFLs are always unambiguous. Many programming languages can be described by means of DCFLs.
  5. DCFL Description Consider $: end of string marker Consider an example: Let L = a*  {anbn : n > 0}. When it begins reading a’s, M must push them onto the stack. In case there are going to be b’s it runs out of input without seeing b’s, it needs a way to pop the a’s from the stack before it can accept. The end-of-string marker allows the popping to happen, when all the input has been read. Add $ to make it easier to build DPDAs, it does not add power (to allow building a PDA for L that was not context-free) There exist CLFs that are not deterministic, e.g., L = {aibjck, ij or jk}.
  6. A DETERMINISTIC PDA FOR L L = a*  {anbn : n > 0}.
  7. A NDPDA FOR L( No end-marker) L = a*  {anbn : n > 0}.
  8. Properties of DCFL DCFLS are not closed under union. DCFLS are not closed under intersection. DCFLS are closed under complement.
  9. DCFLS are not closed under UNION L1 = {aibjck, i, j, k 0 and ij}. (a DCFL) L2 = {aibjck, i, j, k 0 and jk}. (a DCFL) L = L1L2. = {aibjck, i, j, k 0 and (ij) or (jk)}. L = L. = {aibjck, i, j, k 0 and i = j = k}  {w {a, b, c}* : the letters are out of order}. L = L a*b*c*. = {anbncn, n0}. L is not even CF, much less DCF.
  10. DCFLS are not closed under Intersection L1 = {aibjck, i, j, k 0 and i = j}. L2 = {aibjck, i, j, k 0 and j = k}. L = L1L2 = L1 and L2 are deterministic context-free:
  11. CFL HIERARCHY
  12. References Automata, Computability and Complexity, Elaine Rich. http://en.wikipedia.org/wiki/Deterministic_context-free_language http://en.wikipedia.org/wiki/Context-free_language http://en.wikipedia.org/wiki/Unambiguous_grammar
  13. QUESTIONS?

More Related