Pumping Theorem for Regular Languages
Learn about the pumping theorem for regular languages.
Infinite regular languages
We know that a decision algorithm can be developed to detect whether a DFA’s language is infinite. If a DFA accepts a string of length greater than or equal to , where is the number of states in the DFA, we know there is a cycle in an accepting path, so the language is infinite. Therefore, we could test all strings in of length for acceptance. The question is: when can we stop and give an answer? Since no cycle can contain more than states, we only have to test strings of the following lengths: .
If a language accepts a string of length , we can ignore one of its cycles, which is no longer than length , meaning that a string whose length is in the range must also be accepted.
Remember: To determine by computer whether the language of a finite automaton is infinite, it is sufficient to test all strings in with lengths in the range ...