The problem is designing context-free grammars generating the following languages.
The set of strings over the alphabet Σ = {a, b} with twice as many a’s as b’s. I found a solution but I don't know how to get this.
S → SS | aaSb | bSaa | aSbSa | $\epsilon$