Pumping Lemma for CFL

Pumping Lemma for CFL

Two Pumping Lemmas

  • 考慮一個無限的語言

    alt text

    • 設定變數P、m

      alt text

    • 挑選一個字串長度超過p

      alt text

    • 在這個字串中必定存在重複的production

      alt text

  • 推論

    alt text

    • 下一個產生字串的長度 會小於當前字串加上最長right hand side的production

      alt text

      • 可以推得字串長度的上下界
      • 得知

        alt text

      • 得到結論
      • k 會大於 p/f (Number of productions in grammar)
    • 因此存在重複的production

      alt text
      alt text

      • 某些variable會重複
  • 派生

    alt text

    • 得到可能的派生

      alt text

    • 所以存在這樣的可能性

      alt text
      alt text

      • 這是原版
      • 差在其中A的production 有一個被去掉了

        alt text
        alt text
        alt text

    • 所以有這樣的推理

      alt text

      • grammar G 可以生成這樣的string

        alt text

  • 那因為A是 last repeat variable

    alt text

  • 因為沒有unit, null production

    alt text

  • 證明 pumping lemma

    alt text

    • lemma 1 proof

      alt text

    • Pumping lemma I

      alt text

  • Applications of The Pumping Lemma

    • Example

      alt text
      alt text

    • proof

      alt text

      • 挑選string

        alt text

      • 選出vxy

        alt text
        alt text

        • case I

          alt text
          alt text
          alt text
          alt text
          alt text

        • case II

          alt text
          alt text

        • case III

          alt text
          alt text

        • case IV

          alt text

          • possibility I

            alt text
            alt text
            alt text
            alt text

          • possibility II

            alt text
            alt text
            alt text
            alt text

      • In all case

        alt text

  • Non Context-free

    alt text

  • 第二種用法

    • 使用uv yz

      alt text
      alt text


Pumping Lemma for CFL
https://z-hwa.github.io/webHome/[object Object]/Theory of Computation/Pumping-Lemma-for-CFL/
作者
crown tako
發布於
2025年1月6日
許可協議