TOC Unit I MCQ
TOC Unit I MCQ
1.Number of states of FSM required to simulate behaviour of a computer with a memory capable of
storing “m” words, each of length ‘n’
a.m x 2^n
b.2^mn
c.2^(m+n)
d.All of the mentioned
Answer: (b). 2^mn
Answer: (c).=
19.The lexical analysis for a modern language such as Java needs the power of which one of the
following machine models in a necessary and sufficient sense?
a.Finite state automata
b.Deterministic pushdown automata
c.Non-deterministic pushdown automata
d.Turing machine
Answer: (a).Finite state automata
20.The classes of languages P and NP are closed under certain operations, and not closed under
others. Decide whether P and NP are closed under each of the following operations.
1. Union
2. Intersection
3. Intersection with a regular language
4. Kleene closure (star)
5. Homomorphism
6. Inverse homomorphism
a.P is not closed under union
b.NP is not closed under intersection
c.None of the mentioned
d.Both of the mentioned
Answer: (d).Both of the mentioned