finite-state automaton

Updated About content Print Article Share Article
views updated

finite-state automaton (FSA; finite-state machine) A simple kind of automaton. The input string is read once from left to right, looking at each symbol in turn. At any time the FSA is in one of finitely many internal states; the state changes after each input symbol is read. The new state depends on the symbol just read and on the current state. An FSA is therefore determined by a function f f : I × QQ

where I is the set of possible input symbols, Q is the set of states, and I × Q is the Cartesian product of I and Q. Q must be finite.

The function f is called a state-transition function. It is commonly represented either by a table or by a directed graph, known respectively as a state-transition table and a state-transition diagram. The figure shows two equivalent representations in which I = {a,b,c}, Q = {1,2,3,4}

In this example, f(a,1) = 2, f(c,4) = 4, etc.

f extends to strings in the obvious manner: in the example, f(bc,2) = 4, f(aaa,3) = 1, etc.

Let Q be divided into accepting states and rejecting states, and let q0 be some member of Q (referred to as the start state). The language recognized by the FSA is the set of all w such that f(w,q0)

is an accepting state, i.e. the set of all strings that take the start state to an accepting state. For example, in the FSA shown in the figure let q0 be 1 and let 4 be the only accepting state; the language recognized is then the set of all strings over {a,b,c} that somewhere contain abc as a substring. A language recognized by an FSA is known as a regular language.

A generalization is to allow more than one state to which the FSA can move, for a given input symbol and current state. This gives a nondeterministic FSA. The input string is then accepted if there is some sequence of choices of moves leading to an accepting state. Such a machine can always be converted to a deterministic one recognizing the same language.

See also sequential machine, minimal machine.