0

I need to find a grammar that generates the language composed by all words that have more $a$ than $b$ given an alphabet $\{a,b\}$

I tried the following production rules:

S->B
B->b | ABB | BAB | BAB | BBA
A->a

with this rules it's fairly simple to proof that all the words that the grammar generates are made up with more $a$ than $b$.

How can I proof that all words made up with more $a$ than $b$ can be generated that way?

wvxvw
  • 1,388
  • 9
  • 13
user1868607
  • 2,224
  • 14
  • 23

0 Answers0