Git Product home page Git Product logo

minimum-cut-of-an-undirected-graph's Introduction

Minimum cut of an undirected graph

The Stoer-Wagner min cut algorithm determines a min-cut and the min-cut weight of a connected, undirected graph.

A cut of a graph G is a partition of the vertices into two, non-empty sets. The weight of such a partition is the number of edges between the two sets if G is unweighted, or the sum of the weights of all edges between the two sets if G is weighted. A min-cut is a cut having the least weight.

In this work you can find demonstrative realization of min-cut algorithm. It generates png image of graph using graphviz tool.
So, you're gonna need to use following commands after cloning the repo:

cd ./terminal-edition
./lab02 | dot -Tpng -o $RANDOM.png

Output is visualizesd through Graphviz tool.
Graphviz is a standard package on many linux distributions. You can check if it is installed with a command like

dpkg -s graphivz

If it is not installed, you should be able to install it with your system's package manager. i.e.

sudo apt-get install graphviz

or search 'graphivz' in the Software Center on Ubuntu.

After that just list all files of the directory

ls

You are supposed to see .png files, they contain picture of random graph with number of nodes that were cut by a program.
To remove test images (.png files), type

rm *.png

You also can view the source code in ./src folder.\

Demo:

Result of the program work should look similar to that image. minimum cut - Animated gif demo That's about all :octocat: 💕

minimum-cut-of-an-undirected-graph's People

Contributors

mzhirko avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.