min cut randomized algorithm