Computer Science EngineeringHardISRO SC
Over {0,1}, L1 = binary numbers (MSB first) divisible by 3, and L2 = strings ending with 11. The minimal DFA for L1 intersect L2 has how many states?
- A. 5
- B. 9
- C. 8
- D. 10
Correct answer: A. 5
Build the product of the 3-state mod DFA and the 3-state suffix DFA, keep reachable states and merge equivalent ones: 5 states.
Practise more Theory of Computation, Compilers & Digital Logic (ISRO CS) questionsTheory of Computation, Compilers & Digital Logic (ISRO CS): notes and key points
More Theory of Computation, Compilers & Digital Logic (ISRO CS) questions
- An NFA over {0,1} has start state q0 and accepting state q5, with transitions q0: 0->{q5} 1->{q1}; q1: 0->{q0,q3} 1->{q4,q3}; q2: 0->{q2}…
- How many strings of length 8 over {a,b} contain no two consecutive a's?
- How many strings of length 9 over {a,b} contain bab as a substring?
- With the ambiguous grammar E -> E + E | E E | id, how many distinct parse trees does the string id + id id + id id + id id have?
- The grammar S -> aS | Sa | a is ambiguous. How many parse trees does a^5 have?
- For the dangling-else grammar S -> i S e S | i S | a (i = if, e = else, a = other statement), how many parse trees derive iiiaeaea?