GATE / CS ARCHIVE

GATE CSE 1996 / QUESTION 12(b)

Iterate a concatenated language

Theory of Computation · Closure Properties & Language Hierarchy · Full GATE CSE 1996 paper

GATE 1996, Q12(b) Descriptive
Report issue

Closure Properties & Language Hierarchy

Question 12(b), GATE 1996: M1 has states A(start,final),B(nonfinal), with A→B and B→A on either 0 or 1. M2 has C(start,final),D(final),E(nonfinal): C loops on a, C→D on b, D loops on b, D→E on a, and E loops on a,b. Starting with the concatenation machine (start A, finals C,D, added ε-edge A→C), recognize (L1L2)* without new states.
Question 12(b), GATE 1996: M1 has states A(start,final),B(nonfinal), with A→B and B→A on either 0 or 1. M2 has C(start,final),D(final),E(nonfinal): C loops on a, C→D on b, D loops on b, D→E on a, and E loops on a,b. Starting with the concatenation machine (start A, finals C,D, added ε-edge A→C), recognize (L1L2)* without new states.
Question 12(b), GATE 1996: M1 has states A(start,final),B(nonfinal), with A→B and B→A on either 0 or 1. M2 has C(start,final),D(final),E(nonfinal): C loops on a, C→D on b, D loops on b, D→E on a, and E loops on a,b. Starting with the concatenation machine (start A, finals C,D, added ε-edge A→C), recognize (L1L2)* without new states.
Question 12(b), GATE 1996: M1 has states A(start,final),B(nonfinal), with A→B and B→A on either 0 or 1. M2 has C(start,final),D(final),E(nonfinal): C loops on a, C→D on b, D loops on b, D→E on a, and E loops on a,b. Starting with the concatenation machine (start A, finals C,D, added ε-edge A→C), recognize (L1L2)* without new states.
Tap to enlarge
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.

Original paper, page 8