Theory of Automata MCQs with Answers

Practice important Theory of Automata MCQs with answers and explanations.

Multiple Choice Questions

Q31: The language of strings having at least one 'a' and one 'b' can be expressed by which of the following regular expressions?
  • A: (a+b)*a(a+b)b(a+b)
  • B: aba*
  • C: aabb
  • D: (a+b)a(a+b)
View Answer
A

Q32: How is a language with strings starting with 'aa' and ending with 'bb' expressed in regular expressions?
  • A: aa(a+b)*bb
  • B: abab*
  • C: (a+b)aa(a+b)*
  • D: a(a+b)*b
View Answer
A

Q33: What does the regular expression (a+b)* represent?
  • A: Only strings with 'a' and 'b'
  • B: Strings of 'a' and 'b'
  • C: All possible strings of 'a' and 'b', including the null string
  • D: Strings with at least two 'a's
View Answer
C

Q34: What is the base step in the recursive definition of Regular Expression?
  • A: Every letter in Σ is an RE
  • B: Λ is not an RE
  • C: All words in Σ are not REs
  • D: Every string of finite length is an RE
View Answer
A

Q35: Which regular expression generates all strings starting with 'a' and ending in 'b'?
  • A: a(a+b)*b
  • B: (a+b)*a
  • C: aab
  • D: b*(a+b)*
View Answer
A

Q36: What is the recursive step for creating a regular expression from two expressions r1 and r2?
  • A: r1 + r2 is not a regular expression
  • B: r1 r2 is a regular expression
  • C: r1* is not a regular expression
  • D: (r1)(r2) is not a regular expression
View Answer
B

Q37: Which of the following represents the language of strings with odd length in regular expressions?
  • A: ((a+b)(a+b))*
  • B: (a+b)((a+b)(a+b))*
  • C: a(a+b)*b
  • D: b*(a+b)*a
View Answer
B

Q38: Fill in the blank: The regular expression ______ represents the language with at least one 'a'.
  • A: bab
  • B: (a+b)a(a+b)
  • C: (a+b)(a+b)*
  • D: aabb
View Answer
B

Q39: Fill in the blank: The recursive definition of regular expressions allows the use of _______.
  • A: r1 r2
  • B: r1 + r2
  • C: r1*
  • D: All of the above
View Answer
D

Q40: Fill in the blank: The regular expression ______ defines a language where strings start with 'aa' and end with 'bb'.
  • A: aa(a+b)*bb
  • B: (a+b)*
  • C: bbb
  • D: aba
View Answer
A

Test Your Knowledge

Take a timed quiz on Theory of Automata

🚀 Start Quiz Now