Section 8.2: Finite-State Machines (p. 563 - end)

Abstract:

Finite-state machines can be used to recognize input, and we will look at the kinds of input that can be recognized, as well as construct the machines that recognize given input. Furthermore, some machines are overly complicated, in that we can simplify them and get the same operation. We will examine some ways in which we can ``minimize'' a finite-state machine.

Recognition

Definition: Finite-State Machine Recognition A finite-state machine M with input alphabet I recognizes a subset S of tex2html_wrap_inline153 (the set of finite-length strings over the input alphabet I) if M, beginning in state tex2html_wrap_inline159 and processing an input string tex2html_wrap_inline161 , ends in a final state (a state with output 1) if and only if tex2html_wrap_inline163 .

Practice 40, p. 565

Notes:

What kinds of input can a finite-state machine recognize? Regular expressions. Regular expressions over I are defined recursively by

  1. the symbol tex2html_wrap_inline175 and the symbol tex2html_wrap_inline177 ;
  2. the symbol i for any tex2html_wrap_inline181 ; and
  3. the expressions (AB), tex2html_wrap_inline185 , and tex2html_wrap_inline187 if A and B are regular expressions.

Kleene's Theorem assures us that a finite-state machine can recognize a set S of input strings if and only if the set S is a regular set (that is, a set represented by a regular expression).

Since some very reasonable sets are not regular (e.g. tex2html_wrap_inline197 , where tex2html_wrap_inline199 stands for n copies of a), finite-state machines are obviously not sufficient to understand all of computation.

Examples of regular sets given by regular expressions:

Practice 41, p. 566

Practice 42, p. 566

Exercise 18(a,c), p. 579

Machine Minimization

Unreachable States

One obvious way in which a machine can be minimized is if there is an unreachable state: if so, then that state can certainly be trimmed from the machine without any consequences (from the standpoint of output). For example, Table 8.3, p. 568, and Figure 8.7 same page.

Practice 43, p. 568

Equivalent States

It would be nice if we had some general way of minimizing a machine, however. It turns out that we can find a minimized machine by using the idea of equivalent states. The idea is that several redundant states might operate in such confusing fashion that it appears there's lots going on, when there's not!

In the first step, the unreachable states are removed. That's the easy part! Then we define

Equivalent States: two states tex2html_wrap_inline215 and tex2html_wrap_inline217 of M are equivalent if, for any tex2html_wrap_inline221 , tex2html_wrap_inline223 where by the awful notation tex2html_wrap_inline225 we mean the sequence of output which occurs given that we start in state s and receive input tex2html_wrap_inline161 .

(There is no way that our author should have used notation which seems to imply that tex2html_wrap_inline231 is somehow both a function from tex2html_wrap_inline233 and a function from tex2html_wrap_inline235 , except that she's proving herself a computer scientist and an object-oriented one at that, and overloading the function tex2html_wrap_inline231 ...).

In order to find equivalent states, we define the notion of k-equivalency: two states are k-equivalent if the machine matches output on an input of k symbols to the two states.

  1. States having the same output symbol are 0-equivalent.
  2. For 1-equivalency, we check two states to see that the next-states under all input symbols (of length 1) are 0-equivalent.
  3. Etc.!
We iteratively step through equivalencies (from 0 on up): as soon as the states do not change, from k-equivalency to (k+1)-equivalency, then we have minimized our machine.

Best to look at an example!

Exercise 34, p. 584

The set of states is divided up into subsets of the initial set which have for their union the entire set S, and no common intersections. This is called a partition of the set S. As we progress from 0-equivalency on up, each subset can be divided, but none ever coalesce. There can be partition refinement (finer partition) only.



LONG ANDREW E
Tue Apr 23 19:35:09 EDT 2002