Newsgroups: sci.lang
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!news2.near.net!news.mathworks.com!gatech!news.sprintlink.net!simtel!noc.netcom.net!netcom.com!smryan
From: smryan@netcom.com (Ahmed)
Subject: Re: Formal Language [Help, Help, Help]
Message-ID: <smryanD901GI.6M6@netcom.com>
Organization: The Hot Tub at Ground Zero
X-Newsreader: TIN [version 1.2 PL1]
References: <3pi6fm$iv3@pipe1.nyc.pipeline.com>
Date: Mon, 22 May 1995 21:38:41 GMT
Lines: 32
Sender: smryan@netcom23.netcom.com

: 1) Let L = {a to the power P where P is a prime}. I need to prove that L*
: is regular. 

This looks like Goldbach's Conjecture. I think Polya proved any number
can be written as the sum of three primes. That would mean L = 0 | aa+
You'll have to check this, because my memory's hazy.

: 2) I need to show that L = {a to the power 2M where m >= 0} is not context
: free and that it is context sensitive. I will need to provide a grammar for
: L. 

The Pumping Lemma is usually used to prove a language is not context
free. (There are two lemmas, one for regular and one for CF.)

I don't remember the exact restrictions on type 1 grammars. I think
this is correct.

:L:->	:xaz:		Initial string.

:x:a->	:w:a		Remove x and z.
a:wa:->	a:aw:
a:wz:->	a::

x:a:->	x:aay:		Double each a.
a:ya->	a:aay:
a:y:z->	a::z

-- 
The Brothers of the brooding Dark,         | smryan@netcom.com  PO Box 1563
the Fathers of the fighters stark,         |          Cupertino, California
that left their might, the Lake and Height,| (xxx)xxx-xxxx            95015
and met the Mother moist and dark.         |              intolerance kills
