[plt-scheme] equal? and shared structure
I don't think that's the right algorithm, unless I'm misunderstanding.
Those algorithms only work for linear cycle detection, not trees.
The basic algorithm Kent used is union-find, but he did a bunch of
tricks to avoid the large overhead when there is no sharing and then
tricked up his tricks some more to get most uses of equal? fast.
Robby
On Dec 19, 2007 7:00 AM, Jens Axel Soegaard <jensaxel at soegaard.net> wrote:
> For the algorithm itself, see:
>
> http://en.wikipedia.org/wiki/Floyd%27s_cycle-finding_algorithm
>
> --
> Jens axel Søgaard
>
>
>
> _________________________________________________
> For list-related administrative tasks:
> http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>