I am unsure, how can the second answer be the right one - and why not the first one? Can some one explain it step by step?
Why i think the first answer is right: $aS \to aSA \to aAAd \to abddd$
I am unsure, how can the second answer be the right one - and why not the first one? Can some one explain it step by step?
Why i think the first answer is right: $aS \to aSA \to aAAd \to abddd$
It can't be the first because the first grammar generate the word $ddbd\notin \mathcal L$
$$S\to SA \to Sbd \to Adbd \to ddbd$$