Re: Proving a Language Is Not a CFL
- From: Ben Bacarisse <ben.usenet@xxxxxxxxx>
- Date: Sun, 04 May 2008 18:35:13 +0100
Bernd L <berndlosert@xxxxxxxxx> writes:
This is a problem from Sipser's book which I'm unable to answer:
If A is a CFL and B is a regular language, then the intersection of A
and B is context free. Given this result, show that the language C =
{w : w in {a, b, c}* and contains an equal number of a's, b's and c's}
is not a CFL.
Let D be the language described by the regex (abc)*. This language is
regular and is a subset of C so the intersection of C and D is D which
is also context free. What gives?
You have the logic backwards. The statement one is to assume is that:
(A is CF) and (B is regular) => (A /\ B) is CF.
We are told to expect that not(C is CF). You show an example of D
that is regular and are surprised that (C /\ D) is CF but the
implication above is one way. It does not prohibit
not(C is CF) and (D regular) and (C /\ D) is CF
The theorem says that C's intersection with *all* regular languages is
CF. I image that you are expected to find one (or more) regular
languages whose intersection with C is clearly *not* a CFL. Does that
help?
--
Ben.
.
- Follow-Ups:
- Re: Proving a Language Is Not a CFL
- From: Bernd L
- Re: Proving a Language Is Not a CFL
- References:
- Proving a Language Is Not a CFL
- From: Bernd L
- Proving a Language Is Not a CFL
- Prev by Date: Re: Proving a Language Is Not a CFL
- Next by Date: Re: Proving a Language Is Not a CFL
- Previous by thread: Re: Proving a Language Is Not a CFL
- Next by thread: Re: Proving a Language Is Not a CFL
- Index(es):
Relevant Pages
|