Abstract
The Wiener index of a graphG is equal to the sum of distances between all pairs of vertices ofG. It is known that the Wiener index of a molecular graph correlates with certain physical and chemical properties of a molecule. In the mathematical literature, many good algorithms can be found to compute the distances in a graph, and these can easily be adapted for the calculation of the Wiener index. An algorithm that calculates the Wiener index of a tree in linear time is given. It improves an algorithm of Canfield, Robinson and Rouvray. The question remains: is there an algorithm for general graphs that would calculate the Wiener index without calculating the distance matrix? Another algorithm that calculates this index for an arbitrary graph is given.
References
A.V. Aho, J.E. Hopcroft and J.D. Unman,The Design and Analysis of Computer Algorithms (Addison-Wesley, Reading, MA, 1974).
M. Bersohn, A fast algorithm for calculation of the distance matrix of a molecule, J. Comput. Chem. 4 (1983)110.
D. Bonchev, O. Mekenyan, G. Protić and N. Trinajstićf, J. Chromatogr. 176 (1979)149.
J.A. Bandy and U.S.R. Marty,Graph Theory with Applications (North- Holland, New York, 1976).
E.R. Canfield, W.R. Robinson and D.H. Rouvray, Determination of the Wiener molecular branching index for the molecular tree, J. Comput. Chem. 6 (1985)598.
A. Graovac and T. Pisanski, On the Wiener index of a graph, submitted for publication.
E.L. Lawler,Combinatorial Optimization: Networks and Matroids (Halt, Rinehart and Winston, New York, 1976).
I. Motos and A.T. Balaban, Topological indices: Intercorrelations, physical meaning, correlational ability, Rev. Roumanie Chim. 26 (1981)593.
W.R. Müller, K. Szymanski, J.V. Knop and N. Trinajstić, An algorithm for construction of the molecular distance matrix, J. Comput. Chem. 8 (1987)170.
C.H. Papadiruitriou and K. Steiglitz,Combinatorial Optimization: Algorithms and Complexity (Premise-Hall, Englewood Cliffs, NJ, 1982).
D. Papazova, M. Dimov and D. Bonchev, J. Chromatogr. 188 (1980)297.
D.H. Rouvray, The role of' graph-theoretical invariants in chemistry, Congr. Numer 55 (1986)253.
D.H. Rouvray, Should we have designs on topological indices? in:Chemical Applications of Topology and Graph Theory, ed. R.B. King (Elsevier, Amsterdam, 1983) pp. 159–177.
D.H. Rouvray, Predicting chemistry from topology, Sci. Amer. 254 (1986)40.
D.H. Rouvray, The role of topological distance matrix in chemistry, in:Mathematics and Computational Concepts in Chemistry, ed. N. Trinajstić (Horwood, Chichester, UK, 1986) Ch. 25, pp. 295–306.
D.H. Rouvray and B.C. Crafford, South Afr. J. Sci 72 (1976)74.
D.H. Rouvray and W. Tatong, Z. Naturforsch. 41a (1986)1238.
LT Stiel and G. Thodos, Amer. Inst. Chem. Eng. 18 (1962)527.
M.M. Syslo, N. Deo and J.S. Kowalik,Discrete Optimization Algorithms (Prentice-Hall, Englewood Cliffs, NJ, 1983).
N. Trinajstić,Chemical Graph Theory, Vol. II (CRC Press, Florida, 1983) Ch, 4.
H. Wiener, Structural determination of paraffin boiling points, J. Amer. Chem. Soc. 69 (1947)17.
H. Wiener, I Chem. Phys. 15 (1947)766.
Author information
Authors and Affiliations
Additional information
Work supported in part by the Research Council of Slovenia, Yugoslavia.
This work was done while both authors were visiting the Simon Fraser University.
Rights and permissions
About this article
Cite this article
Mohar, B., Pisanski, T. How to compute the Wiener index of a graph. J Math Chem 2, 267–277 (1988). https://doi.org/10.1007/BF01167206
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/BF01167206