algorithms (implemented in Python) from Graph Theory and its Applications, Gross and Yellen, 2nd ed.