Ask your own question, for FREE!
MIT 6.00 Intro Computer Science (OCW)
OpenStudy (anonymous):

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.

OpenStudy (anonymous):

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.

OpenStudy (anonymous):

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. :)

OpenStudy (anonymous):

i'm still not sure i could use it effectively.

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Latest Questions
Tonycoolkid21: help
6 hours ago 8 Replies 0 Medals
Tonycoolkid21: help
6 hours ago 15 Replies 3 Medals
crispyrat: A guide to sqrt and cbrt
6 hours ago 21 Replies 3 Medals
xXQuintonXx: help please(ss below)
8 hours ago 5 Replies 1 Medal
rxcklesskaisher: idk wdh dis is
8 hours ago 2 Replies 0 Medals
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!