1

I have a question involving the Pumping Lemma for Regular Languages and Pumping Lemma for Context-free Languages: Is it possible that there's a language which doesn't meet the criteria for the pumping-lemma for context-free languages but does meet the criteria for the pumping-lemma for regular languges?

Or is there a hierachy similar to the Chomsky-Hierachy?

I'm just trying to understand that and pumping lemma in general

  • 1
    *Any* regular language won't satisfy the PL for CFLs but will for RLs; that's kind of the point. – Scott Hunter Jan 06 '23 at 20:42
  • I don't understand yet why because a regular language should be according to the chomsky-hierachy above the CFL and must then be a CFL itself and therefor should be able to meet the PL criteria for CFL or am I wrong? – SmallBrainStudent Jan 06 '23 at 20:51
  • And if a language does not satisfy the PL for CFL it should't be able to satisfy the PL for RL...or that's what I'm thinking right now – SmallBrainStudent Jan 06 '23 at 20:53
  • If the language is context free, but not regular you might be able to proof that using the PL for regular languages. But as that language is CF you can not use the PL for CFL to proof that is isn't. – Max Jan 12 '23 at 10:03

1 Answers1

0

Is it possible that there's a language which doesn't meet the criteria for the pumping-lemma for context-free languages but does meet the criteria for the pumping-lemma for regular languges?

Let's consider the classic a^nb^n language. aabb is in it, while abb is not.

We know it is a CFL. (S -> aSb | epsilon)

We can proof that is is not a regular language using the PL for CFL (cf. https://stackoverflow.com/a/2309755)

The PL for CFL is used to proof that a language is NOT CF. But the language IS CF (see above!).

Thus we can never use the PL for CFL for the language to proof that is it not CF.


A regular language [...] must be a CFL itself and therefore should be able to meet the PL criteria for CFL or am I wrong?

Yes, any RL is also a CFL (and also a CSL and also a REL). You are wrong in your conclusion though.

The PL is used to proof that a given language is NOT in the class. So we use the PL for RL to show that a language is not a RL, so "at most" CF. And we use the PL for CFL to show that a language is not even a CFL, so "at most" context sensitive.


Is there a hierarchy similar to the Chomsky-Hierarchy ?

Well if you can proof a language is not context free, it can also not be regular, as RL is a subset of CFL.

Max
  • 965
  • 1
  • 10
  • 28