Context-Free Grammars & Languages

Answer & solution
Answer: B (no official key was published)
1. The grammar generates exactly(ab+ba)*: SS concatenates its two-letter blocks and ε contributes nothing. It is ambiguous, for example ab has both S→ab and S→SS→abS→ab, with different parse trees.
2. It does not generate aabb, although that string has equal a/b counts. The generated language is regular and therefore accepted by a deterministic PDA (even a DFA).
3. Statements1 and 3 hold, B; the PDA accepts the language, not the grammar object.
4. Teaching check: Equal counts are necessary for this grammar but not sufficient: concatenating ab and ba blocks cannot produce aabb. The ε production together with S→SS also allows redundant decompositions, so even a very short generated word has multiple parse trees.