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.
Definition: Finite-State Machine Recognition A finite-state machine M with input alphabet I recognizes a subset S of (the set of finite-length strings over the input alphabet I) if M, beginning in state and processing an input string , ends in a final state (a state with output 1) if and only if .
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
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. , where 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
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
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 and of M are equivalent if, for any , where by the awful notation we mean the sequence of output which occurs given that we start in state s and receive input .
(There is no way that our author should have used notation which seems to imply that is somehow both a function from and a function from , except that she's proving herself a computer scientist and an object-oriented one at that, and overloading the function ...).
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.
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.