Computer Science EngineeringVery hard
The language of unary strings a^n with n divisible by 2 or by 3 has a minimal DFA with how many states?
- A. 6
- B. 5
- C. 4
- D. 3
Correct answer: A. 6
The DFA must track n mod 6, and the residues 0 to 5 are all pairwise distinguishable.
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
- For void f(int x, int y){ x = x + 1; y = y + x; } with int a = 1, b = 2; calling f(a, b) by reference, what are the values of a and b…
- Peephole optimization operates on
- In graph-colouring register allocation, the nodes of the interference graph represent
- S-attributed grammars use only which kind of attributes?
- In the dangling-else problem, the usual resolution is to associate an else with
- A shift-reduce conflict in an LR parser means that in some state the parser