Theory of Automata MCQs with Answers
Practice important Theory of Automata MCQs with answers and explanations.
Multiple Choice Questions
Q401: Which grammar defines the language expressed by (a+b)aa(a+b)?
- A: S β SS
- B: S β XaaX
- C: S β a
- D: S β a+b
View Answer
B
Q402: In CFG, what is the role of terminal symbols?
- A: Must be replaced
- B: Canβt be replaced
- C: Can be either replaced or deleted
- D: Only generate non-terminals
View Answer
B
Q403: What type of language is expressed by S β aS, S β bS, S β Ξ?
- A: Regular Language
- B: Context-Free Language
- C: Infinite Language
- D: Finite Language
View Answer
B
Q404: Which type of string is generated by the grammar Ξ£ = {a, b} and productions X β aX, X β bX, X β Ξ?
- A: Finite strings of aβs and bβs
- B: Infinite strings of aβs
- C: Only one string
- D: Empty strings
View Answer
A
Q405: Context-Free Grammars (CFGs) primarily deal with which of the following?
- A: Syntax
- B: Semantics
- C: Machine Learning
- D: Assembly Language
View Answer
A
Q406: Fill in the blank: A Context-Free Language is generated by a ____.
- A: DFA
- B: CFG
- C: PDA
- D: Turing Machine
View Answer
B
Q407: Fill in the blank: The symbols in CFG that must be replaced by other things are called ____.
- A: Nonterminals
- B: Terminals
- C: Productions
- D: Syntax
View Answer
A
Q408: Fill in the blank: In CFG, the rule S β Ξ means that S can be ____.
- A: replaced by a
- B: deleted from the string
- C: used as a terminal
- D: used as a nonterminal
View Answer
B
Q409: Fill in the blank: The rule S β aS generates the language expressed by ____.
- A: a*
- B: b*
- C: a+b
- D: (a+b)*
View Answer
A
Q410: What does the CFG with productions S β SS, S β XS, S β Ξ, X β aa, X β bb, Y β ab, Y β ba generate?
- A: EVEN language
- B: EQUAL language
- C: PALINDROME
- D: EVEN EVEN language
View Answer
D