Back to the 2025 paper

Module 3: Context-Sensitive Languages

20257m

Given the following context-sensitive grammar:
SaSBCabcS \rightarrow aSBC | abc
CBBCCB \rightarrow BC
aBabaB \rightarrow ab
bBbbbB \rightarrow bb
bCbcbC \rightarrow bc
cCcccC \rightarrow cc

Identify the language generated by the grammar. Derive the string aabbcc step by step.

Similar questions