CS2001 week 3 tutorial:
Finite state systems
1. What does it mean for a system to be finite state? If we assume that we have a relatively
small number of states, what limitations does this introduce?
2. Suppose we have a system whose inputs are the letters 'a' and 'b'; whose outputs are the
numbers 1 and 2; and whose behaviour is to output the number of each letter the machine
has seen modulo 2. So the sequence 'aab' would have the machine output “0 1”, while
entering another 'b' would result in the output “0 0”. Draw the diagram for this machine.
3. Draw the transition table for this machine. If there is no arrow for a particular symbol in a
particular state, assume that the machine remains in the same state. The machine should
output a dot if it changes state and an empty string if it remains in the same state.
2
a b
a
1 b 5
a
3
b a
a
4 6
4. Explain the precise meanings of the symbols F = (S, σ, I, O, f, g) in the formal description of
a finite-state machine.
5. Design a finite-state automation that recognises simple arithmetic expressions consisting of
the numbers 1 and 2, the symbols + and -, and at most one level of brackets: if an expression
tries to open a second level of brackets, the machine should reject the string.
6. Suppose we have two automata F0 and F1. How can we compose them to build a machine
that recognises F0 or F1? Do we have to place an constraints on the machines to make this
work, and if so can we engineer around them?