GATE Computer ScienceVery hardGATE CS (PYQ pattern)

Consider strings containing both ab and bb as substrings in either order (overlaps allowed). How many states does the minimal complete DFA (including a dead state, if one is needed) have?

  1. A. 8
  2. B. 9
  3. C. 10
  4. D. 11

Correct answer: B. 9

Distinguishing prefixes by the suffixes that complete them gives 9 Myhill-Nerode classes. (Dead state included only when some prefix can never be completed.)

More Compiler Design questions

Exams that ask this topic