Context-Free Grammars & Languages

Your answer
Answer & solution
Official answer: B
1. T→bT|b generates bm for any m≥1. Different occurrences of T are expanded independently.
2. After k applications of S→abScT and then S→abcT, there are k+1 leading ab pairs and k+1 trailing cT groups. Put n=k+1≥1.
3. Replace each T by its own positive b count. The result is (ab)n cbm1 ... cbmn, B. Options A and C unnecessarily force all b blocks to have equal size.