1

For my homework assignment, I have to come up with a non-cfl that is pumpable. I came up with the following: $$ C = \{a^n b^n c^n d^m \mid n \ge 1 \text{ and } m \ge 1 \} $$

I'm not sure whether this works. For the pumping lemma, let $p$ being the pumping length. If I generate a string with $p$ $a$'s, $b$'s, and $c$'s, and only one $d$, my only choice for $vxy$ would be $d$. Pumping this down to $v^0xy^0$ gives $a^p b^p c^p$, thus escaping the language. However, if I let $m$ be greater than or equal to zero, if I choose a string with no $d$'s, then I am forced to put either $a$'s, $b$'s or $c$'s in my $vxy$ string.

Gilles 'SO- stop being evil'
  • 43,613
  • 8
  • 118
  • 182
Yuen Hsi
  • 19
  • 1

1 Answers1

0

As you say "thus escaping the language" which means your example language is not pumpable: for $m=1$ we cannot pump $d$ and stay in the language. Instead consider $D= C \cup \{a,b,c\}^*$. Now we can pump $d$ whenever it is present, and we can pump any string that does not contain $d$.

Hendrik Jan
  • 30,578
  • 1
  • 51
  • 105
  • Hey, thanks for your response; I thought of doing that but I didn't know how to proof that D is not context free. Even though C isn't a CFL, I thought CFL languages are not closed under union? {a, b, c}* is regular, isn't it? – Yuen Hsi Oct 13 '13 at 20:29