Project Lab 4 and 5
Assignment : Compute: connected components, all shortest paths,
diameter, average shortest path, clusterning coeficient.
- Add to inputGraph.c the following functions:
-
void component(int i) component of the node i
-
void allComponents() outputs all components of the graph
-
int lengthShortestPath(int i, int j) outputs the
length of the shortest path between i and j
-
void distributionShortestPaths()
that outputs a function f(i)=number of shortest path of lenght i.
-
void averageShortestPaths()
sum of i*f(i) divided by the number of paths.
-
void clusteringCoef(int i) Clustering Coeficient of
node i
-
void averageClusteringCoef()
sum all clustering coef divided by numnodes.
Yannet Interian
Networks and Algorithms