add partially implementation of Karger's algorithm