In chemical graph theory, the Wiener index (also Wiener number) is a topological index of a molecule, defined as the sum of the lengths of the shortest paths between all pairs of vertices in the chemical graph representing the non-hydrogen atoms in the molecule.
The Wiener index is named after Harry Wiener, who introduced it in 1947; at the time, Wiener called it the "path number". It is the oldest topological index related to molecular branching. Based on its success, many other topological indexes of chemical graphs, based on information in the distance matrix of the graph, have been developed subsequently to Wiener's work.
The same quantity has also been studied in pure mathematics, under various names including the gross status, the distance of a graph, and the transmission. The Wiener index is also closely related to the closeness centrality of a vertex in a graph, a quantity inversely proportional to the sum of all distances between the given vertex and all other vertices that has been frequently used in sociometry and the theory of social networks.
Butane (C4H10) has two different structural isomers: n-butane, with a linear structure of four carbon atoms, and isobutane, with a branched structure. The chemical graph for n-butane is a four-vertex path graph, and the chemical graph for isobutane is a tree with one central vertex connected to three leaves.
n-Butane
Isobutane
The n-butane molecule has three pairs of vertices at distance one from each other, two pairs at distance two, and one pair at distance three, so its Wiener index is
The isobutane molecule has three pairs of vertices at distances one from each other (the three leaf-center pairs), and three pairs at distance two (the leaf-leaf pairs). Therefore, its Wiener index is
These numbers are instances of formulas for special cases of the Wiener index: it is for any -vertex path graph such as the graph of n-butane, and for any -vertex star such as the graph of isobutane.