Skip to content

dullfarhan/graph-python

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Graph implementation

This is a graph implementation, using adjacency matrix on Python.

Graph

Following methods are included:

  • Number of vertices and edges
  • Number of pending and isolated vertices
  • Number of components
  • Degree of vertices and its neighbors
  • Checks if the graph is simple, regular, null, complete, eulerian and unicursal
  • Complementary graph
  • Checks if the graph is biparted
  • Depth First Search
  • Breadth First Search
  • Checks if the graph is a tree
  • Minimum spanning tree, obtained by Prim's Algorithm
  • Minimum spanning tree, obtained by Kruskal's Algorithm
  • Number of cut-vertices/articulation points

Digraph

  • Checks if graph is regular, balanced, strongly connected and eulerian
  • Dijkstra: shortest path to all vertices starting from 0

Inputs

The graph will be read from a .txt file. There are samples on the folder input.

They were taken from: VisuAlgo - Graph Data Structures

License

This code is released under MIT License.

About

Graphs implementation using Adjacency Matrix, coded in Python.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Python 100.0%