GATE Computer ScienceVery hardGATE CS

A lexical rule recognises the language (ab | abc | c)*(bc | a) over {a, b, c}. How many states does the minimal complete DFA (dead state included) for this language have?

  1. A. 7
  2. B. 4
  3. C. 5
  4. D. 6

Correct answer: C. 5

Building the subset-construction DFA and merging equivalent states (checked by an exhaustive Myhill–Nerode computation on all prefixes and suffixes up to length 6) leaves 5 states, one of which is the dead state.

More Compiler Design questions

Exams that ask this topic