0

The proof for 'pumping lemma' from book <Introduction to the Theory of Computation> :

Pumping lemma: If A is a regular language, then there is a number p (the pumping length) 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:

  1. for each i ≥ 0, xyiz ∈ A,
  2. |y| > 0, and
  3. |xy| ≤ p

Let M = (Q, Σ, δ, q1, F) be a DFA that recognizes A. We assign the pumping length p to be the number of states of M. We show that any string s in A of length at least p may be broken into the three pieces xyz, satisfying our three conditions. What if no strings in A are of length at least p? Then our task is even easier because the theorem becomes vacuously true: Obviously the three conditions hold for all strings of length at least p if there aren’t any such strings.

Question: the bold quote part, which I think is wrong. Because if no strings in A are of length at least p, then it is clearly not a regular language.

Community
  • 1
  • 1
Anonemous
  • 307
  • 2
  • 8
  • 1
    If there are no strings of length at least p, then there can be strings of length at most p. Given the alphabet is finite, and there is a maximum string length, the language is finite. All finite languages are regular. The pumping lemma holds. The book is correct, but perhaps could have been written more clearly. – Welbog May 28 '19 at 12:49

1 Answers1

1

There are two points to clarify here:

  1. The pumping lemma states, "if a language is regular, then all strings of length at least p in that language have some properties." If your language doesn't have any strings of length at least p, the statement is vacuously true in the sense that there are no counterexamples. "If x, then y" is mathematically true if x is false. "If the moon is made of cheese, then I am the king of France" is a mathematically true statement. This is perhaps a little different from the way we typically use conditionals where we assume the hypothesis is typically (conditionally, hypothetically) true. But this is its formal meaning.
  2. Any language whose strings have length not at least p has strings whose lengths are strictly less than p. Because the length of a string must be a nonnegative integer, this means there are finitely many lengths. Because each string length corresponds to finitely many possible strings over the language's alphabet, and a sum of finitely many finite terms must be finite, any such language must be finite. We know that finite languages must be regular, no matter what the pumping lemma says; in any event, the pumping lemma for regular languages doesn't concern itself with this case so whether what is says is true or false here is really irrelevant. It would be less confusing to simply say nothing for languages with shorter strings than to try to note that its claims are consistent for those cases as well.
Patrick87
  • 27,682
  • 3
  • 38
  • 73
  • "If the moon is made of cheese, then I am the king of France" , I think it is UNKNOWN instead of true. because, I can also say "If the moon is made of cheese, then I am NOT the king of France" – Anonemous May 29 '19 at 02:46