GithubHelp home page GithubHelp logo

navsuresh / maxflowproblem Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 0.0 4 MB

Implementation and comparison of various algorithms that solve the Maximum Flow Problem in Flow Networks

Python 5.70% Jupyter Notebook 19.45% C++ 74.85%

maxflowproblem's Introduction

MaxFlowProblem (UE16CS311 Project)

Our project involved implementing the following algorithms to solve the max flow problem: -Ford-Fulkerson Algorithm (Specifically, Edmond Karp's Implementation) -Dinic's Algorithm -Push-Relabel Algorithm -Relabel-to-Front Algorithm (Active node selection procedure in Push-Relabel Algorithm)

For demo purposes, there exists a Demo folder, with small graph input files. The input files follow the DIMACS format, as follows:

p max no_vertices no_edges n 1 s n no_vertices t a vertice_i vertice_j cap_ij . . .

-------------------------------------------------------------------------------------------------------

To change the input to the demo file, change file name in main to needed input file's names.

Compiling Instructions:

g++ algo_name.cpp -o algo_name

./algo_name.out

where algo_name is in {"E-K", "dinic", "pushrelabel", "relabeltofront"}

-------------------------------------------------------------------------------------------------------

The Final folder contains all the final codes: -GraphGen contains code to create the skeleton of random graphs for the purpose of solving the max flow problem based on certain specifications (no. of vertices and no. of edges). Open with jupyter notebook (iPythonNotebook file). -SourceCode contains both the source code as well as the randomly generated graphs that serves as input to the program. -Analysis contains code which generates result graphs which compare the density of the graphs with the time taken.

To change the input to the demo file, change file name in main to needed input file's names. Input file name is of the format "no_verticesxno_edges.txt(instance_no)".

Compiling Instructions:

g++ algo_name.cpp -o algo_name

./algo_name.out

where algo_name is in {"ek", "dinic", "pushrelabel", "relabeltofront"}

-------------------------------------------------------------------------------------------------------

The Report folder contains the final report, along with individual graphs of the density vs time taken for each algorithm (in the graphs folder).

maxflowproblem's People

Contributors

navsuresh 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.