The grammar is defined by the production rule $S \rightarrow a S b|b S a| a b S|b a S| S a b|S b a| \lambda$. This means that the starting symbol $S$ can be replaced by any of the following: $a S b$, $b S a$, $a b S$, $b a S$, $S a b$, $S b a$, or an empty string
Show more…