On ps8, is there a good way to visualize how to obtain the "winning" set of items using the decision tree presented in the lecture? Most everywhere I have looked use the "bottom-up" table : http://www.youtube.com/watch?v=EH6h7WA7sDw Would like to know if folks who have solved it visualized it using the table rather than the decision tree. Thank you.
i used the decision tree methodology presented in the lecture and adapted the fastMaxVal function that was presented in the lecture. never saw that table method till someone posted it recently - I tried it out and the table method is about ten times faster than my decision-tree solution.
Thank you. Looking at the binary decision tree I had a hard time figuring out how to keep track of which item (course) had been put in the knapsack. Looking at the table for the keep matrix was a lot easier to figure out how to write the code and eventually I got it. I think I need a lot more practice on Dynamic Programming. :)
i'm still not sure i could use it effectively.
Join our real-time social learning platform and learn together with your friends!