Dynamic Programming
XKCD
http://www.geeksforgeeks.org/travelling-salesman-problem-set-1/
What is Dynamic Programming?
History of Dynamic Programming
“We had a very interesting gentleman in Washington named Wilson. He was Secretary of Defense, and he actually had a pathological fear and hatred of the word, research. I'm not using the term lightly; I'm using it precisely. His face would suffuse, he would turn red, and he would get violent if people used the term, research, in his presence. You can imagine how he felt, then, about the term, mathematical.”
Boyer-Moore String Matching
Needleman–Wunsch String Edit Distance
Common variant: Smith-Waterman, which doesn't assume the start and end points are aligned. This is useful in nucleotide sequencing.
Needleman-Wunch Edit Distance Table
Optimization for a single variable
Discrete optimization dynamic programming
Discrete optimization - pseudocode
N=product types
R=amount of production available
F=profit from producing the best thing(s)
+ gi(k) )
// Add variables one at a time
// Check each possible total
// Try out xi == k
RNA Folding
Goal: use existing RNA fabrication to build functional nanostructures.
Need to find the lowest energy state to predict how RNA will fold.
RNA types of folds
RNA energy states
Dynamic Programming + inner loops