i have the following regular grammar : $$S \rightarrow aS | cS | bQ_1$$ $$Q_1 \rightarrow bQ_2$$ $$Q_2 \rightarrow aQ_3 | cQ_3 | bQ_1$$ $$Q_3 \rightarrow aQ_4 | cQ_4$$ $$Q_4 \rightarrow \varepsilon$$
The question is to transform that into a linear grammar with less nonterminals than the regular grammar and my idea was: $$S \rightarrow aSa | cSc | aSc | cSa | bQ_1a | bQ_1c$$ $$Q_1 \rightarrow b$$
and the rest i don't know. Could you help me to solve this problem?