The Wiener index ,
denoted
(Wiener 1947) and also known as the "path number" or Wiener number (Plavšić
et al. 1993), is a topological index
defined for a finite connected graph on
vertices by
|
(1)
|
where
is an entry of the graph distance matrix.
For a disconnected graph, the same sum gives
when distances between different
components are taken to be infinite.
For a connected graph, the Wiener index is therefore identical to the graph transmission . Equivalently, if
are the vertex transmissions
of
, then
|
(2)
|
It is related to the mean distance convention that averages all entries of the graph distance matrix
by , and to the common convention
that averages over unordered pairs of distinct vertices
by
for
.
The Xu index is similarly a logarithmic descriptor formed from the vertex transmissions, with each term weighted by the corresponding vertex degree.
Unless otherwise stated, hydrogen atoms are usually ignored in the computation of such indices as organic chemists usually do when they write a benzene ring as a hexagon (Devillers and Balaban 1999, p. 25).
The Wiener index
of a graph
with vertex count
is related to the average
disorder number
of the graph by
|
(3)
|
(Fried 2022, pp. 14-15).
The Wiener index of a graph Cartesian product of graphs and
is given by
|
(4)
|
(Yeh and Gutman 1994; Fried 2022, p. 14).
The Wiener index is not very discriminant. In fact, the paw graph and square graph on four nodes
are already indistinguishable using the Wiener index (both have value 8). The numbers
of non-Wiener-unique connected simple
graphs on ,
2, ... vertices are given by 0, 0, 0, 2, 16, 108,
847, 11110, 261072, ... (OEIS A193217).
Precomputed values for many graphs are implemented in the Wolfram Language as GraphData[g, "WienerIndex"].
The following table summarizes values of the Wiener index for various special classes of graphs. The index of each value list in the table starts
at 1. An X indicates that the family in that row is not defined for the corresponding
parameter value;
denotes a disconnected graph.
| graph class | OEIS | |
| Andrásfai graph | A292018 | 1, 15, 44, 88, 147, 221, 310, 414, ... |
| antelope graph | A292039 | 0, |
| antiprism graph | A002411 | X, X, 18, 40, 75, 126, 196, 288, ... |
| Apollonian network | A289022 | 6, 27, 204, 1941, 19572, 198567, ... |
| black bishop graph | A292051 | 0, 1, 14, 42, 124, 251, 506, 852, 1432, 2165, ... |
| cocktail party graph | A001105 | |
| complete
bipartite graph | A000567 | 1, 8, 21, 40, 65, 96, 133, ... |
| complete
tripartite graph | A094159 | 3, 18, 45, 84, 135, ... |
| complete
graph | A000217 | 0, 1, 3, 6, 10, 15, 21, 28, 36, ... |
| A292022 | X, 48, 132, 288, 540, 912, 1428, ... | |
| crown
graph | A033428 | |
| cube-connected cycle graph | A292028 | X, X, 888, 9472, 76160, 556032, 3605504, ... |
| cycle graph | A034828 | X, X, 3, 8, 15, 27, 42, 64, 90, ... |
| Fibonacci cube graph | A238419 | 1, 4, 16, 54, 176, 548, 1667, 4968, ... |
| fiveleaper
graph | A292040 | 0,
|
| folded cube graph | A292029 | X, 1, 6, 40, 200, 1056, 4928, 23808, ... |
| gear graph | A049598 | X, X, 36, 72, 120, 180, 252, 336, 432, ... |
| grid graph | A143945 | 0, 8, 72, 320, 1000, 2520, 5488, 10752, ... |
| grid graph | A292045 | 0, 48, 972, 7680, 37500, 136080, 403368, ... |
| halved cube graph | A292044 | 0, 1, 6, 32, 160, 768, 3584, 16384, ... |
| Hanoi graph | A290004 | 3, 72, 1419, 26580, 487839, 8867088, ... |
| hypercube graph | A002697 | 1, 8, 48, 256, 1280, 6144, 28672, ... |
| Keller graph | A292056 | |
| king graph | A292053 | 0, 6, 52, 228, 708, 1778, 3864, 7560, ... |
| knight graph | A292054 | 0, |
| Menger sponge graph | A292036 | 612, 794976, 954380016, ... |
| Möbius ladder | A180857 | X, X, 21, 44, 85, 138, 217, 312, 441, ... |
| Mycielski graph | A292055 | 0, 1, 15, 90, 435, 1926, 8175, 33930, ... |
| odd
graph | A136328 | 0, 3, 75, 1435, 25515, 436821, ... |
| pan graph | A180861 | X, X, 8, 16, 26, 42, 61, 88, 119, 160, 206, 264, ... |
| path graph | A000292 | 0, 1, 4, 10, 20, 35, 56, 84, 120, ... |
| permutation star graph | A284039 | 0, 1, 27, 744, 26520, 1239840, ... |
| prism graph | A138179 | X, X, 21, 48, 85, 144, 217, 320, 441, ... |
| queen graph | A292057 | 0, 6, 44, 164, 440, 970, 1876, 3304, 5424, ... |
| rook graph | A085537 | 0, 8, 54, 192, 500, 1080, 2058, 3584, 5832, ... |
| rook complement graph | A292058 | 0, |
| Sierpiński carpet graph | A292025 | 64, 13224, 2535136, 485339728, ... |
| Sierpiński gasket graph | A290129 | 3, 21, 246, 3765, 64032, 1130463, 20215254, ... |
| Sierpiński tetrahedron graph | A292026 | 6, 66, 1476, 42984, 1343568, 42744480, ... |
| star graph | A000290 | 0, 1, 4, 9, 16, 25, 36, 49, 64, ... |
| sun graph | A180863 | X, X, 21, 44, 75, 114, 161, 216, 279, 350, ... |
| sunlet graph | A180574 | X, X, 27, 60, 105, 174, 259, 376, 513, 690, ... |
| tetrahedral Johnson graph | A292061 | X, X, X, X, X, 300, 1050, 2940, 7056, 15120, ... |
| torus grid graph | A122657 | X, X, 54, 256, 750, 1944, 4116, 8192, 14580, 25000, ... |
| transposition graph | A292062 | 0, 1, 21, 552, 19560, 920160, 55974240, ... |
| triangular graph | A006011 | X, 0, 3, 18, 60, 150, 315, 588, 1008, 1620, ... |
| triangular grid graph | A112851 | 3, 21, 81, 231, 546, 1134, 2142, 3762, 6237, ... |
| web graph | A180576 | X, X, 69, 148, 255, 417, 616, 888, 1206, 1615, ... |
| wheel graph | A002378 | X, X, X, 6, 12, 20, 30, 42, 56, 72, ... |
| white bishop graph | A292059 | X, 1, 8, 42, 104, 251, 464, 852, 1360, 2165, ... |
Closed forms are summarized in the following table. The cycle graph was considered by Plavšić et al. (1993) and Babić et al. (2002) and the path graph by Plavšić et al. (1993). The parameters are positive integers, with additional restrictions indicated in the table.