Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

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.

Comment on Re: Recursively-generated Iterators
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
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 browsing the Monastery: (8)
As of 2015-10-09 16:19 GMT
Find Nodes?
    Voting Booth?

    Does Humor Belong in Programming?

    Results (244 votes), past polls