Graphs and the Contraction Algorithm (Course Notes)