- Definitions:
- extended transition function (
*δ*^),*L*(*M*) - DFA-recognizable

- extended transition function (
Proof of correctness of a machine

Product construction for DFA union

Extended transition function (Note: because this doesn't render nicely in HTML, I will write *δ*^ for "delta-hat")

*δ*^:*Q*×*Σ*^{ * }→*Q*- informally:
*δ*^(*q*,*x*) tells you where you end up after processing the string*x*starting in state*q*. - compare with
*δ*:*Q*×*Σ*→*Q*:*δ*^ processes strings, while*δ*processes single characters - domain of
*δ*is finite, so description of*δ*is finite; it is part of the machine. - domain of
*δ*is infinite, it is not part of the description of the machine (but is built from the description of the machine).

- informally:
*δ*^: (*q*,*ε*)↦*q*, and*δ*^: (*q*,*x**a*)↦*δ*(*δ*^(*q*,*x*),*a*)- informally: to process
*x**a*, first process*x*; starting there, take a single step with the (non-extended) transition function*δ* - Note: the
*δ*in this definition cannot be*δ*^

- informally: to process

Language - A **language** is a set of strings

Language of a machine - *L*(*M*) stands for the "language of *M*". - contains all (and only) strings that *M* accepts - Informally, a string *x* is accepted by a machine *M* if, after processing *x* starting at the start state, the machine ends in a final state. - formal definition: ** L(M) = {x∈Σ^{ * } ∣ δ^(q_{0}, x)∈F}**, where

Given a language *L*, we may wish to build a machine that recognizes *L*, and prove that it is correct.

In other words, we wish to prove that *L* = *L*(*M*).

In other words, we wish to prove that ∀*x*∈*Σ*^{ * }, *x*∈*L* if and only if *x*∈*L*(*M*).

In other words, we wish to prove that ∀*x*∈*Σ*^{ * }, *x*∈*L* if and only if *δ*^(*q*_{0}, *x*)∈*F*.

A straightforward approach is induction on the structure of *x*; however the induction hypothesis usually needs to be strengthened to describe all of the states (and not just the final state); essentially you want to prove that each state "satisfies its specification".

For example: we may want to build a machine that recognizes strings that contain at least two ones. We might build a machine with three states: *q*_{0} represents strings with no 1's, *q*_{1} represents strings with one 1, and *q*_{2} represents strings with two or more 1's.

A proof of correctness for this machine might go as follows:

Let

P(x) be the statement "δ^(q_{0},x) =q_{0}if and only ifxhas no 1s,andδ^(q_{0},x) =q_{1}if and only ifxhas exactly one 1,andδ^(q_{0},x) =q_{2}if and only ifxhas two or more 1's. I claim that ∀x∈Σ^{ * },P(x) holds.We will prove this claim by induction on the structure of

x. We must showP(ε) and, assumingP(x),P(xa).To prove

P(ε), note thatδ^(q_{0},ε) =q_{0}. Thus only the first part ofP(x) makes any claim (it is vacuously true thatifδ^(q_{0},ε) =q_{1},thenεcontains one 1, because the statement says nothing).Now, to prove

P(xa), assumeP(x).acan be either 0 or 1, andδ^(q_{0},x) could be any ofq_{0},q_{1}, andq_{2}. We consider each case:

If

a= 0, then note thatδ(q_{i},a) =q_{i}. Moreover, note thatxahas the same number of 1's asx. Thus in this case,P(xa) follows directly fromP(x).If

a= 1 andδ^(q_{0},x) =q_{0}, then byP(x),xmust have no 1's. Thusxahas exactly one 1. Moreover,δ^(q_{0},xa) =δ(δ^(q_{0},x),a) =δ(q_{0}, 1) =q_{1}, so $P(xa) holds in this case.- If
a= 1 andδ^(q_{0},x) =q_{1}, then byP(x), x$ must have oneThus

xahas two ones. Moreover,δ^(q_{0},xa) =δ(δ^(q_{0},x),a) =δ(q_{1}, 1) =q_{2}, so $P(xa) holds in this case.If

a= 1 andδ^(q_{0},x) =q_{2}, then byP(x), x$ must have two or more 1's. Thusxahas more than two ones. Moreover,δ^(q_{0},xa) =δ(δ^(q_{0},x),a) =δ(q_{2}, 1) =q_{2}, so $P(xa) holds in this case.In all possible cases, we have shown

P(xa). This concludes the inductive proof.

Note that the framework provided by the inductive proof forces you to write down a specification for each state, and then reason about each transition.