Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

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
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?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (5)
As of 2014-07-14 03:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (254 votes), past polls