Ask your own question, for FREE!
MIT 6.00 Intro Computer Science (OCW) 19 Online
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
AsiaLovesYhuuu: Do anybody wanna VC , I need somebody to study wud83dude2dud83dudc94 .
4 hours ago 5 Replies 0 Medals
kamariana: Rate my drawing. u2606u2606u2606
6 hours ago 7 Replies 3 Medals
addydabaddie123: should abortion be legal or illegal in Oregon? why?
15 hours ago 10 Replies 3 Medals
BTDRiley07: what is the chemical formula for sodium chloride
17 hours ago 3 Replies 0 Medals
BTDRiley07: how do i ask what is your phone number in spanish
18 hours ago 8 Replies 0 Medals
kamariana: Rate my drawing.
9 hours ago 33 Replies 9 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!