# 匹配多项式

图的匹配多项式是一种多项式，其系数按大小计数图的匹配，它是在图论中引入的，同时也独立地受到单体-二聚体系统统计力学的推动。若 \( p(G,k) \) 表示 \( n \) 个顶点的图 \( G \) 中 \( k \)-匹配（含 \( k \) 条边的匹配）的数目，则匹配多项式为

\[ \mu_G(x) = \sum_{k \ge 0} (-1)^k \, p(G,k) \, x^{n-2k} = x^n - m_1 x^{n-2} + m_2 x^{n-4} - \cdots, \]

其中 \( m_k = p(G,k) \)。<sup>[1](https://passagemath.org/docs/latest/html/en/reference/graphs/sage/graphs/matchpoly.html)</sup><sup> • </sup><sup>[2](https://people.cs.uchicago.edu/~laci/23graphs/hw.html)</sup> 一个加权形式，即匹配亏多项式

\[ \mathcal{M}_G(x) = \sum_{\text{匹配 } M} (-1)^{|M|} x^{n-2|M|} \prod_{e \in M} w_e, \]

为每条边赋予一个权重 \( w_e \)，这也是该多项式最初在物理学中出现的形式。<sup>[3](https://theory.stanford.edu/~jvondrak/MATH233A-2018/Math233-lec12.pdf)</sup>

| 关键事实 | 详情 |
|---|---|
| 定义 | \( \mu_G(x) = \sum_{k} (-1)^k p(G,k) x^{n-2k} \)，其中 \( p(G,k) \) 是 \( G \) 的 \( k \)-匹配数<sup>[1](https://passagemath.org/docs/latest/html/en/reference/graphs/sage/graphs/matchpoly.html)</sup> |
| 完美匹配 | 常数项非零，等价地，对于 \( n \) 个节点的图，匹配生成多项式的次数为 \( n/2 \)，当且仅当 \( G \) 有完美匹配<sup>[4](https://mathworld.wolfram.com/MatchingPolynomial.html)</sup><sup> • </sup><sup>[21](https://mathworld.wolfram.com/MatchingNumber.html)</sup> |
| 实根性 | 对每个图，所有根都是实数，由海尔曼（Heilmann）和利布（Lieb）证明（1970，1972）<sup>[5](https://journals.aps.org/prl/abstract/10.1103/PhysRevLett.24.1412)</sup><sup> • </sup><sup>[6](https://collaborate.princeton.edu/en/publications/theory-of-monomer-dimer-systems-2/)</sup> |
| 根界 | 对于最大度 \( \Delta \ge 2 \)，所有根都落在区间 \( (-2\sqrt{\Delta-1},\, 2\sqrt{\Delta-1}) \) 内<sup>[7](https://www.sciencedirect.com/science/article/abs/pii/S0195669825001751)</sup> |
| 线图恒等式 | \( G \) 的匹配生成多项式等于线图 \( L(G) \) 的独立多项式（莱维特（Levit）和曼德雷斯库（Mandrescu）2005）<sup>[4](https://mathworld.wolfram.com/MatchingPolynomial.html)</sup><sup> • </sup><sup>[8](https://mathworld.wolfram.com/IndependencePolynomial.html)</sup> |
| 树 | 对任意树，特征多项式等于匹配多项式<sup>[9](https://arxiv.org/abs/2306.16247)</sup> |
| 零根重数 | \( G \) 的最大匹配所遗漏的顶点数，等于零作为 \( \mu(G,x) \) 的根的重数<sup>[10](https://www.combinatorics.org/ojs/index.php/eljc/article/view/v2i1r8)</sup> |
| 计数复杂性 | 即使限制在平面图上，计数所有匹配也是#P-完全的，而平面图上的完美匹配存在多项式时间算法<sup>[11](https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.ESA.2016.33)</sup> |

## 定义与基本结构

图 \( G \) 中的一个匹配是一组两两不共享顶点的边；一个 \( k \)-匹配恰好包含 \( k \) 条边。在有 \( p \) 个顶点的图上，一个 \( k \)-匹配留下 \( p - 2k \) 个顶点未被覆盖。极端情形是空匹配（\( k = 0 \)），以及当 \( p \) 为偶数且 \( k = p/2 \) 时覆盖每个顶点的完美匹配。<sup>[12](https://encyclopediaofmath.org/wiki/Matching_polynomial_of_a_graph)</sup>

《数学百科全书》的表述为顶点赋予权重 \( w_1 \)、为边赋予权重 \( w_2 \)，使得一个 \( k \)-匹配的权重为 \( w_1^{p-2k} w_2^k \)，并将匹配多项式 \( M(G;w) \) 定义为所有匹配的权重之和；令 \( w_1 = w_2 \) 即得简单匹配多项式。<sup>[12](https://encyclopediaofmath.org/wiki/Matching_polynomial_of_a_graph)</sup> 无符号变体（其中每一项都为正）满足相同的递推关系，通过交替符号可转换为 \( \mu_G \)。<sup>[1](https://passagemath.org/docs/latest/html/en/reference/graphs/sage/graphs/matchpoly.html)</sup>

**递推。** 删除一条边与删除顶点给出一个两项递推：若 \( e \) 是 \( G \) 的一条边，\( G' \) 是删除 \( e \) 的结果，\( G'' \) 是删除 \( e \) 的两个端点后的结果，则 \( \mu_G = \mu_{G'} - \mu_{G''} \)。<sup>[1](https://passagemath.org/docs/latest/html/en/reference/graphs/sage/graphs/matchpoly.html)</sup> 等价地，对于顶点 \( v \)，匹配要么避开 \( v \)，要么恰好包含一条与 \( v \) 关联的边，由此得到一个既用于证明又用于计算的递推。<sup>[13](https://math.berkeley.edu/~nikhil/courses/270/lec1.pdf)</sup> 不连通图的多项式是其各连通分支多项式的乘积。<sup>[3](https://theory.stanford.edu/~jvondrak/MATH233A-2018/Math233-lec12.pdf)</sup>

## 历史

E. J. 法雷尔（E. J. Farrell）在《匹配多项式引论》（《组合理论杂志》B辑，1979）中引入了匹配多项式，该文还给出了基本算法、性质以及著名图族的显式公式。<sup>[12](https://encyclopediaofmath.org/wiki/Matching_polynomial_of_a_graph)</sup> 独立于上述图论研究，物理学家奥勒·J·海尔曼（Ole J. Heilmann）和埃利奥特·H·利布（Elliott H. Lieb）也发现了同一个多项式，它是单体-二聚体系统的配分函数（表征系统统计性质的物理学求和式）：他们1970年的《物理评论快报》短文《单体与二聚体》以及1972年的《数学物理通讯》论文《单体-二聚体系统理论》研究了一个以单体活度为变量的多项式，其系数依赖于二聚体活度。<sup>[5](https://journals.aps.org/prl/abstract/10.1103/PhysRevLett.24.1412)</sup><sup> • </sup><sup>[6](https://collaborate.princeton.edu/en/publications/theory-of-monomer-dimer-systems-2/)</sup> C. D. 戈德西尔（C. D. Godsil）和 I. 古特曼（I. Gutman）1981年的论文《论匹配多项式理论》系统化了图论方面，给出了递推公式、与特征多项式的关系以及关于零点的结果。<sup>[14](https://onlinelibrary.wiley.com/doi/10.1002/jgt.3190050203)</sup>

## 与其他图多项式的关系

**独立多项式。** 线图 \( L(G) \) 中的独立边集对应于 \( G \) 中的匹配，因此 \( G \) 的匹配生成多项式等于 \( L(G) \) 的独立多项式，\( \mu_G(x) = I_{L(G)}(x) \)。<sup>[4](https://mathworld.wolfram.com/MatchingPolynomial.html)</sup><sup> • </sup><sup>[8](https://mathworld.wolfram.com/IndependencePolynomial.html)</sup> 这一恒等式将关于匹配多项式的每个定理都转移到线图的独立多项式上，并提出了哪些性质可以推广到所有图的独立多项式的问题。<sup>[15](https://arxiv.org/abs/1610.00805)</sup>

**特征多项式。** 对于树 \( T \)，特征多项式 \( \phi_T \) 与匹配多项式 \( \varphi_T \) 重合；这一经典结果以受限的方式推广到均匀超树。<sup>[9](https://arxiv.org/abs/2306.16247)</sup> 戈德西尔更一般地证明了，任何有限连通图的匹配多项式整除一个关联树（路径树）的匹配多项式，这是他证明根界的关键一步。<sup>[16](https://people.math.ethz.ch/~kowalski/expander-graphs.pdf)</sup>

**经典多项式。** 匹配多项式与切比雪夫多项式、埃尔米特多项式、拉盖尔多项式有关，而车多项式是它的一个特例，因此车理论可以完全通过匹配多项式来发展。<sup>[12](https://encyclopediaofmath.org/wiki/Matching_polynomial_of_a_graph)</sup> 闭式包括完全图的 \( \mu(K_n) = \mathrm{He}_n(x) \)、完全二部图的 \( \mu(K_{n,n}) = (-1)^n n! \, L_n(x^2) \)，以及星图的 \( \mu(S_n) = x^{n-2}(x^2 - n + 1) \)。<sup>[4](https://mathworld.wolfram.com/MatchingPolynomial.html)</sup>

## 根：海尔曼-利布定理

核心定理由海尔曼和利布证明，它指出：对于任何具有非负边权的图，匹配亏多项式是实根的；并且对于至少三个顶点的连通图，最大根至多为 \( 2\sqrt{B} \)，其中 \( B \) 是某个与加权度有关的量 \( W_u \) 在所有顶点上的最大值。<sup>[3](https://theory.stanford.edu/~jvondrak/MATH233A-2018/Math233-lec12.pdf)</sup> 在最大度 \( \Delta \ge 2 \) 的无权情形下，所有根都落在 \( (-2\sqrt{\Delta-1},\, 2\sqrt{\Delta-1}) \) 内。<sup>[7](https://www.sciencedirect.com/science/article/abs/pii/S0195669825001751)</sup> 根关于零对称分布：\( \theta \) 是根当且仅当 \( -\theta \) 是根。<sup>[17](https://janos.cs.technion.ac.il/COURSES/Vienna-2014/technion-roots.pdf)</sup>

实根性有两个文献中着重指出的推论。它蕴含匹配数序列 \( m_k \) 是对数凹且单峰的。<sup>[18](https://escholarship.org/content/qt4wh9v2j7/qt4wh9v2j7_noSplash_20e961136c47adfa4df9642ffe4fa867.pdf?t=pwzt8u)</sup> 而根界后来被用于确立拉马努金（Ramanujan）图的存在性。<sup>[18](https://escholarship.org/content/qt4wh9v2j7/qt4wh9v2j7_noSplash_20e961136c47adfa4df9642ffe4fa867.pdf?t=pwzt8u)</sup> 由于每个线图都是无爪的，匹配多项式的结果包含在丘德诺夫斯基（Chudnovsky）和西摩（Seymour）的定理中，即无爪图的独立多项式是实根的。<sup>[18](https://escholarship.org/content/qt4wh9v2j7/qt4wh9v2j7_noSplash_20e961136c47adfa4df9642ffe4fa867.pdf?t=pwzt8u)</sup>

## 物理：单体-二聚体系统

在统计物理中，匹配表示用双原子分子（即二聚体）覆盖晶格，未匹配的顶点扮演单体的角色。<sup>[19](https://www.sciencedirect.com/science/article/pii/S0167506008702826)</sup> 单体-二聚体配分函数 \( P(x) \) 是一个以单体活度 \( x \) 为变量的多项式，其系数依赖于二聚体活度。海尔曼和利布证明了，当二聚体活度非负时，\( P(x) \) 的所有零点都在虚轴上，因此任何单体-二聚体系统作为单体密度的函数都不可能发生相变，除非可能在最小单体密度（\( x = 0 \)）处。<sup>[6](https://collaborate.princeton.edu/en/publications/theory-of-monomer-dimer-systems-2/)</sup> 他们1970年的短文证明了任意单体-二聚体系统的自由能在非零密度下关于密度和温度是解析的。<sup>[5](https://journals.aps.org/prl/abstract/10.1103/PhysRevLett.24.1412)</sup>

## 匹配论解释

该多项式通过其根编码匹配论结构。零作为根的重数等于最大匹配未覆盖的顶点数，而戈德西尔的代数匹配理论将加莱（Gallai）引理等结果推广到任意根 \( \theta \) 的重数 \( \mathrm{mult}(\theta, G) \)。<sup>[10](https://www.combinatorics.org/ojs/index.php/eljc/article/view/v2i1r8)</sup> 具有相同匹配多项式的两个图称为共匹配的，若没有其他图共享其多项式，则称该图是匹配唯一的；非同构图不必具有不同的匹配多项式。<sup>[12](https://encyclopediaofmath.org/wiki/Matching_polynomial_of_a_graph)</sup><sup> • </sup><sup>[4](https://mathworld.wolfram.com/MatchingPolynomial.html)</sup>

## 计算

边删除递推给出一个直接的递归算法，例如在 SageMath 的 `matching_polynomial` 函数中实现，该函数默认使用戈德西尔对偶定理从补图的多项式计算该多项式。<sup>[1](https://passagemath.org/docs/latest/html/en/reference/graphs/sage/graphs/matchpoly.html)</sup> 精确计数一般是困难的：即使限制在平面图上，计数所有匹配也是#P-完全的，而在平面图中计数具有 \( k \) 个未匹配顶点的匹配是#W[1]-难的，尽管平面图上的完美匹配可以通过卡斯特莱因（Kasteleyn）的经典算法在多项式时间内计数。<sup>[11](https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.ESA.2016.33)</sup> 在近似方面，对于平面图（不必是二部图）中给定大小的匹配计数，以及更一般地对于单体-二聚体系统的采样与计数，存在完全多项式随机近似方案（FPRAS）。<sup>[20](https://explore.openaire.eu/search/publication?pid=10.1145%2F3406325.3451123)</sup>

## References

1. [matching_polynomial, SageMath (Passagemath) reference manual](https://passagemath.org/docs/latest/html/en/reference/graphs/sage/graphs/matchpoly.html)
2. [CMSC 27530: Honors Graph Theory, Spring 2023, University of Chicago](https://people.cs.uchicago.edu/~laci/23graphs/hw.html)
3. [Lecture 12: The Heilmann-Lieb Theorem, Math 233, Stanford University (Jan Vondrák)](https://theory.stanford.edu/~jvondrak/MATH233A-2018/Math233-lec12.pdf)
4. [Matching Polynomial, Wolfram MathWorld](https://mathworld.wolfram.com/MatchingPolynomial.html)
5. [Heilmann, O. J. and Lieb, E. H. (1970). Monomers and Dimers. Physical Review Letters 24, 1412](https://journals.aps.org/prl/abstract/10.1103/PhysRevLett.24.1412)
6. [Heilmann, O. J. and Lieb, E. H. (1972). Theory of monomer-dimer systems. Communications in Mathematical Physics 25(3), 190-232](https://collaborate.princeton.edu/en/publications/theory-of-monomer-dimer-systems-2/)
7. [On integral variations for roots of the Laplacian matching polynomial of graphs, ScienceDirect](https://www.sciencedirect.com/science/article/abs/pii/S0195669825001751)
8. [Independence Polynomial, Wolfram MathWorld](https://mathworld.wolfram.com/IndependencePolynomial.html)
9. [On a relationship between the characteristic and matching polynomials of a uniform hypertree, arXiv:2306.16247](https://arxiv.org/abs/2306.16247)
10. [Godsil, C. D. (1995). Algebraic Matching Theory. The Electronic Journal of Combinatorics 2(1), #R8](https://www.combinatorics.org/ojs/index.php/eljc/article/view/v2i1r8)
11. [Curticapean, R. (2016). Counting Matchings with k Unmatched Vertices in Planar Graphs. ESA 2016, LIPIcs 57](https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.ESA.2016.33)
12. [Matching polynomial of a graph, Encyclopedia of Mathematics](https://encyclopediaofmath.org/wiki/Matching_polynomial_of_a_graph)
13. [Lecture 1: Introduction, the Matching Polynomial, UC Berkeley](https://math.berkeley.edu/~nikhil/courses/270/lec1.pdf)
14. [Godsil, C. D. and Gutman, I. (1981). On the theory of the matching polynomial. Journal of Graph Theory 5, 137-144](https://onlinelibrary.wiley.com/doi/10.1002/jgt.3190050203)
15. [[1610.00805] generalizations of the matching polynomial to the multivariate independence polynomial](https://arxiv.org/abs/1610.00805)
16. [Expander graphs lecture notes, ETH Zürich](https://people.math.ethz.ch/~kowalski/expander-graphs.pdf)
17. [Roots of graph polynomials, Technion lecture notes (2014)](https://janos.cs.technion.ac.il/COURSES/Vienna-2014/technion-roots.pdf)
18. [Analytic and Combinatorial Features of Stable Polynomials, eScholarship](https://escholarship.org/content/qt4wh9v2j7/qt4wh9v2j7_noSplash_20e961136c47adfa4df9642ffe4fa867.pdf?t=pwzt8u)
19. [The Matching Polynomial and Other Graph Polynomials, Annals of Discrete Mathematics 36 (1988), ScienceDirect](https://www.sciencedirect.com/science/article/pii/S0167506008702826)
20. [Alimohammadi, Y., Anari, N., Shiragur, K., Vuong, T.-D. (2021). Fractionally log-concave and sector-stable polynomials: counting planar matchings and more. STOC 2021](https://explore.openaire.eu/search/publication?pid=10.1145%2F3406325.3451123)
21. [Matching Number -- from Wolfram MathWorld](https://mathworld.wolfram.com/MatchingNumber.html)

---
*Initially written Oct 15, 2026*

Topic: 物质世界与数学 › 数学与统计学 › 数与代数 › Computational and symbolic algebra › Algebraic combinatorics and graph theory › Algebraic graph theory

Copyright 2026 Edgepedia

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

Source: https://www.edgepedia.org/zh/matching-polynomial

English original: https://www.edgepedia.org/matching-polynomial
