Compilers Questions and Answers – Finite Automata – 2

This set of Compilers Multiple Choice Questions & Answers (MCQs) focuses on “Finite Automata – 2”.

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
View Answer

Answer: c
Explanation: 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
View Answer

Answer: a
Explanation: 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
View Answer

Answer: c
Explanation: The definition states that its output is determined by current state and current input.
advertisement
advertisement

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
View Answer

Answer: a
Explanation: 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
View Answer

Answer: b
Explanation: 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
View Answer

Answer: a
Explanation: 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
View Answer

Answer: b
Explanation: Null strings are not accepted by finite automata.
advertisement

8. Myhill-Nerode Theorem is used for __________
a) Minimization of DFA
b) Maximization of NFA
c) Conversion of NFA
d) Conversion of DFA
View Answer

Answer: a
Explanation: 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.

Sanfoundry Global Education & Learning Series – Compilers.

advertisement

To practice all areas of Compilers, here is complete set of 1000+ Multiple Choice Questions and Answers.

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.