Search⌘ K
AI Features

Pumping Theorem for Regular Languages

Explore the pumping theorem for regular languages, understanding how cycles in finite automata prove language infiniteness. Learn to partition strings and apply the theorem to determine when a language is not regular.

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 pp, where pp 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 Σ\Sigma^* of length p,p+1,p+2...p,p+1,p+2... for acceptance. The question is: when can we stop and give an answer? Since no cycle can contain more than pp states, we only have to test strings of the following pp lengths: p,p+1,p+2,...,2p2,2p1p,p+1,p+2,...,2p-2,2p-1.

If a language accepts a string of length 2p2p, we can ignore one of its cycles, which is no longer than length pp, meaning that a string whose length is in the range [p,2p1][p,2p-1] 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 Σ+\Sigma^+ with lengths in the range [p,2p1][p,2p-1] ...