This code calculates the minimum cut on a graph - given two nodes, which edges should be cut?