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

- A.
0∗1(0 + 10∗1)∗
- B.
0∗ (10∗11)∗0∗
- C.
0∗1(010∗1)∗0∗
- D.
0(1 + 0∗10∗1)∗0∗
Attempted by 185 students.
Show answer & explanation
Correct answer: A
Key insight: the DFA toggles state on each 1 and stays in the same state on 0, so it accepts exactly those strings over {0,1} with an odd number of 1s.
Interpretation of states: start state represents an even number of 1s seen so far (initially 0). Each 1 flips parity; each 0 leaves parity unchanged. Acceptance occurs when the parity is odd.
A compact regular expression for strings with an odd number of 1s is 0* (1 0* 1 0*)* 1 0*: initial zeros, any number of pairs of 1s (each pair contributes two 1s, keeping parity), then a final single 1 and trailing zeros.
Equivalence to the correct option in the question: the expression 0*1(0 + 10*1)* is equivalent because after the initial 1 each repetition either adds a 0 (no new 1) or adds a 10*1 (two additional 1s). Thus these repetitions preserve odd parity of 1s and generate exactly the same set of strings as the canonical form above.
A video solution is available for this question — log in and enroll to watch it.