Module33 - 1 Module 33 Non-context free languages Intuition...

Info iconThis preview shows pages 1–12. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 1 Module 33 Non-context free languages Intuition and Examples CFL Pumping Lemma Comparison to regular language pumping lemma What it means Proof overview Applications 2 Examples and Intuition 3 Examples What are some examples of nonregular languages? Can we build on any of these languages to create a non context-free language? 4 Intuition Try and prove that these languages are CFLs and identify the stumbling blocks Why cant we construct a CFG to generate this language? Compare to similar CFL languages to try and identify differences. 5 Comparison to regular language pumping lemma/condition 6 Whats different about CFLs than regular languages? * In regular languages, a single substring pumps Consider the language of even length strings over {a,b} We can identify a single substring which can be pumped In CFLs, multiple substrings can pump Consider the language {a n b n | n > 0} No single substring can be pumped and allow us to stay in the language However, there do exist pairs of substrings which can be pumped resulting in strings which stay in the language This results in a modified pumping condition 7 Modified Pumping Condition A language L satisfies the regular language pumping condition if: there exists an integer n > 0 such that for all strings x in L of length at least n there exist strings u, v, w such that x = uvw and |uv| n and |v| 1 and For all k 0, uv k w is in L A language L satisfies the CFL pumping condition if: there exists an integer n > 0 such that for all strings x in L of length at least n there exist strings u, v, w, y , z such that x = uvw yz and | v w y | n and | vy | 1 and For all k 0, u v k w y k z is in L 8 Pumping Lemma All CFLs satisfy the CFL pumping condition All languages over {a,b} CFLs Pumping Languages 9 Implications We can use the pumping lemma to prove a language L is not a CFL Show L does not satisfy the CFL pumping condition We cannot use the pumping lemma to prove a language is context-free Showing L satisfies the pumping condition does not guarantee that L is context-free CFL Pumping 10 Pumping Lemma What does it mean? 11 Pumping Condition A language L satisfies the CFL pumping condition if: there exists an integer n > 0 such that for all strings x in L...
View Full Document

This note was uploaded on 07/25/2008 for the course CSE 460 taught by Professor Torng during the Fall '07 term at Michigan State University.

Page1 / 30

Module33 - 1 Module 33 Non-context free languages Intuition...

This preview shows document pages 1 - 12. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online