60 likes | 73 Views
[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.
E N D
[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 Suppose we have a string with a parse tree where a variable is repeated in its subtree.
[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
[Section 2.3] Pumping Lemma for CFLs Example: B = { anbncn | n ¸ 0 }
[Section 2.3] Pumping Lemma for CFLs Example: C = { aibjck | 0 · i · j · k }
[Section 2.3] Pumping Lemma for CFLs Example: D = { ww | w 2 {0,1}* }