Skip to content

5hir0kur0/RandomizedMinCut

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Randomized MinCut Algorithm (FastCut)

This repository contains a Rust implementation of the "FastCut" randomized minimum cut algorithm introduced by Karger and Stein (see Figure 6 in A New Approach to the Minimum Cut Problem).

I wrote the program for an oral examination for a randomized algorithms class at university. It is probably not suitable for application to real-world problems.

Example Of a Computed MinCut Visualized Using VANTED

(A GML file output by this program. Visualized using VANTED).

Features

  • MinCut Estimation
  • Parallelized Computation
  • GML Output (No Layout)

Usage

./mincut [-v] <PATH_TO_GRAPH>

If the -v is specified, a visualization of the result is written to <PATH_TO_GRAPH>.gml.

Graph Format

This program processes undirected graphs with unit weights. It reads plain text files that specify the edges. The nodes are assumed to be numbered with integers from 0 to <num_nodes>. The input format is as follows:

<num_nodes>
<num_edges>
<source1> <target1>
<source2> <target2>
...

Graph Representation

The graph is internally represented as an adjacency matrix. Since it is undirected it is enough to store the upper triangular matrix.

Example matrix:

Graph Data Structure Visualization

About

Randomized MinCut Algorithm (Karger and Stein) Implementation for "Randomized Algorithms" Class

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published