Table of Contents

Chapter 6

Dynamic Programming

divide and conquer - use sub problems and build up to correct sultion.

6.1 Weighted Interval Scheduling A Recursive Prosedure

Designing a Recursive Algorithm

Weighted interval scheduling

Computing the optimal solution

6.2 Principles of Dynamic Programming: Memoization or iteration over subprobs

A basic outline of Dynamic Programming

6.3 Segmented Least Squares: Multi way Choices

The problem

Designing the alogirthm

6.4 Subset Sums and Knapsacks: adding a var

The problem

Designing an algorithm

There is an expansion section on the knapsack problem that looks at a different restriction on weight.

6.6 Sequence alignment

Problem: suppose I type provlem in google as opposed to problem. google looks for problem as the match. So basically matching sequences of letters to find workds. - we can either have a match, or a gap. If it is a match it can be correct or a mismatch or a gap can be on the x word or the y word. - we give weights to each option then we have figure out the optimal sequence from that. - see 6.16 - see page 282 or the algorithm - the graph image on 283 makes it really easy for me to understand.

6.7 Sequence Alignment in LInear Space via

6.8 Shortest path in a Graph