GATE CS 2022 · Question 12 · Theory of Computation · Multiple choice (MCQ) · 1 mark · −1/3 for a wrong answer

Which one of the following regular expressions correctly represents the language of the finite automaton given below?

Finite automaton with three states over alphabet {a, b}. The start state (left, marked by an incoming arrow) is non-accepting. There is an upper accepting state (double circle) and a lower accepting state (double circle). Transitions: start state to upper accepting state on a; upper accepting state has a self-loop on b; upper accepting state back to start state on b. Start state to lower accepting state on b; lower accepting state has a self-loop on a; lower accepting state back to start state on a.
  1. (A) ab^*bab^* + ba^*aba^*
  2. (B) (ab^*b)^*ab^* + (ba^*a)^*ba^*
  3. (C) (ab^*b + ba^*a)^*(a^* + b^*)
  4. (D) (ba^*a + ab^*b)^*(ab^* + ba^*)
Answer

Answer (D)

Answer from the official GATE CS 2022 answer key.

The step-by-step solution, where available, is part of GATE CS Pro. See what Pro includes