1 / 10

CS310

Learn about the Pumping Lemma to prove languages are not regular, identifying key properties of regular languages, implications for finite automata, formal definitions, practical application, and examples.

schmidtd
Download Presentation

CS310

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. CS310 Pumping Lemma Sections:1.4 page 77 September 27, 2006

  2. Quick Review • DFA to Regular Expression • DFA -> GNFA -> Reduce to 2 state GNFA • Regular Expression R4 (R1(R2)*R3) U R4 R3 R1 Rip this out! R2

  3. Non-Regular Languages • Languages that cannot be represented by a finite automaton B = { 0n1n | n >= 0 } What makes this hard (impossible) for an NFA to represent? ►hint: What does the F stand for in NFA? How do we prove a language is not regular? Intuition may be wrong; which is not regular? C = { w | w has an equal number of 0s and 1s} D = { w | w has an equal number of occurrences of 01 and 10 as substrings }

  4. Pumping Lemma • We can use the Pumping Lemma to show that a language is not regular • All regular languages have a particular property • For strings over a certain length (the pumping length, p) there must be some repetition within the string • F stands for Finite number of states • If a language does not have this property: not regular • Not represented by a FA

  5. Pumping Lemma (Informal) • All regular languages are represented by an FA • The result of pushing a string of length n through a FA is a sequence of (n+1) states • If (n+1) > number of states in FA, there must be some repetition: must visit the same state twice • p = number of states in FA Pumping: The length of the string could be ‘pumped’ up by repeating the cycle, and the string would still be accepted. repetition

  6. Pumping Lemma (Formally) y z x • DFA: M= ( Q, ∑, δ , q0, F) If |Q| = p and s є L(M) and |s| >= p then there exists at least one state that was visited twice within the first p input symbols (p input symbols takes you through p+1 states) s = xyz

  7. Pumping Lemma (Formally) y z x • If A is a regular language, then there is a number p where, if s is any string in A of length at least p, then s may be divided into three pieces, s = xyz, satisfying the following conditions: • i >= 0, xyiz є L(M) • |y| > 0 • |xy| <= p s = xyz (x, z may be ε)

  8. Pumping Lemma In Action • Find a string, s є L, |s| >= p, that cannot be pumped to show language L is not regular. • Proof by contradiction • Find a string that exhibits the “essence” of nonregularity • L = { w | w contains equal number of 0s and 1s } let s = 0p1p where p is the pumping length s є L, |s| >= p, so we can write s = xyz • What does this imply about y? • Is xy2z є L? • Is xy0z є L?

  9. Pumping Lemma in Action • L = { w | w contains equal number of 0s and 1s } What if we chose the string (01)p? Can that be pumped? x = y = z =

  10. Practice • L = { ww | w є {0, 1}* } What string should we chose? what does ww mean? Can that be pumped?

More Related