I have the description of a language L as follows:
L is the language consisting of all strings over the alphabet {a,b} such that there is at least one b in the string, there are more a’s than b’s, and there is at least as many a’s after the last occurrence of b in the string as the total amount of b’s in the string.
Condition 1 and 2 seem easy to meet, but I’m not sure how to go about the last bit.
How would I make a CFG for this language?