Which regular expression best describes the language accepted by the…

2006

Which regular expression best describes the language accepted by the non-deterministic automaton below?

download (7)

  1. A.

    (a + b)* a(a + b)b

  2. B.

    (abb)*

  3. C.

    (a + b)* a(a + b)* b(a + b)*

  4. D.

    (a + b)*

Attempted by 76 students.

Show answer & explanation

Correct answer: A

The automaton accepts strings that start with any number of a or b, followed by an 'a', then any single character (a or b), and ending with a 'b'. The path to the final state requires exactly one 'a' followed by any character and then a 'b'. The correct regular expression is (a + b)* a(a + b)b.

A video solution is available for this question — log in and enroll to watch it.

Explore the full course: Gate Guidance By Sanchit Sir