Construct the CFG given the following language:
$$\{a^i \; b^j \; c^k \;|\; i = j \; or \; j = k \}$$
Construct the CFG given the following language:
$$\{a^i \; b^j \; c^k \;|\; i = j \; or \; j = k \}$$
Hint: Set up a grammar to get $i = j$ or $j = k$, then tweak to make sure the equality can't hold.
The answer should be the following:
$$ \begin{align} &S \to WQ \mid XY \\ &W \to aW \mid ε \\ &Q \to bQc \mid ε \\ &X \to aXb \mid ε \\ &Y \to cY \mid ε \end{align} $$