/graph_algorithms

Graph algorithms implemented in python

Primary LanguagePython

Repository with various graph algorithms implemented in python

Requirements -

  • networx => can be installed using pip install networkx or pip3 install networkx

Usage -

  • python3 [script name] {number of nodes} {probabbility of edge creation}
    • example python3 df.py 100 0.5
  • It creates a random graph does Breadth First Search
  • It displays the path from destination node to start node
    • Currently start and destination node values are supplied inside the script but can change it to take user generated input

Algorithms list -

  • Breadth First Search

Note -

  • Sometimes this can throw error as the graphs are genrerated randomely and some nodes might be missing