# Create cfg and npda/pda for Language {ww}

I've been trying to make a CFG, and npda/pda for this language (to construct an npda for accepting the language):

L(M)={ww:w∈{a,b}∗,|w| is even}.

L′={wwR:w∈{a,b}∗},

but is there is a way to solve this L(M)={ww:w∈{a,b}∗,|w| is even}?

For example, abaaba∈L with w=aba.

Note that I'm not asking to prove by conduction or anything else.

• First of all, why should $|w|$ be even - it's not in your example. Then, $L'$ is a completely different language, and if I'm not totally wrong, $L$ is NOT context-free. So there is no pda/cfg. Jan 17 '15 at 12:55
• I'm just giving an example to show what i am asking exactly, |w| is another example I'm trying to understand it too. I'm looking at the book page 178 "An introduction to formal languages and Automata 5th" its solving L as in my example ! Jan 17 '15 at 13:05
• Can you post the exact text of the exercise (or whatever it is) and its context? Like this, it does not make sense. Jan 17 '15 at 17:25
• @lukas.coenig the example context says : "to construct npda's that accept this language" : L(M)={ww:w∈{a,b}∗,|w| is even}. Jan 17 '15 at 18:55

Short answer: $L$ is not context-free, so there is no CFG/PDA.