home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.compilers
- Path: sparky!uunet!think.com!spdcc!iecc!compilers-sender
- From: jos@and.nl (Jos Horsmeier)
- Subject: Re: Theoretical CFG question
- Reply-To: jos@and.nl (Jos Horsmeier)
- Organization: Compilers Central
- Date: Sun, 15 Nov 1992 14:57:29 GMT
- Approved: compilers@iecc.cambridge.ma.us
- Message-ID: <92-11-077@comp.compilers>
- References: <92-11-067@comp.compilers>
- Keywords: parse, question
- Sender: compilers-sender@iecc.cambridge.ma.us
- Lines: 21
-
- 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}
- |
- |[ ... ] Does anyone have any ideas about this problem?
-
- 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?
-
- 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.
-