Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

Re: Recursively-generated Iterators

by spurperl (Priest)
on May 19, 2005 at 05:18 UTC ( #458526=note: print w/replies, xml ) Need Help??

in reply to Recursively-generated Iterators

Nice ++

I wonder how general your technique is - I mean is it applicable only the to computation you present, or is it generally good for all memory-eating recursive computations ? Can one formulate a general algorithm for this transformation ?

By the way, another technique to ease these computations is Memoization. It is almost always very helpful for recursive algorithms like the one you present.

Replies are listed 'Best First'.
Re^2: Recursively-generated Iterators
by Roy Johnson (Monsignor) on May 19, 2005 at 17:27 UTC
    It should be applicable to any algorithm that generates a set where different portions of the set are generated by different recursive calls. That's mostly combinatorial things like this, but Towers of Hanoi would also be a good example. If each item in the returned set required some value from more than one recursive call, you couldn't do it this way.

    Caution: Contents may have been coded under pressure.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://458526]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (6)
As of 2022-12-02 08:56 GMT
Find Nodes?
    Voting Booth?