Every finite formal language is a regular language. A single string is described by the regular expression formed by concatenating its symbols; the empty string is described by . A finite union of these regular expressions describes any specified finite collection of strings. The empty collection is described by . Thus
Equivalently, a deterministic finite automaton can remember which prefix of one of the finitely many accepted strings has been read, moving to a rejecting dead state when no such prefix remains possible.
These strings are the even-length palindromes . Suppose this were a regular language, and let be its length from the pumping lemma for regular languages. The string
belongs to the formal language, with . In any allowed decomposition , where and , the pumped block is with . Pumping it away gives
This is not a palindrome: its initial and final runs of zeros have different lengths. Hence it cannot have the form , contradicting the pumping lemma for regular languages. Therefore
This is a regular language. A deterministic finite automaton needs only to remember the number of consecutive trailing ones, up to three, and whether a forbidden run of four has already occurred. Use states , start at , and accept in . Its transition function of a finite automaton is:
StateOn On
Reading a zero resets the trailing count unless rejection has already occurred. A fourth successive one enters the permanent rejecting state . Thus the accepted strings are exactly those with no substring , and
Let , and suppose it were a regular language. The formal language is a regular language. By closure of regular languages under set difference,
would be a regular language. But the pumping lemma for regular languages rules this out: for pumping length , every permitted pumped block in consists of zeros, and deleting it produces , with unequal counts. This contradiction proves
The closure step can also be realized by a product automaton accepting when the automaton for accepts and the automaton for rejects. If the exponents are instead required to be positive, use ; the same argument applies.

Articles by others on the same topic (0)

There are currently no matching articles.