-1

How can one prove that the language below is not context-free using the pumping lemma?

$$\{ a^i b^m a^j b^m a^k b^m \mid i,j,k,m \geq 0 \}$$

Hans Hüttel
  • 2,496
  • 10
  • 17
  • You cannot, since this language is context-free. – Yuval Filmus May 15 '17 at 18:51
  • can explain more for your answer ? @YuvalFilmus – Shahin Ghasemi May 15 '17 at 18:56
  • can you build a PDA/define a CFG for $b^mb^m$? If so, you can do it also for $a^b^ma^b^ma^*$. – abc May 15 '17 at 19:05
  • sorry , i edited the language , so you said there is no possible way to prove ? @newbie – Shahin Ghasemi May 15 '17 at 19:20
  • You cannot prove something which is false. – Yuval Filmus May 15 '17 at 19:45
  • @newbie $b^mb^m$ is regular, yet $a^b^ma^b^ma^*$ isn't. So it's not so simple. – Yuval Filmus May 15 '17 at 19:46
  • but in the question say prove this is not context - free , what's wrong ? does it depends on (m) condition ? what if changing m? ( for example m>=1)? – Shahin Ghasemi May 15 '17 at 19:52
  • what do you mean about "it's not so simple"? so we can't prove ?please not that i changed the language . – Shahin Ghasemi May 15 '17 at 19:54
  • 1
    The point of exercises such as this is to give you practice in using the pumping lemma. Whatever learning resource you're using (textbook, lecture notes, etc) probably already has several examples of using the pumping lemma. Us turning this exercises into another example for you probably won't help you a whole lot: the benefit comes from figuring it out yourself. – David Richerby May 15 '17 at 22:12
  • Welcome to Computer Science! What have you tried? Where did you get stuck? We do not want to just hand you the solution; we want you to gain understanding. However, as it is we do not know what your underlying problem is, so we can not begin to help. See here for tips on asking questions about exercise problems. If you are uncertain how to improve your question, why not ask around in [chat]? – Raphael May 15 '17 at 22:14

1 Answers1

-1

Suppose that $a^* b^m a^* b^m a^* b^m$ is context-free. Applying the inverse of the homomorphism defined by $a\mapsto a$ and $b,c,d \mapsto b$, we see that $a^* (b+c+d)^m a^* (b+c+d)^m a^* (b+c+d)^m$ is also context-free. Intersecting with the regular language $b^* a c^* a d^*$, we see that $b^m a c^m a d^m$ is also context-free. Applying the homomorphism defined by $a \mapsto \epsilon$ and $\sigma \mapsto \sigma$ for $\sigma=b,c,d$, we see that $b^mc^md^m$ is also context-free. But we know that it's not context-free.

Yuval Filmus
  • 276,994
  • 27
  • 311
  • 503