Text this: Elements of dynamic and 2-SAT programming: paths, trees, and cuts