Giter Site home page Giter Site logo

lokeshsreenathj / big-graphs-and-networks Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 20 KB

Building Graph theory algorithms from Scratch

License: MIT License

Jupyter Notebook 100.00%
big-data directed-acyclic-graph graph-algorithms minimum-spanning-trees python

big-graphs-and-networks's Introduction

Big-Graphs-and-Networks

1)Minimium Spanning Trees: Used Dataset : http://konect.cc/networks/adjnoun_adjacency/ Built Minimum Spanning Tree model using Prim's and Kruskal's algorithm from scatch using numpy library in Python.

2)is_dag(): Built a model that tells us whether a given graph is Directed Acyclic or not a DAG. Being a DAG for any graph has a wide applications one prominent that I have witnessed is in Scheduling and Order Processing from warehouse to customers.

3)make_dag(): We wish we have a DAG graph but it isn't the case always. To make a Cyclic graph to acylic 1) Identify the disjoint components of graphs 2) Examine each component if it has a cyclic then it remove the edges till you reach number of edges as N-1 , where N represents the number of nodes in that paticular component of graph.

4)sort_dag(): Having the node ordered in topologically have many utilities. In order to get the nodes that have a uni direction of edges terminating from it from left towards the right side or vice-versa, 1) Try identifying the node that has no incoming edges. If you find one, append it to the node_order list, then remove the nodes associated with that paticular node. 2) Repeat this for all the nodes.

5)Finding the Shortest Path Problem: Used Dataset :https://people.sc.fsu.edu/~jburkardt/datasets/cities/cities.html. Graph construction: Constructed weighted undirected network (edges weighted by distances) with each city forming a node, and an edge (i,j) exists between two cities if i) the distance between i and j is not greater than 100 miles, or if ii) there are no cities within 100 miles from a city i, add an edge from i to its nearest city. This dataset contains the distances between the cities of USA (The distance values used are not accurate though). Built dijkstra's algorithm from scatch using numpy library in python. The graph obtained from above constaints results in dis-connected graph. I have considered the case of dis-connectednesss of graph and developed the algorithm. Also using Floyd-Warshall Algorithm developed a model that gives us the distance matrix which contains the all-pairs shortest possible distances between all cities.

  1. Maximum Flow between source and destination: Input dataset : http://snap.stanford.edu/data/soc-sign-bitcoin-otc.html Graph Construction: Considered nodes from 1 to 2000 and non-negative edges. Built the Maximum flow algorithm that can find the maximum amount of flow between source and destination.

big-graphs-and-networks's People

Contributors

lokeshsreenathj avatar

Stargazers

 avatar

Watchers

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