Last hmk for Adm course Group 23: Leonardo Placidi, Eleftheria Tetoula Tsonga, Nicolò Petrungaro.
This repository is composed of:
- this README and a file gitignore.
- main.ipynb where you find all the procedures to solve the hmk.
- main.py that is the same as above but in a python fomrat, easy ot open from an editor and run it.
- for functionality1 we just performed a bfs that return the graph with the minimum distances from the root.
- for functionality2 we understood that we have to find a graph, smartest possible that can connect the nodes that are given(so can meet other nodes and would fail only if the nodes are in different connected components of the graph), and we used a variation, through dijsktra of the Prim's algorithm of mst.
- for functionality3 we used dijsktra in order to every couple of nodes in the path
- for functionality4 we controlled all permutations of paths and choosed the minimum, and when the nodes were more than 7 we used a randomization to find samples and provide a local minimum, for sure it will give a good path.
All those functionalities and plottings are in the Graph Class and use oop programming and functional programming, and are done in relation to the kind of distances selected by the user.
Calling G.GraphandPlot() the user will be able to perform any task requested in the homework obtaining a fantastic tangible graph!