1 / 6

Non-context-free languages

[Section 2.3]. Non-context-free languages. are all regular languages context-free ? are some non-regular languages context-free ? are all non-regular languages context-free ?. [Section 2.3]. Pumping Lemma for CFLs.

wfrances
Download Presentation

Non-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. [Section 2.3] Non-context-free languages • are all regular languages context-free ? • are some non-regular languages context-free ? • are all non-regular languages context-free ?

  2. [Section 2.3] Pumping Lemma for CFLs Suppose we have a string with a parse tree where a variable is repeated in its subtree.

  3. [Section 2.3] Pumping Lemma for CFLs Thm 2.34 [the pumping lemma for CFLs]: If A is a CFL, then there is a number p s.t. for every s 2 A of length ¸ p there exist u,v,x,y,z s.t. 0. s = uvxyz 1. for each i ¸ 0, uvixyiz 2 A 2. |vy| > 0 3. |vxy| · p

  4. [Section 2.3] Pumping Lemma for CFLs Example: B = { anbncn | n ¸ 0 }

  5. [Section 2.3] Pumping Lemma for CFLs Example: C = { aibjck | 0 · i · j · k }

  6. [Section 2.3] Pumping Lemma for CFLs Example: D = { ww | w 2 {0,1}* }

More Related