Extra reading

If you want more explanation of the basic dynamic programming algorithms, have a look at the very inviting presentation by Sean Eddy:

Sean Eddy on DP

If you want to go read about linear space algorithms, you will find that the course book is quite scarce, but there is a great paper which I mentioned by Myers and Miller:

Optimal alignments in linear space

The drawback is that they both describe a different computational problem, alignment with affine gap scores, and give a slightly version (if I remember correctly) by doing one forward sweep towards row i*, and then a backwards sweep from the last row toward i*+1, and then finding the optimal break point between i* and i*+1.

If you found linear space aligning interesting and want a challenge, consider this computational problem: Given two sequences, compute a graph representing all alignments with a score better than S in linear space. You will have to sacrifice the time complexity a little bit, but you can still compute it efficiently.