# Constructing a context free grammar with starting state

I'm supposed to construct a context-free grammar generating all strings in :

{(ab)$$^{m}$$c$$^{n}$$(ba)$$^{m}$$ : m, n, ≥ 0}

So far I have V = {A, S, a, b, c}, Σ = {a, b, c}, and R = (1) S -> A (2) S -> abSba (3) A -> cA and (4) A -> e

but I'm not sure what to do for the starting state, S. Also, I'm not sure if V should actually be {A, S, ab, ba, c} because the a's and b's always appear as ab or ba.

• Welcome to COMPUTER SCIENCE @SE. What is your question? What is your problem with $S$? Oct 3 '20 at 22:50