Karger's min-cut algorithm implemented in python
contract_edge does not select edges with uniform distribution, because first a random vertex is selected and then a random edge of that vertex is chosen. This produces a skewed distribution on edges, with edges on low degree vertices having a higher chance of beeing selected than those of high degree vertices.