Re: A CFG for a CFL
From: Michael J. Fromberger (Michael.J.Fromberger_at_Clothing.Dartmouth.EDU)
Date: 04/25/04
- Next message: Bilal Sallakh: "Re: A CFG for a CFL"
- Previous message: Storm: "Graph Theory problem"
- In reply to: Michael Mendelsohn: "Re: A CFG for a CFL"
- Next in thread: Michael Mendelsohn: "Re: A CFG for a CFL"
- Reply: Michael Mendelsohn: "Re: A CFG for a CFL"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 25 Apr 2004 08:56:15 -0400
In article <408B5D49.72FE5433@msgid.michael.mendelsohn.de>,
Michael Mendelsohn <keine.Werbung.1300@msgid.michael.mendelsohn.de>
wrote:
> Bilal Sallakh schrieb:
> > The language
> > L = {x: x = w.w} is not a CFL, easily using the pumping lemma.
>
> This is not correct.
> It's not a regular Language, but it _is_ a context-free language.
Unfortunately, that is not correct: You are right, that L is not
regular, but for a given alphabet A, if |A| > 1 then the language
L = { wcw | w, c in A* }
is also not context-free. This is a common example used to demonstrate
the pumping lemma for CFL's. There is a pathological case where in
which L is a CFL when |A| = 1, but in that case, L is also regular
(odd-length strings and epsilon match).
> > However I found an elegant solution on the Stanford website:
> >
> > S -> AB | BA | A | B
> > A -> aAa | aAb | bAa | bAb
> > B -> aBa | aBb | bBa | bBb
>
> [...]
>
> Maybe I misunderstand your requirement:
> > L = {x: x is not of the form w.w : w in (0+1)*}
> You want a CFL over the alphabet {0,1}
> that contains no words x of the form x=w.w , right?
I believe that is the original poster's language, yes.
-M
-- Michael J. Fromberger | Lecturer, Dept. of Computer Science http://www.dartmouth.edu/~sting/ | Dartmouth College, Hanover, NH, USA
- Next message: Bilal Sallakh: "Re: A CFG for a CFL"
- Previous message: Storm: "Graph Theory problem"
- In reply to: Michael Mendelsohn: "Re: A CFG for a CFL"
- Next in thread: Michael Mendelsohn: "Re: A CFG for a CFL"
- Reply: Michael Mendelsohn: "Re: A CFG for a CFL"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|