# 图的笛卡尔积

图的笛卡尔积是图上的二元运算，由两个因子图构造出一个新图：积图的顶点是分别取自两个因子的顶点的所有有序对，而两个顶点对相邻，当且仅当它们恰有一个坐标不同，且该坐标上的顶点对在相应因子中相邻。记作 \( G \square H \)，也称盒积，与张量积、强积、字典积并列为四种标准图积之一。<sup>[1](https://networkx.org/documentation/stable/reference/algorithms/generated/networkx.algorithms.operators.product.cartesian_product.html)</sup><sup> • </sup><sup>[2](https://www.tandfonline.com/doi/full/10.1080/09728600.2024.2422535)</sup>

| 关键事实 | 细节 |
|---|---|
| 顶点集 | \( V(G \square H) = V(G) \times V(H) \)；\( (u,v) \) 与 \( (x,y) \) 相邻当且仅当 \( u = x \) 且 \( vy \in E(H) \)，或 \( v = y \) 且 \( ux \in E(G) \)<sup>[1](https://networkx.org/documentation/stable/reference/algorithms/generated/networkx.algorithms.operators.product.cartesian_product.html)</sup> |
| 规模 | \( \|V(G \square H)\| = \|V(G)\| \times \|V(H)\| \) 个顶点，\( \|E(G \square H)\| = \|V(G)\| \times \|E(H)\| + \|V(H)\| \times \|E(G)\| \) 条边<sup>[3](https://mathworld.wolfram.com/GraphCartesianProduct.html)</sup> |
| 距离 | 对连通因子，\( d_{G\square H}((g,h),(g',h')) = d_G(g,g') + d_H(h,h') \)<sup>[4](https://doi.org/10.1016/j.dam.2022.04.019)</sup> |
| 邻接矩阵 | \( A(G \square H) = A(G) \otimes I_{\|V(H)\|} + I_{\|V(G)\|} \otimes A(H) \)，即克罗内克和<sup>[3](https://mathworld.wolfram.com/GraphCartesianProduct.html)</sup> |
| 素因子分解 | 每个连通图都唯一分解为素因子，由萨比杜西（Sabidussi，1960）与维津（Vizing，1963）各自独立证明<sup>[5](https://www.math.iit.edu/~kaul/talks/DistingChromaticTalk-short.pdf)</sup> |
| 分解算法 | 首个多项式算法由法伊根鲍姆（Feigenbaum）等人给出，复杂度 \( O(n^{4.5}) \)；伊姆里希（Imrich）与彼得林（Peterin）后来给出了线性时间算法<sup>[6](https://webusers.i3s.unice.fr/~ccrespelle/publications/C10_cartesian-product.pdf)</sup> |
| 标准示例 | 网格图 \( P_m \square P_n \)、超立方体 \( Q_n = P_2^{\square n} \)、汉明图 \( K_q^{\square d} \)、环面网格图 \( C_m \square C_n \)<sup>[3](https://mathworld.wolfram.com/GraphCartesianProduct.html)</sup> |

## 定义

对两个图 \( G = (V, E) \) 与 \( H = (W, F) \)，笛卡尔积 \( G \square H \) 的顶点集为 \( V \times W \)。顶点 \( (u, v) \) 与 \( (w, z) \) 相邻，若 \( u = w \) 且 \( vz \in E(H) \)，或 \( v = z \) 且 \( uw \in E(G) \)。<sup>[1](https://networkx.org/documentation/stable/reference/algorithms/generated/networkx.algorithms.operators.product.cartesian_product.html)</sup> 等价地说，积图中的一条边恰好改变一个坐标：沿一个因子的边移动，而另一个坐标保持不变。<sup>[7](https://www.combinatorics.org/ojs/index.php/eljc/article/download/v26i1p3/pdf/)</sup> 该运算满足交换律与结合律，并可推广为 \( k \) 元组顶点上的 \( k \) 重积：两个元组相邻，当且仅当它们除一个位置外处处相同，且在该位置上构成一条边。<sup>[2](https://www.tandfonline.com/doi/full/10.1080/09728600.2024.2422535)</sup><sup> • </sup><sup>[8](https://arxiv.org/abs/1105.3383)</sup>

积图带有自然的层结构：对每个 \( x \in V(G) \)，集合 \( \{x\} \times V(H) \) 是一个 H 层，即 H 在积图内部的一个副本；G 层与之对称。<sup>[2](https://www.tandfonline.com/doi/full/10.1080/09728600.2024.2422535)</sup>

## 基本性质

**计数与度。** 积图有 \( \|V(G)\| \times \|V(H)\| \) 个顶点和 \( \|V(G)\| \times \|E(H)\| + \|V(H)\| \times \|E(G)\| \) 条边。<sup>[3](https://mathworld.wolfram.com/GraphCartesianProduct.html)</sup> 顶点的度是可加的：\( \deg_{G\square H}((u,v)) = \deg_G(u) + \deg_H(v) \)。

**距离。** 最基本的度量性质是距离的可加性：对连通因子，\( d_{G\square H}((g,h),(g',h')) = d_G(g,g') + d_H(h,h') \)。<sup>[4](https://doi.org/10.1016/j.dam.2022.04.019)</sup> 这使积图在曼哈顿度量下表现得如同网格，并构成了积网络上许多路由与距离计算的基础。

**着色。** 积图的色数是各因子色数的最大值：对 \( G = \square_{i=1}^{d} G_i \)，\( \chi(G) = \max_i \chi(G_i) \)，可由将每个顶点染为其各坐标颜色之和模 \( t = \max_i \chi(G_i) \) 来实现。<sup>[5](https://www.math.iit.edu/~kaul/talks/DistingChromaticTalk-short.pdf)</sup>

**对称性。** 连通图的笛卡尔积若由连通的素因子构成，则其每个自同构都由这些素因子的自同构，以及交换同构素因子的对换生成——这是伊姆里希（Imrich，1969）与米勒（Miller，1970）的定理。<sup>[5](https://www.math.iit.edu/~kaul/talks/DistingChromaticTalk-short.pdf)</sup><sup> • </sup><sup>[20](https://www.cs.columbia.edu/~cs6204/files/Lec5-Automorphisms.pdf)</sup>

## 谱性质

简单图之积的邻接矩阵是因子邻接矩阵的克罗内克和，

\[ A(G \square H) = A(G) \otimes I_{\|V(H)\|} + I_{\|V(G)\|} \otimes A(H), \]

其中 \( \otimes \) 表示克罗内克积。<sup>[3](https://mathworld.wolfram.com/GraphCartesianProduct.html)</sup> 由于克罗内克和 \( X \otimes I + I \otimes Y \) 的特征值恰为两两之和 \( \lambda_i(X) + \lambda_j(Y) \)，积图的谱可直接由各因子的谱算出。<sup>[9](https://onlinelibrary.wiley.com/doi/10.1155/ijmm/7558344)</sup> 拉普拉斯算子亦然：笛卡尔积的拉普拉斯算子是因子拉普拉斯算子的克罗内克和，其特征值全为形如 \( \lambda_i(L(G)) + \lambda_j(L(H)) \) 的和，特征向量为因子特征向量的克罗内克积。<sup>[10](https://tobias-lib.uni-tuebingen.de/xmlui/bitstream/handle/10900/88357/Mukovskiy_PhD_Thesis.pdf)</sup> 这些可分离的谱结构被用于图信号处理：笛卡尔积在其中建模高阶条件依赖，并支持避免直接求逆大型积图拉普拉斯算子的高效计算。<sup>[11](https://proceedings.mlr.press/v238/shi24a.html)</sup>

## 素因子分解

若图 \( G \) 满足 \( G = G_1 \square G_2 \) 时总有一个因子是单顶点，则称 \( G \) 关于笛卡尔积是素的。<sup>[5](https://www.math.iit.edu/~kaul/talks/DistingChromaticTalk-short.pdf)</sup> 萨比杜西与维津各自独立证明：每个连通图都可分解为素因子，且分解在重排与同构意义下唯一；这一唯一性后来由法伊根鲍姆与沃克（Walker）推广到弱连通有向图，而非连通图未必唯一分解。<sup>[5](https://www.math.iit.edu/~kaul/talks/DistingChromaticTalk-short.pdf)</sup><sup> • </sup><sup>[6](https://webusers.i3s.unice.fr/~ccrespelle/publications/C10_cartesian-product.pdf)</sup> 素分解细化了图的任何其他积因子分解。<sup>[6](https://webusers.i3s.unice.fr/~ccrespelle/publications/C10_cartesian-product.pdf)</sup>

以算法方式计算分解始于萨比杜西的非算法性证明：该证明将每个素因子等同于边集上一列逐层加粗的等价关系中的某个等价类；法伊根鲍姆、赫什伯格（Hershberger）与舍费尔（Schäffer）于 1985 年将此结构转化为多项式时间算法。<sup>[12](https://www.sciencedirect.com/science/article/pii/0166218X85900666)</sup> 他们的算法对 \( n \) 个顶点的图运行时间为 \( O(n^{4.5}) \)；此后温克勒（Winkler）、费德（Feder）与奥伦哈默（Aurenhammer）等人的改进，最终归结为伊姆里希与彼得林的线性时间算法，这也是该问题目前唯一的线性算法。<sup>[6](https://webusers.i3s.unice.fr/~ccrespelle/publications/C10_cartesian-product.pdf)</sup> 定义与分解理论可推广到图之外：超图的笛卡尔积可类似定义，而图的经典素因子分解算法已借助 2-截面推广到连通共形超图。<sup>[13](https://arxiv.org/abs/0909.5032)</sup>

## 标准示例与应用

许多常见的图族都是笛卡尔积。<sup>[3](https://mathworld.wolfram.com/GraphCartesianProduct.html)</sup>

- 两条路径之积 \( P_m \square P_n \) 是矩形网格图；三条路径给出三维网格。
- 单边 \( P_2 \) 的 \( n \) 重积是 \( n \) 维超立方体 \( Q_n \)。<sup>[3](https://mathworld.wolfram.com/GraphCartesianProduct.html)</sup><sup> • </sup><sup>[8](https://arxiv.org/abs/1105.3383)</sup>
- 两个圈之积 \( C_m \square C_n \) 是环面网格图，而 \( C_m \square P_2 \) 是棱柱图。
- 完全图之积 \( K_q^{\square d} \) 是汉明图 \( H(d,q) \)，其顶点可用 \( q \) 元字母表上的 \( d \) 元组标记，相邻当且仅当汉明距离为一。<sup>[14](https://mathworld.wolfram.com/HammingGraph.html)</sup>

笛卡尔积是并行互连网络背后的标准构造：网格、超立方体与环面网络都是较小网络的笛卡尔积。<sup>[15](https://www.sciencedirect.com/science/article/pii/S0743731510001978)</sup> \( n \) 维网格可典范地分解为线性阵列的笛卡尔积，每个环面可分解为圈之笛卡尔积——这一事实支撑了这些拓扑上的维序路由与层次化算法设计。<sup>[16](https://pages.cs.wisc.edu/~tvrdik/5/html/Section5.html)</sup> 超立方体 \( Q_n \) 是最简单的、因子多于两个的笛卡尔积，也是研究得最多的图类之一，而汉明图作为完全图之积对其加以推广。<sup>[17](https://nzdr.ru/data/media/biblio/kolxoz/M/MA/MAc/Imrich%20W.%2C%20Klavzar%20S.%2C%20Rall%20D.%20Topics%20in%20graph%20theory..%20Graphs%20and%20their%20Cartesian%20product%20%28AK%20Peters%2C%202008%29%28ISBN%201568814291%29%28O%29%28213s%29_MAc_.pdf)</sup> 除网络设计之外，笛卡尔积结构还被用于为并行计算构造类网格结构、在信号重建中将时变信号建模为时空积，以及利用积的分解来降低问题的算法复杂度。<sup>[18](https://www.tandfonline.com/doi/full/10.1080/16583655.2026.2724763)</sup><sup> • </sup><sup>[19](https://doi.org/10.1016/j.jfranklin.2024.106805)</sup><sup> • </sup><sup>[13](https://arxiv.org/abs/0909.5032)</sup>

## References

1. [cartesian_product, NetworkX 3.7 documentation](https://networkx.org/documentation/stable/reference/algorithms/generated/networkx.algorithms.operators.product.cartesian_product.html)
2. [Geodetic numbers of tensor product and lexicographic product of graphs, Tandfonline](https://www.tandfonline.com/doi/full/10.1080/09728600.2024.2422535)
3. [Graph Cartesian Product, Wolfram MathWorld](https://mathworld.wolfram.com/GraphCartesianProduct.html)
4. [The general position achievement game played on graphs, Discrete Applied Mathematics](https://doi.org/10.1016/j.dam.2022.04.019)
5. [Hemanshu Kaul, Distinguishing Chromatic Number of Cartesian Products of Graphs (talk slides), Illinois Institute of Technology](https://www.math.iit.edu/~kaul/talks/DistingChromaticTalk-short.pdf)
6. [Crespelle, Thierry, Lambert, Linear-time prime decomposition of digraphs for the Cartesian product](https://webusers.i3s.unice.fr/~ccrespelle/publications/C10_cartesian-product.pdf)
7. [1.1 Cartesian Product of Graphs, Electronic Journal of Combinatorics](https://www.combinatorics.org/ojs/index.php/eljc/article/download/v26i1p3/pdf/)
8. [Sachdeva and Tulsiani, Cuts in Cartesian Products of Graphs, arXiv:1105.3383](https://arxiv.org/abs/1105.3383)
9. [Spectral Characterizations of the Aα-Matrix for Graph Products, Wiley](https://onlinelibrary.wiley.com/doi/10.1155/ijmm/7558344)
10. [Mukovskiy, Computational Methods (PhD thesis), University of Tübingen](https://tobias-lib.uni-tuebingen.de/xmlui/bitstream/handle/10900/88357/Mukovskiy_PhD_Thesis.pdf)
11. [Shi and Mishne, Learning Cartesian Product Graphs with Laplacian Constraints, AISTATS 2024, PMLR 238](https://proceedings.mlr.press/v238/shi24a.html)
12. [Feigenbaum, Hershberger, Schäffer, A polynomial time algorithm for finding the prime factors of cartesian-product graphs, Discrete Applied Mathematics 12 (1985)](https://www.sciencedirect.com/science/article/pii/0166218X85900666)
13. [Bretto, Silvestre, Vallée, Cartesian product of hypergraphs: properties and algorithms, arXiv:0909.5032](https://arxiv.org/abs/0909.5032)
14. [Hamming Graph, Wolfram MathWorld](https://mathworld.wolfram.com/HammingGraph.html)
15. [Performance modeling of Cartesian product networks, ScienceDirect](https://www.sciencedirect.com/science/article/pii/S0743731510001978)
16. [Direct interconnection networks I+II, University of Wisconsin CS course notes](https://pages.cs.wisc.edu/~tvrdik/5/html/Section5.html)
17. [Imrich, Klavžar, Rall, Topics in Graph Theory: Graphs and Their Cartesian Product, A K Peters, 2008](https://nzdr.ru/data/media/biblio/kolxoz/M/MA/MAc/Imrich%20W.%2C%20Klavzar%20S.%2C%20Rall%20D.%20Topics%20in%20graph%20theory..%20Graphs%20and%20their%20Cartesian%20product%20%28AK%20Peters%2C%202008%29%28ISBN%201568814291%29%28O%29%28213s%29_MAc_.pdf)
18. [A novel framework for the Cartesian product of clique simplicial complexes, Tandfonline](https://www.tandfonline.com/doi/full/10.1080/16583655.2026.2724763)
19. [Bayesian reconstruction of Cartesian product graph signals with general patterns of missing data, Journal of the Franklin Institute](https://doi.org/10.1016/j.jfranklin.2024.106805)
20. [cs.columbia.edu](https://www.cs.columbia.edu/~cs6204/files/Lec5-Automorphisms.pdf)

---
*Initially written Oct 15, 2026 · Edited: Oct 25, 2026*

Topic: 物质世界与数学 › 数学与统计学 › 数与代数

Copyright 2026 Edgepedia

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

Source: https://www.edgepedia.org/zh/graph-cartesian-product

English original: https://www.edgepedia.org/graph-cartesian-product
