GithubHelp home page GithubHelp logo

varungohil / densest-subgraph-discovery Goto Github PK

View Code? Open in Web Editor NEW
13.0 2.0 10.0 1.22 MB

A Python repository for finding the densest subgraph in a undirected graph

Python 100.00%
python density graph-algorithms greedy approximation charikar goldberg maxflow maxflow-mincut networks

densest-subgraph-discovery's Introduction

Densest-Subgraph-Discovery

This repository contains python programs for finding the densest subgraph in a undirected graph.

Notion of Density

Here the density of a graph refers to the ratio of the number of edges between the nodes of the graph and the number of nodes of the graph.

Implemented Algorithms

The repo consists of the following algorithms:

  • Goldberg's Algorithm
  • Charikar's greedy 2 approximation algorithm

Usage Methodology

For running the programs you will need to install PyMaxflow library.

Before running any programs copy the set of edges in the edges.txt file(only the set of edges, no extra information). After that run the program and input the number of nodes and edges as requested.

The programs have been written in Python 2.7 but can be run with Python 3 with minors alterations.

Output

The program returns a python list of the nodes that are in the densest subgraph and the density of the subgraph.

Contributors

densest-subgraph-discovery's People

Contributors

varungohil avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

densest-subgraph-discovery's Issues

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.