{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

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

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

View Full Document Right Arrow Icon
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
Image of page 1

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

View Full Document Right Arrow Icon
2 Examples and Intuition
Image of page 2
3 Examples What are some examples of nonregular languages? Can we build on any of these languages to create a non context-free language?
Image of page 3

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

View Full Document Right Arrow Icon
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.
Image of page 4
5 Comparison to regular language pumping lemma/condition
Image of page 5

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

View Full Document Right Arrow Icon
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
Image of page 6
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
Image of page 7

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

View Full Document Right Arrow Icon
8 Pumping Lemma All CFL’s satisfy the CFL pumping condition All languages over {a,b} CFL’s “Pumping Languages”
Image of page 8
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
Image of page 9

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

View Full Document Right Arrow Icon
10 Pumping Lemma What does it mean?
Image of page 10
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
Image of page 11

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

View Full Document Right Arrow Icon
Image of page 12
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

  • Left Quote Icon

    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.

    Student Picture

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

  • Left Quote Icon

    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.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    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.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern