Chapter 13: Q36E (page 876)
Construct a finite-state automaton with four states that recognizes the set of bit strings containing an even number of 1s and an odd number of 0s.
Short Answer
The result is
State | 0 | 1 |
\({{\bf{s}}_{\bf{0}}}\) | \({{\bf{s}}_{\bf{2}}}\) | \({{\bf{s}}_{\bf{1}}}\) |
\({{\bf{s}}_{\bf{1}}}\) | \({{\bf{s}}_{\bf{3}}}\) | \({{\bf{s}}_{\bf{0}}}\) |
\({{\bf{s}}_{\bf{2}}}\) | \({{\bf{s}}_{\bf{0}}}\) | \({{\bf{s}}_{\bf{3}}}\) |
\({{\bf{s}}_{\bf{3}}}\) | \({{\bf{s}}_{\bf{1}}}\) | \({{\bf{s}}_{\bf{2}}}\) |