Search code examples
automata

Theory of Automata : Context Free Grammar


Please help me in making a CFG for this language.

a^i b^j c^k where i<j+k

I am fed up of trying this but not able to complete it.


Solution

  • S -> Ac | Bb
    A -> Ac | aAc | B
    B -> Bb | aBb | ε
    

    You "force order" by first generating as many cs as you need before moving on to bs.