GATE Computer ScienceVery hardGATE CS (PYQ pattern)
A DFA over {a, b} has states 0 to 5, transitions 0: a→5, b→0; 1: a→5, b→1; 2: a→1, b→1; 3: a→5, b→3; 4: a→2, b→3; 5: a→4, b→4. Start 0, accepting {1,2}. How many of the 128 strings of length 7 over {a, b} does it accept?
- A. 50
- B. 36
- C. 64
- D. 42
Correct answer: D. 42
Propagate path counts through the transition table for 7 steps and add the counts of the accepting states: 42.
More Theory of Computation questions
- A DFA over {a, b} has states 0 to 5, transitions 0: a→2, b→0; 1: a→0, b→3; 2: a→2, b→5; 3: a→4, b→2; 4: a→3, b→4; 5: a→4, b→1. Start 0…
- A DFA over {a, b} has states 0 to 5, transitions 0: a→2, b→1; 1: a→5, b→4; 2: a→5, b→4; 3: a→3, b→0; 4: a→0, b→3; 5: a→5, b→1. Start 0…
- A DFA over {a, b} has states 0 to 5, transitions 0: a→4, b→2; 1: a→4, b→2; 2: a→3, b→3; 3: a→5, b→0; 4: a→0, b→5; 5: a→2, b→4. Start 0…
- For a language L, the derivative u⁻¹L is { w : uw ∈ L }. Let L be the language of the regular expression (a + b)abb. Which expression…
- For a language L, the derivative u⁻¹L is { w : uw ∈ L }. Let L be the language of the regular expression (ab + b)a. Which expression…
- For a language L, the derivative u⁻¹L is { w : uw ∈ L }. Let L be the language of the regular expression (a + b)a(a + b)(a + b). Which…