Context-Free Grammars & Languages

Answer & solution
Answer: C (no official key was published)
L1 contains exactly one c between am bm and an bn. For membership in L2=a*b*c*, no a or b may follow that c, so n=0. Thus the intersection is{am bm c:m≥0}. A grammar for it is S→Tc, T→aTb|ε. The language is context-free and nonregular: removing its fixed final c by regular right quotient would otherwise make{am bm} regular. Therefore C.
L2 permits only a block of a’s, then b’s, then c’s. A word of L1 has one central c, so its trailing an bn must be empty to fit L2. Thus L={am bm c:m≥0}. The grammar S→Tc and T→aTb|ε proves context-freeness. For nonregularity, removing the final fixed c from a hypothetical finite automaton would recognize the classic nonregular language am bm. Hence C, not the much stronger undecidability alternatives.