This is a homework problem. The problem is:
Find a grammar that generates this language:
L = {wcw^R: w ∈ {a,b}+ } over alphabet Σ = {a, b, c}.
I have tried many different transitions, but can't find one that creates this. Here is the most recent one I tried that failed:
S -> Sa
S -> Sb
S^R -> aS^R
S^R -> bS^R
S -> a
S-> b
S^R -> a
S^R -> b
Any help pointing me in the right direction would be much appreciated!
HINT: Build the string from the centre out: $$S\to aSa\mid bSb\mid\ldots$$