Home - TorNim0s/Directed-Weighted-Graph-Python GitHub Wiki

Task 3 OOP Directed Weighted Graph.

Crteated by: Ilan Sirisky, Eldad Tsemach & Nir meir.

It is based on our task 2 which was written in Java, but this time it's in Python.

Here we implemented a list of algorithms for a directed weighted graph:

  1. Checking if a DW graph is strongly connected by using the DFS algorithm.

  2. Finding the shortest path between source and destination nodes by using Dijkstra algorithm.

  3. Finding the center of a DW graph which minimizes the max distance to all the other nodes.

  4. Computing a list of consecutive nodes which go over a list of nodes and finding the least costing path between all the nodes, similar to the Traveling Salesman Problem but without the limitation of visiting each node only once.

  5. Saving and loading a graph to and from a .json file which contains an array of Edges and Nodes.

Run Time Comparsion

Plot Graphs