Which one of the following regular expressions is equivalent to the language accepted by the DFA given below?

Answer
(A)
Explanation
Call the start state \(q_0\) and the accepting state \(q_1\). A 0 never changes the state and a 1 always switches it, so the DFA accepts exactly the strings with an odd number of 1s.
Option A follows the DFA directly. \(0^{*}1\) stays in \(q_0\) on 0s and moves to \(q_1\) on the first 1. From then on, every way of leaving \(q_1\) and coming back is either the self-loop 0 or a trip \(10^{*}1\) through \(q_0\), so \((0 + 10^{*}1)^{*}\) covers every continuation that ends in \(q_1\).
- B accepts the empty string, which has no 1s, and cannot produce
1. - C cannot produce
111, which has three 1s. - D forces a leading 0, so it misses
1, and it accepts0.
Answer: A