GATE Computer ScienceVery hardGATE CSE · NIELIT
Let L be the set of strings over {a, b} whose second symbol from the right is a, and which also satisfy: the last symbol is b, or the fourth symbol from the right exists and is b. How many states does the minimal complete DFA of L have?
- A. 14
- B. 10
- C. 8
- D. 16
Correct answer: B. 10
The automaton must remember the last four symbols (and string length when below 4); Moore partition refinement merges only the equivalent histories, leaving 10 states.
More Theory of Computation questions
- Over {a, b, c}, let L = {aⁱbʲcᵏ : i = j} ∪ {aⁱbʲcᵏ : j = k} (i, j, k ≥ 0). How many strings of length at most 12 belong to L?
- Let A ≤ₘ B denote a many-one (mapping) reduction from A to B. How many of the following hold for all A, B? (i) B decidable ⇒ A decidable…
- Consider the grammar S → aSa | bSb | a | b | ε. How many strings of length exactly 7 does it generate?
- Let L = { w ∈ {a, b} : the number of a's is divisible by 4 and w contains bb as a substring }. How many states does the minimal complete…
- A DFA reads 12-bit strings (MSB first) and accepts exactly those whose binary value is divisible by 7 (the all-zeros string included). How…
- Which one of the following languages over {0, 1} is regular?