i have a problem with an exercise:
L = {an bm cp | 1 <= n <= m <= p}
Is it possible write a grammar for that exercise ?
I do not understand how to solve it :( please help me
i have a problem with an exercise:
L = {an bm cp | 1 <= n <= m <= p}
Is it possible write a grammar for that exercise ?
I do not understand how to solve it :( please help me
The language meets the conditions of the context-free pumping lemma (for any string in the language, you can choose to pump the c's, and the resulting string remains in the language), but that's not sufficient to prove that the language is context-free.
Ogden's lemma should work, though. For a sufficiently long input string, you can choose the "distinguished positions" to be all a's, which forces the a's to be pumped, and eventually the string will be "pumped out of the language" when the number of a's exceeds the number of b's or c's.