Algorithms

Spring 2013
course
navigation

Apr 16

end of term

Proposal for a final project due next Tuesday. I'll have a list of suggested topics by Thursday, but essentially you're welcome to pick something along the lines of what we've been doing. The idea is to pick one, do a bit of online research or look into one of the algorithms from skiena's reference section, implement it, explain it, and write it up.

new business

Dynamic programming - chapter 8 in Skiena.
We'll be primarily looking at the knapsack problem as an example.
I found the textbook hard to follow for this material. But there are many online sources; google "dynamic programming" and "knapsack problem".
What we've done so far:
This week a new well-known approach : the badly named "dynamic programming".
Usefully primarily for combinatoric search problems. The basic is to state the problem in terms of smaller ones, then do it recursively ... BUT save results - don't calculate anything twice. Equivalently, if the ordering of the smaller problems is clear, we can explicitly loop over them.
The memoize.py fibonocci we looked at last week is one of these.
I have several examples in dynamic programming ; look at
We did the brute force coding in class; the file is in that folder named knapsack_1_in_class.py .
We discussed the dynamic programming version, and agreed to code it in class on Thursday.
http://cs.marlboro.edu/ courses/ spring2013/algorithms/ notes/ Apr_16
last modified Tuesday April 16 2013 11:02 am EDT