Theory of Automata MCQs with Answers

Practice important Theory of Automata MCQs with answers and explanations.

Multiple Choice Questions

Q21: What is the first step in defining the language of INTEGER?
  • A: 0 is in INTEGER
  • B: 1 is in INTEGER
  • C: Any number is in INTEGER
  • D: 2 is in INTEGER
View Answer
B

Q22: In the recursive definition of EVEN, which number is initially in EVEN?
  • A: 1
  • B: 2
  • C: 0
  • D: -2
View Answer
B

Q23: What is the base case for defining the factorial language?
  • A: 1!=0
  • B: n!=n*(n+1)!
  • C: 0!=1
  • D: 1!=n*(n-1)!
View Answer
C

Q24: What is the recursive step for defining the palindrome language?
  • A: s(x) is palindrome
  • B: s(Rev(s)) is palindrome
  • C: s(x)Rev(s) is palindrome
  • D: s(x)s is palindrome
View Answer
C

Q25: Which string is part of the language {a^n b^n} for n=1,2,3,… ?
  • A: ab
  • B: ba
  • C: aabb
  • D: bb
View Answer
A

Q26: How is the language of strings ending in 'a' defined?
  • A: By starting with b
  • B: By starting with a
  • C: By concatenating strings with a
  • D: By appending s(x) to a
View Answer
D

Q27: What is the defining characteristic of strings in the language containing "aa" or "bb"?
  • A: They contain no 'a' or 'b'
  • B: They contain at least two a's
  • C: They contain exactly one 'a'
  • D: They contain exactly one 'b'
View Answer
B

Q28: What does the regular expression a* represent?
  • A: The null string
  • B: All strings of "a"
  • C: All strings of "a", including the null string
  • D: Strings with exactly one "a"
View Answer
C

Q29: Which regular expression represents the language of strings having exactly one 'a'?
  • A: a(a+b)*
  • B: bab
  • C: (a+b)a(a+b)
  • D: (a+b)(a+b)
View Answer
B

Q30: What is the regular expression for a language of strings with even length?
  • A: (a+b)(a+b)
  • B: ((a+b)(a+b))*
  • C: a+b*
  • D: a*
View Answer
B

Test Your Knowledge

Take a timed quiz on Theory of Automata

🚀 Start Quiz Now