Finite Automata




Answer & solution
Answer: Use start A, final states C,D; add A→C on ε, retaining every original transition. (no official key was published)
M1 accepts binary strings of even length: each 0 or 1 toggles A and B, and A is accepting. M2 accepts a*b*: it stays at C through a's, moves to D at the first b, and a later a leads to rejecting sink E. Both languages contain ε.
For concatenation, retain all original symbol-labelled edges and add A→C on ε, because A is the only accepting state of M1 and C is the initial state of M2. The combined machine has just one initial state, A. Its accepting states are C and D, the former accepting states of M2. A is no longer designated accepting, although ε is still accepted via the new ε-edge to C. B and E remain nonaccepting.
Any accepting run first follows a run of M1 ending at A, then uses the ε-edge and follows an accepting run in M2. The consumed string therefore factors as uv with u∈L1 and v∈L2. Conversely every such factorization gives an accepting run. This proves equivalence rather than just providing a diagram recipe.
Text diagram addition: A --ε--> C. Initial/final annotations must be updated as stated; “only add ε-transitions” refers to edges and state count, not to keeping two independent initial-state markings. No new states or symbol transitions are required.