[algogeeks] Re: Memorization

2011-10-12 Thread Gene
This is true when memoization is being used to merely improve asymptotic efficiency of a single computation. (As you say, it's a nice technique for DP, when you can often just remember one or a few previous rows of results.) However this is not the only use. General memoization maintains values

[algogeeks] Re: Memorization

2011-10-11 Thread Gene
Memoization just adds a persistent map for the memoized function. It stores mappings from tuples of function arguments to the corresponding return value. Each time the function is called, its memoized version first checks the map to see if a result has already been computed. If so, it just