Unambiguous Context free grammar for strings in {a,b}* containing at least as many a's as b's

346 Views Asked by At

Taken from Sipser, 2.28.

I came up with the following:

$$S \rightarrow \epsilon|aS|bAs$$ $$A \rightarrow a|bAA$$

I believe this grammar generates the mentioned language, but I am not sure how to check that it does so unambiguously. Any hints?