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?
- A.
(a + b)* a(a + b)b
- B.
(abb)*
- C.
(a + b)* a(a + b)* b(a + b)*
- 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.