Closure Properties & Language Hierarchy




Answer & solution
Answer: Add C→A and D→A on ε; keep start A and final states C,D. (no official key was published)
In the concatenation machine, reaching either C or D after consuming input means one complete L1L2 factor has been recognized. To permit another factor, add ε-edges from both accepting states back to the start A. Retain A→C and all original symbol edges. The complete added-edge set relative to the original two diagrams is A→C, C→A and D→A, all labelled ε.
An accepting run can now consist of any finite number of concatenation runs separated by the new return edges. Each segment consumes a word of L1L2; conversely a concatenation of such words is realized by joining their accepting runs through these ε-edges. Since L1 and L2 already contain ε, the start A can reach accepting C without consuming input, so the zero-factor case is accepted without adding a new accepting start state.
Keep C,D as final states. Making A final as well would also be harmless here because A already has an ε-path to a final state, but it is unnecessary. Adding only D→A would be insufficient as a general concatenation construction because C is also a valid final state, for example after a factor ending with only a's. ε-cycles cause no language-theoretic problem; an implementation computes finite ε-closures rather than following such cycles forever.