# 维纳指数

连通图的维纳指数，是其所有顶点无序对之间最短路径距离的总和，等价于图距离矩阵所有元素之和的一半。该指数由化学家哈里·维纳（Harry Wiener）于1947年提出，被视为第一个拓扑指数——一种图论数值，用作分子描述符，以预测化合物的物理和化学性质。<sup>[1](https://pubs.acs.org/doi/10.1021/ja01193a005)</sup><sup> • </sup><sup>[2](https://www.sciencedirect.com/science/article/pii/S009630031730348X)</sup>

| 关键事实 | 详情 |
|---|---|
| 定义 | \( W(G) = \sum_{\{a,b\} \subseteq V} d(a,b) \)，即所有无序顶点对上的距离之和；也可写作距离矩阵所有元素之和的一半<sup>[2](https://www.sciencedirect.com/science/article/pii/S009630031730348X)</sup><sup> • </sup><sup>[3](https://mathworld.wolfram.com/WienerIndex.html)</sup> |
| 起源 | 哈里·维纳，“根据结构确定石蜡沸点”，《美国化学会志》69(1): 17–20，1947年1月<sup>[1](https://pubs.acs.org/doi/10.1021/ja01193a005)</sup> |
| 最初应用 | 通过 \( \Delta t = (98/n^{2})\,\Delta w + 5.5\,\Delta p \) 关联石蜡的沸点，对于所考虑的94种石蜡，平均偏差低于一度<sup>[4](https://www.people.iup.edu/nate/wikis/chem581/docs/ja01193a005.pdf)</sup> |
| 最初名称 | 维纳将这两个不变量称为路径数（即现在的维纳指数）和极性数<sup>[5](https://www.sciencedirect.com/science/chapter/edited-volume/abs/pii/B9781898563761500068)</sup> |
| 完全图 | \( n \) 个节点上的无权完全图的维纳指数为 \( n(n-1)/2 \)，因为每一对顶点之间的距离都是一<sup>[6](https://networkx.org/documentation/stable/reference/algorithms/generated/networkx.algorithms.wiener.wiener_index.html)</sup> |
| 树的计算 | 对于树，可在线性时间内计算：对每条边求和 \( n_{1}(e) \cdot (n - n_{1}(e)) \)，其中 \( n_{1}(e) \) 是删除边 \( e \) 后较小连通分量的大小<sup>[7](https://users.fmf.uni-lj.si/mohar/Reprints/1988/BM88_JMC2_Pisanki_WienerIndex.pdf)</sup> |
| 化学意义 | 一种衡量分子紧凑度的指标，反映支化和成环程度；在烷烃中，它衡量范德华表面积<sup>[8](https://hrcak.srce.hr/en/176550)</sup><sup> • </sup><sup>[9](https://www.sciencedirect.com/science/article/pii/S0893965911004757)</sup> |

## 定义与解释

对于简单连通图 \( G = (V, E) \)，两个顶点之间的距离 \( d(a,b) \) 是连接它们的最短路径的长度。维纳指数为<sup>[2](https://www.sciencedirect.com/science/article/pii/S009630031730348X)</sup>

\[ W(G) = \sum_{\{a,b\} \subseteq V} d(a,b) = \frac{1}{2} \sum_{a \in V} \sum_{b \in V} d(a,b). \]

同一量在数学文献中以其他名称出现：1947年之后，它被作为总状态、图的距离以及图的传输来研究，并且与图传输 \( T(G) \) 完全相同。<sup>[2](https://www.sciencedirect.com/science/article/pii/S009630031730348X)</sup><sup> • </sup><sup>[3](https://mathworld.wolfram.com/WienerIndex.html)</sup> 它与不同顶点无序对上的平均距离相关，关系为 \( \mu(G) = 2W(G)/(n(n-1)) \)。<sup>[3](https://mathworld.wolfram.com/WienerIndex.html)</sup>

**这个数值衡量什么。** 在结构-性质研究中，该指数作为分子紧凑度的度量，依据的是支化和成环等结构特征；对于烷烃分子，它衡量范德华表面积，这解释了在 \( W \) 与烷烃的许多物理化学性质之间发现的相关性。<sup>[8](https://hrcak.srce.hr/en/176550)</sup><sup> • </sup><sup>[9](https://www.sciencedirect.com/science/article/pii/S0893965911004757)</sup> 在分子图中，氢原子通常被忽略，正如有机化学家在将苯环画成六边形时所做的那样。<sup>[3](https://mathworld.wolfram.com/WienerIndex.html)</sup>

## 化学中的起源

1947年和1948年间，哈里·维纳发表了一系列共五篇论文，引入了两个旨在表征烷烃分子的图论不变量，他称之为极性数和路径数；路径数现在被称为维纳拓扑指数。<sup>[5](https://www.sciencedirect.com/science/chapter/edited-volume/abs/pii/B9781898563761500068)</sup> 在1947年的论文中，他通过方程 \( \Delta t = (98/n^{2})\,\Delta w + 5.5\,\Delta p \) 将石蜡的沸点与结构关联起来，其中 \( \Delta w \) 和 \( \Delta p \) 是结构变量，并报告对于所考虑的94种石蜡，计算值与观测值之间的平均偏差小于一度。<sup>[4](https://www.people.iup.edu/nate/wikis/chem581/docs/ja01193a005.pdf)</sup> 维纳最初的方法仅对无环结构（树）有效，其实质是将每条边两侧的顶点数相乘，并将所有这些贡献相加。<sup>[10](https://biochempress.com/Files/iejmd_2008_7_0195.pdf)</sup>

该指数被视为拓扑指数中的第一个，这一家族此后已增长到超过200种被提出的分子描述符。<sup>[5](https://www.sciencedirect.com/science/chapter/edited-volume/abs/pii/B9781898563761500068)</sup><sup> • </sup><sup>[2](https://www.sciencedirect.com/science/article/pii/S009630031730348X)</sup>

## 计算

对于一般图，该指数可从距离矩阵获得：Floyd-Warshall算法在 \( O(n^{3}) \) 时间内计算该矩阵，之后通过 \( O(n^{2}) \) 次加法得到 \( W(G) \)；基于广度优先搜索的算法运行时间为 \( O(mn) \)，曾被推荐用于化学应用，因为那里的图具有有界度数，所以 \( m = O(n) \)。<sup>[7](https://users.fmf.uni-lj.si/mohar/Reprints/1988/BM88_JMC2_Pisanki_WienerIndex.pdf)</sup>

**树的线性时间计算。** 莫哈尔（Mohar）和皮桑斯基（Pisanski）给出了一种针对树的线性时间算法，改进了坎菲尔德（Canfield）、罗宾逊（Robinson）和鲁夫雷（Rouvray）早期的递归算法。它通过反复删除叶子来处理树；当删除一条边 \( e \) 时，树分裂为大小分别为 \( n_{1}(e) \) 和 \( n - n_{1}(e) \) 的两个分量，并加上贡献 \( w(e) = n_{1}(e)(n - n_{1}(e)) \)，因为被 \( e \) 分开的每一对顶点都有一条路径穿过它。对于3,3-二甲基-4-异丙基辛烷的13顶点树，这给出 \( W = 258 \)。<sup>[7](https://users.fmf.uni-lj.si/mohar/Reprints/1988/BM88_JMC2_Pisanki_WienerIndex.pdf)</sup> 线性时间算法此后已被推广到单圈图以及相关量，如维纳极性指数和末端维纳指数。<sup>[11](https://onlinelibrary.wiley.com/doi/10.1155/2021/6663306)</sup>

## 相关指数与数学结果

若干基于距离的描述符是维纳指数的扩展，或与之类似。超维纳指数由M. 兰迪奇（M. Randić）于1993年引入，定义为 \( WW(G) = \frac{1}{2} \sum_{v} \sum_{u} (d(u,v) + d(u,v)^{2}) \)。<sup>[12](https://pmc.ncbi.nlm.nih.gov/articles/PMC5023656/)</sup> 细矢多项式由H. 细矢（H. Hosoya）于1988年引入，将距离分布编码为 \( H(G,x) = \frac{1}{2} \sum_{v} \sum_{u} x^{d(u,v)} \)。<sup>[12](https://pmc.ncbi.nlm.nih.gov/articles/PMC5023656/)</sup> 塞格德指数受维纳最初针对树的定义启发，而维纳本人在同一篇1947年论文中引入了一个相关不变量，现在称为维纳极性指数。<sup>[2](https://www.sciencedirect.com/science/article/pii/S009630031730348X)</sup>

一个定理给出了塞格德指数与维纳指数之间更精确的比较：对于每个不是完全图且有 \( n \) 个顶点的2-连通图 \( G \)，有 \( \mathrm{Sz}(G) - W(G) \ge 2n - 6 \)；此外，等号成立当且仅当 \( G \) 由一个 \( K_{n-1} \) 加上一个额外顶点构成，该顶点与 \( K_{n-1} \) 的2个或 \( n-2 \) 个顶点相连。<sup>[2](https://www.sciencedirect.com/science/article/pii/S009630031730348X)</sup> 对于定向也研究了极值问题：寻找给定图的一个使维纳指数最大化的定向是NP完全的，这回答了克诺尔（Knor）、什克雷科夫斯基（Škrekovski）和特佩赫（Tepeh）提出的一个问题。<sup>[13](https://www.sciencedirect.com/science/article/abs/pii/S0166218X23001257)</sup>

## 局限性

**退化性。** 当两个非同构图具有相同的值时，描述符就是退化的，而维纳指数具有相当高的退化程度，导致灵敏度低。<sup>[14](https://pmc.ncbi.nlm.nih.gov/articles/PMC2912850/)</sup> 这种效应在四个节点上就已出现：爪图和方形图无法被该指数区分，两者的值都是8。<sup>[3](https://mathworld.wolfram.com/WienerIndex.html)</sup> 在同分异构化合物中，该指数对于不同的异构体可能取相同的值，而且这种退化随着原子数的增加而增加，即使对于烷烃这样的简单分子也是如此。<sup>[15](https://www.researchgate.net/publication/238073223_Extended_Wiener_indices_A_new_set_of_descriptors_for_quantitative_structure-property_studies)</sup>

**预测性能。** 一项在结构-沸点关系中比较维纳指数与几种常用拓扑指数的研究发现，它明显逊于其中大多数指数，其他作者也观察到了这一结果。<sup>[8](https://hrcak.srce.hr/en/176550)</sup> 等可分化学树——即边分离剖面相匹配的树对——也具有该指数无法区分的相似物理化学性质。<sup>[9](https://www.sciencedirect.com/science/article/pii/S0893965911004757)</sup>

## References

1. [Harry Wiener (1947). Structural Determination of Paraffin Boiling Points. Journal of the American Chemical Society 69(1): 17–20.](https://pubs.acs.org/doi/10.1021/ja01193a005)
2. [On the difference between the Szeged and the Wiener index, Applied Mathematics and Computation 312 (2017) 202–213.](https://www.sciencedirect.com/science/article/pii/S009630031730348X)
3. [Wiener Index, Wolfram MathWorld](https://mathworld.wolfram.com/WienerIndex.html)
4. [H. Wiener (1947), Structural Determination of Paraffin Boiling Points, PDF transcription](https://www.people.iup.edu/nate/wikis/chem581/docs/ja01193a005.pdf)
5. [D. H. Rouvray (2002). The Rich Legacy of Half a Century of the Wiener Index, in Topology in Chemistry: Discrete Mathematics of Molecules, pp. 16–37.](https://www.sciencedirect.com/science/chapter/edited-volume/abs/pii/B9781898563761500068)
6. [wiener_index, NetworkX documentation](https://networkx.org/documentation/stable/reference/algorithms/generated/networkx.algorithms.wiener.wiener_index.html)
7. [B. Mohar, T. Pisanski (1988). How to compute the Wiener index of a graph, Journal of Mathematical Chemistry 2: 267–277.](https://users.fmf.uni-lj.si/mohar/Reprints/1988/BM88_JMC2_Pisanki_WienerIndex.pdf)
8. [S. Nikolić, N. Trinajstić (1995). The Wiener Index: Development and Applications, Croatica Chemica Acta 68(1): 105–129.](https://hrcak.srce.hr/en/176550)
9. [Equiseparability on terminal Wiener index, Applied Mathematics Letters](https://www.sciencedirect.com/science/article/pii/S0893965911004757)
10. [The oldest graph-theoretical descriptor: the Wiener index (IEJMD 2008)](https://biochempress.com/Files/iejmd_2008_7_0195.pdf)
11. [Bi et al. (2021). Algorithms for Computing Wiener Indices of Acyclic and Unicyclic Graphs, Complexity.](https://onlinelibrary.wiley.com/doi/10.1155/2021/6663306)
12. [Distance-based topological polynomials and indices of friendship graphs, PMC](https://pmc.ncbi.nlm.nih.gov/articles/PMC5023656/)
13. [On the Wiener index of orientations of graphs, Discrete Applied Mathematics](https://www.sciencedirect.com/science/article/abs/pii/S0166218X23001257)
14. [New Polynomial-Based Molecular Descriptors with Low Degeneracy, PMC](https://pmc.ncbi.nlm.nih.gov/articles/PMC2912850/)
15. [Extended Wiener indices: A new set of descriptors for quantitative structure-property studies](https://www.researchgate.net/publication/238073223_Extended_Wiener_indices_A_new_set_of_descriptors_for_quantitative_structure-property_studies)

---
*Initially written Sep 17, 2026 · Reviewed: Oct 15, 2026 · Edited: Oct 15, 2026 · Last review: Oct 15, 2026*

Topic: 物质世界与数学 › 数学与统计学 › 逻辑与离散数学 › General discrete mathematics and discrete structures › Graph theory › Graph invariants and parameters › Distance-based invariants

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/wiener-index

English original: https://www.edgepedia.org/wiener-index
