7. (a) Use states labeled with |w| mod 3. The solution then is quite simple.
(d) For this we use nine states, with the first part of each labeled n a (w)
mod 3, the second part, n b (w) mod 3. The transitions and the final states
are then simple to figure out.
9. (a) Count consecutive zeros to get the main part of the dfa.
(d) For this we use nine states, with the first part of each labeled n a (w)
mod 3, the second part, n b (w) mod 3. The transitions and the final states
are then simple to figure out.
9. (a) Count consecutive zeros to get the main part of the dfa.
