DFA short exercise
Construct a DFA for each of the following languages.
In each case, let the alphabet be {a, b}.
- Strings that have exactly one a
- Strings that have no more than three as.
- Strings that have at least one a and exactly two bs.
- Strings of two to four as followed by zero to three bs,
for example aabbb, aaabb, and aaaa.
- Strings that have both ab and ba as substrings.
(Make sure that your DFA will accept a string like aaaabaaa;
ab and ba are both substrings, even though they overlap.)
Some of these exercises are taken from Lewis and Papadimitriou,
Elements of the Theory of Computation, Prentice Hall, 1998.
There's a copy in the CSCI 335 library.
Last modified: Thu Mar 31 16:18:12 CDT 2011