Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The reason that finite languages work with the pumping lemma is because you can make the pumping length longer than the longest word in the language. The pumping lemma, <a href="http://en.wikipedia.org/wiki/Pumping_lemma_for_regular_languages" rel="noreferrer">as stated on Wikipedia</a> (I don't have my theory of computation book with me) is the following:</p> <blockquote> <p>Let <em>L</em> be a regular language. Then there exists an integer <em>p</em> ≥ 1 depending only on <em>L</em> such that every string <em>w</em> in <em>L</em> of length at least <em>p</em> (<em>p</em> is called the "pumping length") can be written as <em>w</em> = <em>xyz</em> (i.e., <em>w</em> can be divided into three substrings), satisfying the following conditions:</p> <ol> <li>|<em>y</em>| ≥ 1</li> <li>|<em>xy</em>| ≤ <em>p</em></li> <li>for all <em>i</em> ≥ 0, <em>xy<sup>i</sup>z</em> ∈ <em>L</em></li> </ol> </blockquote> <p>Now, consider some finite language <em>L</em>, and let <em>k</em> = max<sub><em>w</em> ∈ <em>L</em></sub> |<em>w</em>| be the length of the longest word in <em>L</em>. Then I claim that the minimal pumping length for <em>L</em> is <em>p</em> = <em>k</em>+1. Since there are <em>no</em> words in <em>L</em> with length at least <em>k</em>+1, it is (vacuously) true that <em>every</em> such word satisfies the three conditions (or, indeed, any other condition you care to specify).</p> <p>You can see that any finite language is regular, of course (regular languages are closed under finite union, and all languages of one word are regular), but note that this argument doesn't show this; it's important to remember that while any regular language can be pumped, <a href="http://en.wikipedia.org/wiki/Pumping_lemma_for_regular_languages#Converse_of_lemma_not_true" rel="noreferrer">there exist languages that can be pumped but are not regular</a>.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload