Exercise 2.1.2 from Aho&Ulman The theory of Parsing textbook?
- From: Tegiri Nenashi <TegiriNenashi@xxxxxxxxx>
- Date: Mon, 21 Apr 2008 16:53:42 -0700 (PDT)
"Construct CFG that generates all strings having equal number of a's
and b's"
My attempt:
X = 1 + aXa + aaX +Xaa + bXb + Xbb +bbX +YY
Y = 1 + (a+b)Y
looks too complicated for such concise problem statement. Any shorter
solution?
.
- Follow-Ups:
- Re: Exercise 2.1.2 from Aho&Ulman The theory of Parsing textbook?
- From: Barb Knox
- Re: Exercise 2.1.2 from Aho&Ulman The theory of Parsing textbook?
- From: Ben Bacarisse
- Re: Exercise 2.1.2 from Aho&Ulman The theory of Parsing textbook?
- Prev by Date: How to run utility in windows XP
- Next by Date: Re: Exercise 2.1.2 from Aho&Ulman The theory of Parsing textbook?
- Previous by thread: How to run utility in windows XP
- Next by thread: Re: Exercise 2.1.2 from Aho&Ulman The theory of Parsing textbook?
- Index(es):
Relevant Pages
|