User:Jonathans/Continuation lemma

In formal language theory, the continuation lemma states that, given two strings composed from some input alphabet (uppercase sigma) that reach the same state in a deterministic finite automaton (DFA), any third string composed from the same input alphabet concatenated to the end of both will also bring the resulting strings to the same state.

Formal Definition
The formal definition of the continuation lemma states that, having reached some state in a DFA with any arbitrary input strings, any new singular arbitrary string can be processed from this state to exactly one unique state. In other words, no matter what input you used to reach the state the machine is in, ending them with the same substring will always bring the machine to the same state. One expression of it is as follows:

Given some DFA,

and given two different strings over the closure of &Sigma;,

and given some state in the machine,

if it is the case that,

,

then it will be the case that,

with no loss of generality.

Use of the Lemma
While seemingly trivial, the continuation lemma can be used in conjunction with Dirichlet's box principle (also known as the pigeonhole principle) to disprove the regularity of a language, in general, more eloquently than when employing the pumping lemma for regular languages. The lemma provides both the sufficient and necessary condition for any regular language. The pumping lemma, in comparison, will only provide necessity except in certain special cases, for example, where |&Sigma;| = 1.

Proof of the Lemma
The proof of the continuation lemma requires the definition of an expansion function of &delta; for strings, to some degree. The essential bits of the two are shown here in tandem. Due to limitations with textual representation, the expansion function will simply be &delta;1, although normally it is little delta with an upwards-pointing caret above, loosely referred to as "delta hat".

of note:

Definition of &delta;1:

With this definition of a "delta hat" for whole strings, we can simply go back to using plain old &delta; for both. The former is a logical and semantic expansion of the latter.

Continutation states that:

,

,

therefore,

.

Example Proof of the Irregularity of a Language
Take an easy alphabet such as &Sigma; = {a, b}. Assume there is a machine that accepts the language:

.

Which is to say, assume that L is regular. By definition, then, Q is a finite state set. L is an infinite set of finite strings over &Sigma;*. Were it a finite set, the language would be trivially regular. At first glance,

This is the application of the pigeonhole principle on Q (boxes) with input strings over &Sigma;* (pigeons).

Now all that is needed is the application of the continuation lemma. If the assumption that L is regular is true, then the following must also be true:

This yields an obvious contradiction. i and j are not equal, and so two different-length strings of a's have been "continued" with the same two strings of b's, placing the first string in the language and the second one not in the language -- but they go to the same state (a state cannot be accepting and non-accepting at the same time; see DFA's).