Context Free Grammar $L = \{a^i(b+c)^jd^k | i0\}$ I'm trying to design a CFG that accept the words of the following language:

$$L = \{a^i(b+c)^jd^k  \mid  i&lt;j+k; \quad  i,j,k&gt;0\}$$

My first approximation would be to do $i = j+k$ as something like:

$S\to aSd \mid X$

$X\to aXY \mid aY $

$Y\to b \mid c$

But then I don't know how to make the jump to the $&lt;$.
Whenever you see a condition $i&lt;j+k$, you can translate that to the condition $i+\ell=j+k$ where $\ell&gt;0$, then use the methods you know for handling $=$ instead of $&lt;$.

See our reference question on this subject for more systematic answers.