11
I have the following language
$\qquad \{0^i 1^j 2^k \mid 0 \leq i \leq j \leq k\}$
I am trying to determine which Chomsky language class it fits into. I can see how it could be made using a context-sensitive grammar so I know it is atleast context-sensitive. It seems like it wouldn't be possible to make with a context-free grammar, but I'm having a problem proving that.
It seems to pass the fork-pumping lemma because if $uvwxy$ is all placed in the third part of any word (the section with all of the $2$s). It could pump the $v$ and $x$ as many times as you want and it would stay in the language. If I'm wrong could you tell me why, if I'm right, I still think this language is not context-free, so how could I prove that?
I'm not sure how to make it a formal proof, but ensuring i<=j<=k requires context (the value of the previous variable). – Kevin – 2012-03-21T18:32:55.363
1
possible duplicate of How to prove that a language is not context-free?
– Raphael – 2012-03-21T21:37:23.450@Raphael, I read that post before this one and didn't know how to apply it to my example because of it's abstractness. With the relationship of each character being >= the number of previous characters, I couldn't see how to split the uxyzv into the word to use Ogden's lemma. BlueMagister and jmad expanded on the other post to make it clear for my example. – justausr – 2012-03-21T22:26:42.513
@Raphael I disagree that this is a trivial application of the general case. Choosing which method to use and what example to apply it to is not so easy. – Gilles 'SO- stop being evil' – 2012-03-21T22:58:53.197