1

Is anybody can help me please to determine is this language is Context-free language or not?

L={wvw | w,v∈{a,b,c}+}

for example:

part of the language: acbac, abcab, bbcbb

not part of the language: abab, aa, abcc

I tried to prove using pumping lemma for context-free languages like that:

I take this word from language w=aacbbaa. I split the word to 5 parts uvxyz and if I can pump u and y and the word stays inside language the language is context-free:

u-aa, v-cc, x-b, y=bb, z=aa 
after I pump v and y the word is still in language-> 
u-aa, v-cccc, x-b, y=bbbb, z=aa -> 
aaccccbbbbbaa

But the answer inside answers section is that the language is not context-free.

What wrong with my prof?

D.W.
  • 167,959
  • 22
  • 232
  • 500
Michael
  • 111
  • 1

1 Answers1

2

You can't use the pumping lemma to prove that a language is context-free (see, e.g., here). The pumping lemma is only useful to prove that the language is not context-free. See our reference questions for details on how to prove that a language is or isn't context-free: How to prove that a language is context-free?, How to prove that a language is not context-free?.

So, one thing wrong with your proof is where you say "if... the word stays inside language the language is context-free" -- that's not correct.

D.W.
  • 167,959
  • 22
  • 232
  • 500