I'm studying formal languages and automata, and on the section of learning how to find productions that generates the grammergrammar, I've done some exercises pretty well and was able to do some of the exercises on the format:
$L(G_1) = \{wcw^r / w\, is\, on\, \{0,1\}^*\}$
Where $w^r$ is the reverse word, and whose productions are:
$S \rightarrow c\, / \,0S0\,/\, 1S1$
But I'm struggling to find productionsCSG of this exercisethe following language (maybe a difficult one?):
$L(G_1) = \{ww / w\, is\, a\, word\, from\, \{a,b\}^*\}$
Almost every type of production that I tried ended up generating $ww^r$ instead of $ww$ such as:
$S \rightarrow aAa\,/\,bAb$
$A \rightarrow S\,/\, \epsilon$
Is there some kind of production that I'm not considering?
EDIT: It's required to be a CSG