MCQ Collection
Theory of Automata & Formal Languages MCQs
MCQs on automata theory, grammars, regular languages, and formal language concepts.
Choose an option to check your answer.
Correct Answer: B. input is accepted when the PDA reaches an accepting state after processing input
Explanation:
The correct answer is input is accepted when the PDA reaches an accepting state after processing input.
Choose an option to check your answer.
Correct Answer: D. a sequence of production applications used to generate a string
Explanation:
derivation is correctly described as a sequence of production applications used to generate a string.
Choose an option to check your answer.
Correct Answer: B. a grammar that generates some string with more than one parse tree
Explanation:
ambiguous grammar is correctly described as a grammar that generates some string with more than one parse tree.
Choose an option to check your answer.
Correct Answer: A. a sequence of production applications used to generate a string
Explanation:
In this course context, derivation means a sequence of production applications used to generate a string.
Choose an option to check your answer.
Correct Answer: A. a grammar that generates some string with more than one parse tree
Explanation:
In this course context, ambiguous grammar means a grammar that generates some string with more than one parse tree.
Choose an option to check your answer.
Correct Answer: B. the union of two regular languages is also regular
Explanation:
The suitable explanation is the union of two regular languages is also regular.
Choose an option to check your answer.
Correct Answer: A. a standard example of a non-regular language
Explanation:
The suitable explanation is a standard example of a non-regular language.
Choose an option to check your answer.
Correct Answer: C. a grammar where each production has a single non-terminal on the left side
Explanation:
The suitable explanation is a grammar where each production has a single non-terminal on the left side.
Choose an option to check your answer.
Correct Answer: D. the complement of a regular language is regular
Explanation:
The correct answer is the complement of a regular language is regular.
Choose an option to check your answer.
Correct Answer: B. an automaton that produces output while processing input
Explanation:
The correct answer is an automaton that produces output while processing input.
Choose an option to check your answer.
Correct Answer: A. a symbol that appears in final strings generated by a grammar
Explanation:
The correct answer is a symbol that appears in final strings generated by a grammar.
Choose an option to check your answer.
Correct Answer: D. the complement of a regular language is regular
Explanation:
regular languages closed under complement is correctly described as the complement of a regular language is regular.