Compilers Multiple Choice Questions & Answers (MCQs) on “Finite Automata”.
1. Which of the following statement is true for Dead State?
a) It cannot be reached anytime
b) There is no necessity of the state
c) If control enters no way to come out from the state
d) If control enters FA deads
Answer: c
Clarification: It is a rejecting state for if the control enters it reaches the dead end and cannot reach an accepting state.
2. Which of the following statement is true for Moore Machine?
a) Output depends on present state
b) Output depends on present input
c) Output depends on present state and present input
d) Output depends on present state and past input
Answer: a
Clarification: The definition states that moore machines output is determined by the current state only.
3. Which of the following statement is true for Mealy Machine?
a) Output depends on present state
b) Output depends on present input
c) Output depends on present state and present input
d) Output depends on present state and past input
Answer: c
Clarification: The definition states that its output is determined by current state and current input.
4. Which is true for in accessible state?
a) It cannot be reached anytime
b) There is no necessity of the state
c) If control enters no way to come out from the state
d) If control enters FA deads
Answer: a
Clarification: The very meaning of in accessible state is that it cannot be reached at any point of time.
5. In Mealy Machine O/P is associated with ____________
a) Present state
b) Next state
c) Input
d) None of the mentioned
Answer: b
Clarification: The definition states that its output is determined by current state and current input.
6. In Moore Machine O/P is associated with ____________
a) Present state
b) Next state
c) Input
d) None of the mentioned
Answer: a
Clarification: The definition states that moore machines output is determined by the current state only.
7. Which type of string is accepted by the following finite automata?
a) All string
b) Null string
c) No string
d) None of the mentioned
Answer: b
Clarification: Null strings are not accepted by finite automata.
8. Myhill-Nerode Theorem is used for __________
a) Minimization of DFA
b) Maximization of NFA
c) Conversion of NFA
d) Conversion of DFA
Answer: a
Clarification: Myhill–Nerode theorem provides a necessary and sufficient condition for a language to be regular. The Myhill–Nerode theorem can be generalized to trees. And used for minimization of DFA.