Code for the graph theory lecture