[plt-scheme] Re: HTDP Exercise 12.4.2 ... Help!

From: wooks (wookiz at hotmail.com)
Date: Sun Apr 26 10:14:38 EDT 2009

On Apr 26, 7:19 am, S Brown <ontheh... at gmail.com> wrote:
> I've been trying to do this exercise all evening. Actually, I started
> this morning but got so frustrated that I took my dogs to the park to
> blow off some steam! I've already read through an archived discussion
> of this exercise from back in June/July of 2006 from this group, it's
> helped a little, but I don't think I would have gotten even this far
> without having found that thread. So... I'm just looking for someone
> (s) who would be nice enough to help me figure out how to solve this
> exercise using the design recipes.


I came back to this exercise a couple of weeks ago...and once again it
took me days to reason it out.. truly it is an acid test of ones grasp
of the design recipe.

The trouble with being an experienced programmer coming to this is
that one tends to prematurely give up on the data analysis steps and
hence you do not get all the mileage out of the design recipe and
instead resort to a bunch of ad-hoc hacks. This problem shows that the
right questions applied to a  rigorous systematic exploitation of the
data structure can get you farther than you think.

1. Identify all the auxiliary functions you need.
2. When applying the design recipe to each auxiliary function don't
forget to assume that the inductive step works. Write out examples
with this assumption and this should give you a clue as to what you
need to add to move from what it gives you to what you want.

Posted on the users mailing list.