The Wiener indexof a graph is the sum of the lengths of the shortest paths between all pairs of vertices. Mathematical chemists use this quantity to analyze molecular graphs,where vertices correspond to atoms and edges correspond to chemical bonds. Add a method wiener() to GraphProperties that returns the Wiener index of a graph.
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.