Question: Download the following text file: kargerMinCut TXT File https://github.com/y-meguro/algorithms/blob/master/course1/week4/kargerMinCut.txt The file contains the adjacency list representation of a simple undirected graph. There are 200 vertices

Download the following text file:

kargerMinCut

TXT File

https://github.com/y-meguro/algorithms/blob/master/course1/week4/kargerMinCut.txt

The file contains the adjacency list representation of a simple undirected graph. There are 200 vertices labeled 1 to 200. The first column in the file represents the vertex label, and the particular row (other entries except the first column) tells all the vertices that the vertex is adjacent to. So for example, the 66th row looks like : "6 155 56 52 120 ......". This just means that the vertex with label 6 is adjacent to (i.e., shares an edge with) the vertices with labels 155,56,52,120,......,etc

Your task is to code up and run the randomized contraction algorithm for the min cut problem and use it on the above graph to compute the min cut. (HINT: Note that you'll have to figure out an implementation of edge contractions. Initially, you might want to do th is naively, creating a new graph from the old every time there's an edge contraction. But you should also think about more efficient implementations.) (WARNING: As per the video lectures, please make sure to run the algorithm many times with different random seeds, and remember the smallest cut that you ever find.) Wr ite your numeric answer in the space provided. So e.g., if your answer is 5, just type 5 in the space provided.

just run this code that done already and get answer:

https://github.com/y-meguro/algorithms/blob/master/course1/week4/mincut.cpp

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!