Give a context-free grammar to generate the following language: $L = \{ a^ib^jc^k \space|\space 0 \leq i \leq j \leq i + k \}.$
What does $0 \leq i \leq j \leq i + k$ mean I should do in terms of creating the grammar? Does it mean the number of $a$s must be less than (or equal to) the number of $b$s, and the number of $b$s must be less than or equal to the number of $a$s and $c$s combined?
Attempt 1. If so, here is my attempt. $G = ({S, A, B, T, E},{a, b, c},{S, R})$, where $\begin{align} S &\rightarrow AB \\ A &\rightarrow B \\ A &\rightarrow aB \\ A &\rightarrow a \\ B &\rightarrow bB \\ B &\rightarrow AB \\ B &\rightarrow bbT \\ T &\rightarrow cT \\ T &\rightarrow cE \\ E &\rightarrow \epsilon \end{align}$
Is this correct? If so, can it be reduced to fewer rules?
Attempt 2. I think I overthought it. Here's another try: $G = ((S, T), (a, b, \epsilon), S, R)$ where $R$ contains the rules: $\begin{align} S &\rightarrow cSb \\ S &\rightarrow T \\ T &\rightarrow cTa \\ T &\rightarrow \epsilon \end{align}$
I believe this is correct, but it wouldn't hurt for a member to look at my answer.
Attempt 3. Consider the following rules: $\begin{align} S &\rightarrow AB \\ A &\rightarrow aAb \\ B &\rightarrow Bc \\ B &\rightarrow bBc \\ A &\rightarrow \epsilon \\ B &\rightarrow \epsilon \end{align}$