Lecture 13: Dynamic programming: overlapping subproblems, optimal substructure Instructors: Prof. Eric Grimson, Prof. John Guttag View the complete course at: ocw.mit.edu License: Creative Commons BY-NC-SA More information at ocw.mit.edu More courses at ocw.mit.edu
In this final part of the dynamic programming solution to the 1/0 knapsack problem, we actually work out what items we need to place into the knapsack to get the optimal solution.
The Dynamic Programming method to solving the 0/1 Knapsack Problem. Note: I uploaded the wrong version cos I’m an idiot. There are three bugs. Bug 1: Ignore the “The cell with the green circle around has a capacity of” blah blah etc. because I uploaded the wrong version ._. The green circle should be around cell (3,1). Bug 2: I circle item ‘1′ when I should circle item ‘3′ at the end when we’re going through the keep array. I fail. Bug 3: I say ‘2′ somewhere instead of ‘3′. See if you can spot it.
PART 2/2 0:15 – I’ve never visted any one in jail but isn’t there normally a glass partition in between prisoner and visitor, with the two talking by phone? I believe only spouses get unobstructed contact. But I could be wrong 0:19 – Noah: “she’s not coming” Well, that ’s because you won’t have sex with her, Noah! ☺ Sorry, I couldn’t resist. I’ll stop… (and those who have no idea what I’m saying should just stay innocent) 1:14 – Win: “I wrote you a letter, maybe you didn’t get it” So WTF happened to that letter??? Who stole it out of Luke’s knapsack? It is one of two major unanswered questions about this storyline. The other is: What did Win want the first time, when the warden summoned Noah, leading to that ill-fated roadtrip. What was so important that couldn’t be handled on the phone? 2:15 – Noah: “find out what you want with Ameera” Then why didn’t Noah just call, instead of driving so far? Or better yet, have Ameera call and listen in 3:39 – Noah: “You killed my mother” / Win: “that woman was a liar and a whore” For those who don’t know, when Noah was an infant, his mother became a prostitute for some reason and Win threw her out. She later became a madame and found her way to Oakdale, where Win murdered her last year 7:15 – Luke: “a part of me, a REALLY BIG PART, wishes that we just never got involved in this” Hmm, I wonder what “big part” that is? heh. Sorry, but I just can’t help it when the writers are shoving all these sexual double-entendres in my face!!! 7 …