Let \(M\) be the 5-state NFA with \(\epsilon\)-transitions shown in the diagram below.

Which one of the following regular expressions represents the language accepted by \(M\) ?
Answer
(B)
Explanation
Follow the two \(\epsilon\)-moves out of the start state 1.
- Into state 2, which accepts: the 0-loop through state 3 accepts \((00)^{*}\). From state 3, reached after an odd number of 0s, the \(\epsilon\)-move enters the accepting state 5, where the 1-loop adds any number of 11s: \(0(00)^{*}(11)^{*}\).
- Into state 4: one 1 reaches state 5, and each further 11 returns there: \(1(11)^{*}\).
So \(L(M) = (00)^{*} + 0(00)^{*}(11)^{*} + 1(11)^{*}\). Because \(0^{*} = (00)^{*} + 0(00)^{*}\) and \(0(00)^{*}\) is already inside \(0(00)^{*}(11)^{*}\), this is exactly option (B). Option (A) misses 0, (C) misses 0 and wrongly accepts 11, and (D) misses the empty string and 00011.
Answer: B