{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

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

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

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

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

View Full Document
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?

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

View Full Document
4 Intuition Try and prove that these languages are CFL’s and identify the stumbling blocks Why can’t 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

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

View Full Document
6 What’s different about CFL’s 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 CFL’s, 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

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

View Full Document
8 Pumping Lemma All CFL’s satisfy the CFL pumping condition All languages over {a,b} CFL’s “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

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

View Full Document
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 of length at least n there exist strings u, v , w, y , z such that x = u

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.
• Fall '07
• TORNG
• Formal language, Formal languages, Regular language, CFL, context-free language, Pumping lemma for regular languages

{[ snackBarMessage ]}

What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern