Here are some class notes that contain some very good ideas withterrific explanations:http://www.cs.duke.edu/education/courses/fall01/cps216/