One way to manage this intellectual challenge is to resort to a mathematical construct called a DFA, or deterministic finite automaton. A DFA is a graph, which is a set of nodes and arcs that have labels. A node is a circle and represents a state, while an arc is an arrow, or directed line, between nodes, which represents an input or a condition. Fig. 7.7.1 is a typical DFA. Each state has a number: 0, 1, 2 and 3. Between two states there may be 0 or more arrows, each having a label. |