Re:Dynamic Programming: The Name (1984)
by santaclaus on Sunday September 11, 2016 @10:18PM
(#12476795)
Don't even get me started on memoization...
[ Parent
| on HN ]
That was my first thought too. I thought the page was referring to DP/Memoization[1], initially. Thats the most useful concept I learnt about a decade back, and was fortunate to be able to find a case in real-life to apply it.
I have often a hard time explaining it though. But very simply (the way I explain) it is, you compute and keep lot of results for lower values e.g. value of f(x,y) where x,y are less than some larger n,m respectively. And for computing f(n,m) you would need to compute f(x,y) a number of times for varying values of x,y. So if you keep it in memory. You save hell lot of a computing time. And your program runs in a fraction of time of what it would take other wise.
[1] https://www.topcoder.com/community/data-science/data-science...
Edit: minor correction
Re:Dynamic Programming: The Name (1984)
by wfunction on Monday September 12, 2016 @04:54PM
(#12483575)
The thing is, there is no stipulation that the subproblems be any "smaller" than the original problem. They just need to be instances of the same problem combining together in a manner that solves the original problem.
Re:Dynamic Programming: The Name (1984)
by aws_ls on Tuesday September 13, 2016 @09:52AM
(#12488202)
Yes, I can think of a case where how it may be used to solve some problems on a M x N grid, where in you could move in either directions top-left to bottom-right Or vice-versa.
I perhaps used smaller where subproblem may be a more optimal use.
- "You mean caching?"
- "Nope, memoization."
- "Uh ok."
Re:Dynamic Programming: The Name (1984)
by tdb7893 on Sunday September 11, 2016 @11:26PM
(#12476992)
I like that it's not called caching because caching for me makes me think that there is some sort of eviction policy. I generally talk about "storing" data in "lookup tables" if I'm talking to someone not familiar with the jargon
Good point. Caching does usually refer to a temporary memory store.
Re:Dynamic Programming: The Name (1984)
by wfunction on Sunday September 11, 2016 @11:34PM
(#12477025)
IMO:
caching : memoization :: program performance : algorithm performance
Re:Dynamic Programming: The Name (1984)
by RussellDussel on Monday September 12, 2016 @02:44AM
(#12477677)
The problem with "memoize" is people always think I'm trying to say "memorize" with a speech impediment, especially because both words usually (kind of) make sense in the context.
Re:Dynamic Programming: The Name (1984)
by YeGoblynQueenne on Tuesday September 13, 2016 @12:44PM
(#12489982)
Also, some spellcheckers will surreptitiously auto-"correct" memoization to "memorization" (as, e.g. Word, and I happen to know it does that because it did it in my Master's dissertation; luckily, just a footnote but probably made me look like an idiot trying to show off with terms I don't understand).
I'm not actually sure that's a problem. You just have another way to fizz-buzz lay people.
Re:Dynamic Programming: The Name (1984)
by brightball on Sunday September 11, 2016 @10:21PM
(#12476805)
I regret that I have but one up vote to give