Computer Science EngineeringHardISRO SC
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} 1->{q2}; q3: 0->{q4,q0} 1->{q1}; q4: 0->{q4,q3} 1->{q0}; q5: 0->{q2,q4} 1->{q3}. Subset construction (only reachable subsets, no minimisation) yields a DFA with how many states?
- A. 36
- B. 34
- C. 35
- D. 37
Correct answer: C. 35
Expand subsets from {q0} by 0 and 1 until no new subset appears; 35 reachable subsets.
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
- 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?
- The CYK algorithm runs on a string of length 10 with a grammar in Chomsky normal form. Counting each (cell, split point) pair as one step…