Time remaining:
Dynamic Programming

label Computer Science
account_circle Unassigned
schedule 0 Hours
account_balance_wallet $5

I do not understand these two lines in the knapsack problem. Can someone break it down for me: m[i,w] = m[i-1, w]; if w sub i > w //line 1 m[i,w] = max(m[i-1,w], m[i-1, w - w sub i] + v sub i) if w sub i<= w //line 2 Does line one mean that the benefit of the first i items is the benefit of the first i-1 items? And what does line 2 mean?
Nov 20th, 2013
i can help you
Nov 20th, 2013

Studypool's Notebank makes it easy to buy and sell old notes, study guides, reviews, etc.
Click to visit
The Notebank
...
Nov 20th, 2013
...
Nov 20th, 2013
Jun 24th, 2017
check_circle
Mark as Final Answer
check_circle
Unmark as Final Answer
check_circle
Final Answer

Secure Information

Content will be erased after question is completed.

check_circle
Final Answer