Is the language {a,b,c} which words are divisible by 4 and the word start and ends with same letters is context free?

41 Views Asked by At

is the language above the {a,b,c} alphabet composed of words of length divisible by 4 starting and ending with the same letter context-free? I tried doing it with Pumping lemma but im not sure if i did it right. So f.e i choosed word

z = abacbcaa

k = 2^3 = 8 Then i split z into z = uvwxy, f.e z = a | b | ac | bc | aa

  1. vw != ϵ true
  2. |vwx| <= k true

Now i choose i = 2 so z would be

z = uv^2wx^2y = abbacbcbcaa

It turnded out that the lenght of this words i 11, so it's not Contex-Free? Did I do this right?