home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.compilers
- Path: sparky!uunet!charon.amdahl.com!pacbell.com!sgiblab!darwin.sura.net!europa.asd.contel.com!emory!sol.ctr.columbia.edu!eff!world!iecc!compilers-sender
- From: jos@and.nl (Jos Horsmeier)
- Subject: Re: Theoretical CFG question
- Reply-To: jos@and.nl (Jos Horsmeier)
- Organization: AND Software BV Rotterdam
- Date: Tue, 17 Nov 1992 12:31:04 GMT
- Approved: compilers@iecc.cambridge.ma.us
- Message-ID: <92-11-091@comp.compilers>
- References: <92-11-067@comp.compilers> <92-11-077@comp.compilers>
- Keywords: parse
- Sender: compilers-sender@iecc.cambridge.ma.us
- Lines: 25
-
- norlin@essex.ecn.uoknor.edu (Norman Lin) writes:
- |For i>=1, let b(i) denote the string in 1(0+1) that is the
- |binary representation of i. Construct a CFG generating
- | +
- | {0,1,#} - {b(1)#b(2)# ... #b(n) | n>=1}
-
- I wrote:
- |If you apply the pumping lemma, it would show that this language is _not_
- |a context free language, so there exists no CFG that can generate this
- |language. No word in this language can be written
- | i i
- |as UVWXY, such that UV WX Y, for i >= 0 is an element of this language too.
- |Or am I missing something here?
-
- Well, I didn't miss just something, I missed it completely. The
- _complement_ of the language is not a CFL. But this language is, as
- someone else already pointed out in another reply. My apologies for the
- confusion ...
-
- kind regards,
-
- Jos aka jos@and.nl
- --
- Send compilers articles to compilers@iecc.cambridge.ma.us or
- {ima | spdcc | world}!iecc!compilers. Meta-mail to compilers-request.
-