Talk:Knapsack problem/Unbounded: Difference between revisions

→‎Dynamic Python solution: The decimal points need shifting
No edit summary
(→‎Dynamic Python solution: The decimal points need shifting)
Line 12:
 
::: Let n = the number of types of items. So what I am saying is that you are taking the product of n things. So as n grows, you can think of it as something like (something)^n in the worst case. Or in other words, every time you add a new type of item, you always have to multiply it by some (potentially big) number. With the dynamic programming solution, it runs in time of (something)*n; so when n is already very big, adding a new type of item does not increase it by very much. Perhaps you can experiment with this and see what happens if you add a whole bunch of new items. --[[User:Spoon!|Spoon!]] 10:01, 3 December 2008 (UTC)
 
The decimal points need shifting in the printout of the Python "Dynamic Programming solution". --[[User:Paddy3118|Paddy3118]] 13:17, 2 January 2009 (UTC)
Anonymous user