Formal Statement of Pumping Lemma

  • Upload
    mh-dev

  • View
    213

  • Download
    0

Embed Size (px)

Citation preview

  • 7/23/2019 Formal Statement of Pumping Lemma

    1/3

    p q r sa

    b

    a

    b

    a

    b

    a

    b

    w1 w2 w3 w4 w5 w6 w7 w8 w9a a b a a b b a b

    p q r s r q q q r sq0 q1 q2 q3 q4 q5 q6 q7 q8 q9

    So far we have seen that for allw L

    |w| p , x,y,z s.t.w = xyz withxyz L

    Let us enlist a few of the decompositions

    CS850: AToC Week 08(b) : Formal statement of pumping lemma Fall 2014 1 /

    w1 w2 w3 w4 w5 w6 w7 w8 w9

    a a b a a b b a b

    p q r s r q q q r sq0 q1 q2 q3 q4 q5 q6 q7 q8 q9

    aax

    bay

    abbabz

    q2 =q4

    a

    x

    abaa

    y

    bbab

    z

    q1 =q5

    ax

    abaaby

    babz

    q1 =q6

    ax

    abaabby

    abz

    q1 =q7

    aa

    x

    baabba

    y

    b

    z

    q2 =q8

    aabx

    aabbaby

    z

    q3 =q9

    CS850: AToC Week 08(b) : Formal statement of pumping lemma Fall 2014 2 /

  • 7/23/2019 Formal Statement of Pumping Lemma

    2/3

    Pumping Lemma

    For every regular languageLthere existssome constantpsuch that, for every stringw L with|w| p, there existx,y,z with

    w=

    xyz,|y

    | 1,

    |xy

    | p, and for alli

    N,xyiz L.

    Proof

    LetLbe a regular language.

    LetM = (R,, , r0, F) be a DFArecognizingL

    Let

    p (1)

    be the number of states inM

    Considerw L with|w| p

    That is

    w = w1w2 wn s.t. n p

    Herewj ,j = 1, 2, 3, . . . ,n

    Let

    q0q1q3 qn (2)

    thatMenters while processingw.

    Here

    q0 =r0

    andqj = (qj1, wj) for j= 1, 2, 3, . . . ,n

    CS850: AToC Week 08(b) : Formal statement of pumping lemma Fall 2014 3 /

    The length of sequence (2) is at leastp + 1

    Among the firstp + 1 elements in thesequence, two must be the same, by thepigeonhole principle.

    We call the first of theseqkand the secondql.

    That isqk=ql with 0 k< l p (3)

    Let

    x=

    w1w2

    wky = wk+1wk+2 wl

    z =wl+1wl+2 wn

    Obviouslyw = xyz.

    From (3) we have

    kl = y = |y|> 0 = |y| 1 (4)

    Furthermore, from the decomposition ofwwe have|xy| =l.

    And from (3) it can be inferred thatxy p (5)

    AsxtakesMfromq0to qk

    ytakesMfromqktoq

    k(=q

    l)

    and ztakesMfromqkto qn F

    Therefore,Mmust accept

    xyiz for i 0

    CS850: AToC Week 08(b) : Formal statement of pumping lemma Fall 2014 4 /

  • 7/23/2019 Formal Statement of Pumping Lemma

    3/3

    That isxyiz L , i N (6)

    From (1), (3), (4), and (6) we have establishedthe truth of the pumping lemma.

    Succinctly the pumping lemma states

    Lis regular =p w , |w| p, x,y,z , |xy| p , |y| 1 , i , xyiz L

    (7)

    The contrapositive of (7)

    n w , |w| n, x,y,z , |xy| n , |y| 1 , i , xyiz L

    = Lis not regular

    CS850: AToC Week 08(b) : Formal statement of pumping lemma Fall 2014 5 /