How to construct a context free grammar $G$ such that $L(G) = \{ a^i b^j c^k| j \gt i+k\} $?
I don't have much idea how to approach this one. Could some help me to understand how to approach these kinds of problem?
How to construct a context free grammar $G$ such that $L(G) = \{ a^i b^j c^k| j \gt i+k\} $?
I don't have much idea how to approach this one. Could some help me to understand how to approach these kinds of problem?
HINT: You want all words of the form $uvw$, where $u\in\{a^nb^n:n\ge 0\}$, $v\in\{b^n:n\ge 1\}$, and $w\in\{b^nc^n:n\ge 0\}$. Each of those types is easy to generate with a context-free grammar. If that’s not enough, a slightly bigger hint is spoiler-protected below; mouse-over to see it.