Kargers mincut algorithm