Você está na página 1de 1

CSE 322

Introduction to Formal Models in Computer Science


Defining from
In the definition of DFAs, the transition function explicitly describes, for each character
a , the name of the state reached on a when started at state q. This is precisely (q, a).
In analyzing DFAs we often want to talk about the state that a given string w reaches
when started at a state q. We give this corresponding function the name ; that is (q, w) is the
state that would be reached starting at state q and following the string w . This function is
determined entirely based on using the following inductive definition.
(q, ) = q
for x and a , (q, xa) = ( (q, x), a).
Note that this immediately means that (q, a) = ( (q, ), a) = (q, a).
The following is a useful property of the function.
Theorem 1. For any q Q, and x, y , (q, xy) = ( (q, x), y).
Proof. The proof is by induction on the length of y where the property we prove for each y is that
for all x , for all q Q, (q, xy) = ( (q, x), y).
BASE C ASE : y = . In this case for any x and q Q,
(q, xy) = (q, x)
= ( (q, x), )

since y =
by the definition of

I NDUCTION H YPOTHESIS : Assume that for all x , for all q Q, (q, xy) = ( (q, x), y).
I NDUCTION S TEP : Let y 0 = ya where y and a . Then
(q, xy 0 ) = (q, xya)
= ( (q, xy), a)
= ( ( (q, x), y), a)
= ( (p, y), a)
= (p, ya)
= ( (q, x), ya)
= ( (q, x), y 0 )

by definition
by the definition of
by the inductive hypothesis
where p = (q, x)
by the definition of
by the definition of p

which is what we needed to prove. Therefore by induction on the length of y the claim is proved.

Você também pode gostar