Re: Exercise 2.1.2 from Aho&Ulman The theory of Parsing textbook?



On Apr 25, 6:18 pm, Lech Duraj <ldu...@xxxxxxxxxxxxxxxxxxxxxxxxxx>
wrote:
Next the exercise 2.1.4c (marked as more difficult:-) extends this
problem to 3 letters. I fail to see, however, why they need context
sensitive grammar. Wouldn't just

Y = YaYbYcY + <other 5 permutations of a,b,c> + 1

work?

And how would you generate "aabbcc"?

I understand that one can always suspect a homework question (this is
why people may be reluctant to give a full answer). Due to the time
lapse let's assume this homework is long time due, so can somebody
please be generous to provide an answer? Or a hint, at least?
(Needless to say, that nothing in the preceding material in Aho&Ullman
book helps developing an intuition how to solve this kind of problems.
All I have is an example of a^n b^n c^n and quite an awkward looking
grammar where nothing is left from the a^n b^n c^n original
symmetry).
.



Relevant Pages