Problem Set 8: Dynamic Programming Problem 4: Subject Selection By Dynamic Programming The solution to this problem can be achieved using the Knapsack Problem. I found the 3 part youTube tutorial at http://youtu.be/hugQNiYoqUA http://youtu.be/WL6NETCcvkg http://youtu.be/Z9sMTFh5AXQ to be particularly helpful and therefore decided to write the equivalent in python (version 3.2). Hope this helps.
Here is the code
I also found some lectures that cover the knapsack problem (among others). Nothing fancy (pen and paper)--illustrates solutions from brute force to dynamic programming. Lectures 16, 17, 18 http://nptel.iitm.ac.in/video.php?subjectId=106101060
I also found this helpful: http://20bits.com/articles/introduction-to-dynamic-programming/ It helped me figure out the problem a few weeks ago :)
Join our real-time social learning platform and learn together with your friends!