Karger's Algorithm - Running Time - Edge Contraction

373 Views Asked by At

In Karger's Min-Cut Algorithm for undirected (possibly weighted) multigraphs, the main operation is to contract a randomly chosen edge and merge it's incident vertices into one metavertex. This process is repeated until two vertices remain. These vertices correspond to a cut. The algo can be implemented with an adjacency list.

Questions:

  1. how can I find the particular edge, that has been chosen to be contracted?

  2. how does an edge get contracted (in an unweighted and/or weighted graph)?

  3. Why does this procedure take quadratic time?

Edit: I have found some information that the runtime can be quadratic, due to the fact that we have O(n-2) contractions of vertices and each contraction can take O(n) time. It would be great if somebody could explain me, why a contraction takes linear time in an adjacency list. Note a contraction consists of: deleting one adjacent edge, merging the two vertices into a supernode, and making sure that the remaining adjacent edges are connected to the supernode.

Pseudocode:

procedure contract(G=(V,E)):
while |V|>2
    choose edge uniformly at random
    contract its endpoints
    delete self loops
return cut

I have read the related topic Karger Min cut algorithm running time, but it did not help me. Also I do not have so much experience, so a "laymens" term explanation would be very much appreciated!

0

There are 0 best solutions below