# 三设施问题

三设施问题，又称水、气、电问题，是一个数学谜题：要求在同一平面上画出三座房子与三家公用事业公司之间的连接线，且任意两条线不得交叉。此题无解：其连接模式即完全二部图 \( K_{3,3} \)，而该图是非平面图，这一事实构成了库拉托夫斯基定理（该定理刻画了平面图）证明的一部分。<sup>[1](https://graphsearch.epfl.ch/en/concept/58862)</sup>

| 关键事实 | 详情 |
|---|---|
| 任务 | 用不相交的线将三座房子分别与三家公用事业公司（水、气、电）相连<sup>[1](https://graphsearch.epfl.ch/en/concept/58862)</sup> |
| 底层图 | \( K_{3,3} \)，即具有6个顶点和9条边的完全二部图，称为公用事业图，亦称托姆森图，得名于19世纪化学家尤利乌斯·托姆森<sup>[1](https://graphsearch.epfl.ch/en/concept/58862)</sup> |
| 答案 | 在平面上不可能实现；\( K_{3,3} \) 是非平面图<sup>[2](https://bica.the-ica.org/Volumes/98/Reprints/BICA2022-36-Reprint.pdf)</sup> |
| 原因 | 欧拉公式迫使面数为5，但二部性要求 \( 4f \le 2e \)，从而得出 \( 20 \le 18 \)<sup>[2](https://bica.the-ica.org/Volumes/98/Reprints/BICA2022-36-Reprint.pdf)</sup> |
| 在其他曲面上 | \( K_{3,3} \) 可嵌入环面；M.P. 范斯特拉滕于1948年确定其在该曲面上仅有两种嵌入方式<sup>[3](https://scholarworks.wmich.edu/honors_theses/269/)</sup> |
| 最佳平面尝试 | \( K_{3,3} \) 的平面画法中交叉数的最小值为一<sup>[1](https://graphsearch.epfl.ch/en/concept/58862)</sup> |
| 已知最早印刷出处 | 亨利·欧内斯特·杜德尼，《斯特兰德杂志》，1913年<sup>[2](https://bica.the-ica.org/Volumes/98/Reprints/BICA2022-36-Reprint.pdf)</sup> |

## 谜题及其图

这个问题通常这样表述：有三座房子A、B、C，以及三家公用事业公司——水、电、气。每家公用事业公司都必须直接连到每座房子，且任意两条线不得交叉。房子和公用事业公司可以放置在平面上或球面上的任意位置，问题不变。<sup>[4](https://pballew.blogspot.com/2024/02/houses-and-utilities-why-it-cant-be-done.html)</sup>

该构型用 \( K_{3,3} \) 建模，即6阶9边的完全二部图：其六个顶点分为两组，每组三个，分别为房子和公用事业公司，两个顶点之间有边当且仅当它们属于不同组。<sup>[2](https://bica.the-ica.org/Volumes/98/Reprints/BICA2022-36-Reprint.pdf)</sup> 近似解很容易画出，只剩一条公用事业线——比如连接房子A与煤气厂的那条——还没画；但无论如何都无法在不产生交叉的情况下补上最后这条边。<sup>[2](https://bica.the-ica.org/Volumes/98/Reprints/BICA2022-36-Reprint.pdf)</sup>

## 为何不可能

标准证明采用反证法，运用欧拉公式。对于连通平面图，欧拉公式为 \( v - e + f = 2 \)，其中 \( v \)、\( e \)、\( f \) 分别计算顶点、边和面的数目。对于 \( K_{3,3} \)，\( v = 6 \)，\( e = 9 \)，因此若存在平面画法，则面数应为 \( f = 5 \)。<sup>[2](https://bica.the-ica.org/Volumes/98/Reprints/BICA2022-36-Reprint.pdf)</sup>

由于 \( K_{3,3} \) 是二部图，它不含奇环，特别是不含三角形，因此在平面画法中每个面至少由四条边围成。每条边与两个面相邻，故计算边与面的关联数可得 \( 4f \le 2e \)。代入 \( f = 5 \) 和 \( e = 9 \)，得到 \( 20 \le 18 \)，矛盾；因此 \( K_{3,3} \) 不是平面图，谜题无解。<sup>[2](https://bica.the-ica.org/Volumes/98/Reprints/BICA2022-36-Reprint.pdf)</sup> 同样的计数方法（允许三角形）可证明其伴随图 \( K_5 \) 也是非平面图，因为它的10条边超过了上界 \( 3v - 6 = 9 \)。<sup>[5](https://www.math.cmu.edu/~mradclif/teaching/228F16/Kuratowski.pdf)</sup>

更一般地，若 \( g \) 为围长（最短环的长度），则任何平面图满足 \( gf \le 2e \)；当此不等式与欧拉公式矛盾时，该图不可能是平面图。<sup>[6](https://discrete.openmathbooks.org/dmoi4/sec_gt-planar.html?printpreview=PA-gt-planar)</sup>

## 在库拉托夫斯基定理中的角色

两个非平面图 \( K_5 \) 和 \( K_{3,3} \) 不仅仅是例子；它们是平面性的根本障碍。图的细分是通过在一条或多条边中插入度为2的顶点而得到的，细分不改变平面性。库拉托夫斯基定理由波兰拓扑学家卡齐米日·库拉托夫斯基（Kazimierz Kuratowski，1896–1980）于1930年首次发表于《数学基础》上的论文《论拓扑学中的弯曲曲线问题》中，该定理指出：一个图是平面图当且仅当它不包含 \( K_5 \) 或 \( K_{3,3} \) 的细分作为子图。<sup>[2](https://bica.the-ica.org/Volumes/98/Reprints/BICA2022-36-Reprint.pdf)</sup><sup> • </sup><sup>[7](https://www.impan.pl/en/publishing-house/journals-and-series/fundamenta-mathematicae/all/en/publishing-house/journals-and-series/fundamenta-mathematicae/all/15/0/92829/sur-le-probleme-des-courbes-gauches-en-topologie)</sup> 该定理于1929年首次公布，其背景是拓扑学而非图论；当时非平面图有时被称为斜图。<sup>[2](https://bica.the-ica.org/Volumes/98/Reprints/BICA2022-36-Reprint.pdf)</sup>

一个相关的刻画使用子式——通过删除和收缩边得到的图。瓦格纳定理（1937年）指出：一个图是平面图当且仅当 \( K_5 \) 和 \( K_{3,3} \) 都不是它的子式。<sup>[2](https://bica.the-ica.org/Volumes/98/Reprints/BICA2022-36-Reprint.pdf)</sup> 彼得森图说明了两种包含概念之间的区别：它包含 \( K_{3,3} \) 的细分但不包含 \( K_5 \) 的细分，而 \( K_5 \) 是它的子式。<sup>[2](https://bica.the-ica.org/Volumes/98/Reprints/BICA2022-36-Reprint.pdf)</sup>

## 交叉与其他曲面

既然所有连接无法在平面内画出，一个自然的问题是：至少需要多少个交叉？最小化完全二部图画法中的交叉数被称为图兰砖厂问题，由保罗·图兰根据他1944年在布达佩斯附近一家砖厂的经历提出——那里窑炉和堆场由铁路连接，轨道车在交叉处频频脱轨。对于 \( K_{3,3} \)，最小交叉数为一。<sup>[1](https://graphsearch.epfl.ch/en/concept/58862)</sup><sup> • </sup><sup>[8](https://www.cse.unr.edu/~fredh/papers/thesis/019-martin/text.pdf)</sup>

这一障碍是平面所特有的。\( K_{3,3} \) 可以嵌入环面（即有一个洞的曲面），M.P. 范斯特拉滕于1948年确定其在该曲面上仅有两种嵌入方式；她利用这一事实证明了包含 \( K_{3,3} \) 作为子图的笛沙格构型图亏格为二。<sup>[3](https://scholarworks.wmich.edu/honors_theses/269/)</sup> 根据高亏格曲面上的欧拉公式，\( K_{3,3} \) 的最大可定向亏格为二，其在双环面上的2-胞腔嵌入只有一个面。<sup>[9](https://arxiv.org/abs/2203.01150)</sup>

## 历史

谜题的起源不明。它显然首次印刷出现于1913年英国作家兼谜题创作者亨利·欧内斯特·杜德尼在《斯特兰德杂志》上发表的一篇文章中；杜德尼属于一个包括阿瑟·柯南·道尔爵士在内的文学圈子。在他1917年的著作《数学中的娱乐》中，他将此问题描述为“古老得很”，远比电灯甚至煤气更为古老。<sup>[2](https://bica.the-ica.org/Volumes/98/Reprints/BICA2022-36-Reprint.pdf)</sup>

迈阿密大学的大卫·E. 库尔曼于1979年在《数学杂志》上对该问题的历史进行了综述。库尔曼指出，大多数已发表的文献将该问题描述为“非常古老”，而在他找到的最早出版物中，杜德尼将其命名为“水、气、电”。<sup>[10](https://www.tandfonline.com/doi/full/10.1080/0025570X.1979.11976807)</sup><sup> • </sup><sup>[11](https://sites.google.com/view/mr-townsends-math-page/puzzles)</sup> 该谜题也被归功于美国谜题家萨姆·洛伊德，他于1903年提出了它。<sup>[12](https://diconombre.fr/aJeux1/Topologi/Maison.htm)</sup> 2025年对西班牙周刊《世界周围》的一项研究发现，该问题于1899年作为一则看似众所周知的谜题出现，编辑声称有两位读者提出了它；这早于杜德尼和洛伊德的归属，使该问题的起源更加存疑。<sup>[13](https://journals.pan.pl/Content/138566/Analecta_2_2025_14_Oller-Marc%C3%A9n.pdf)</sup>

## 算法背景

库拉托夫斯基定理刻画了平面性，但本身并不给出高效判定方法，因为在大图中寻找禁用的细分图并非易事。<sup>[14](https://math-cs-compass.com/Mathematics/Discrete/planar_graphs.html)</sup> 高效的平面性判定由约翰·霍普克罗夫特和罗伯特·塔扬解决，他们1974年发表于《ACM杂志》的算法利用深度优先搜索，在 \( O(V) \) 时间和空间内判定任意图能否嵌入平面；一个ALGOL实现测试了多达900个顶点的图，用时不到12秒。<sup>[15](https://doi.org/10.1145/321850.321852)</sup> 后来的线性时间方法，如约翰·博耶和温迪·米尔沃德2004年的加边算法，也能在输入图非平面时分离出一个库拉托夫斯基子图，即 \( K_5 \) 或 \( K_{3,3} \) 的显式细分。<sup>[16](https://jgaa-v5.cs.brown.edu/index.php/jgaa/article/view/paper91)</sup>

## References

1. [Three utilities problem, EPFL Graph Search](https://graphsearch.epfl.ch/en/concept/58862)
2. [A Tale of Two Graphs (Kuratowski's theorem and the three utilities problem), BICA Bulletin, Vol. 98 (2022)](https://bica.the-ica.org/Volumes/98/Reprints/BICA2022-36-Reprint.pdf)
3. [William Goodwin (1973). Imbedding Problems in Graph Theory. Honors Theses 269, Western Michigan University](https://scholarworks.wmich.edu/honors_theses/269/)
4. [Houses and Utilities / Why it Can't be Done, Pat'sBlog (2024)](https://pballew.blogspot.com/2024/02/houses-and-utilities-why-it-cant-be-done.html)
5. [Mary Radcliffe. Math 228: Kuratowski's Theorem, Carnegie Mellon University](https://www.math.cmu.edu/~mradclif/teaching/228F16/Kuratowski.pdf)
6. [Planar Graphs, Discrete Mathematics, OpenMathBooks](https://discrete.openmathbooks.org/dmoi4/sec_gt-planar.html?printpreview=PA-gt-planar)
7. [Casimir Kuratowski (1930). Sur le problème des courbes gauches en Topologie. Fundamenta Mathematicae 15, 271–283, IMPAN](https://www.impan.pl/en/publishing-house/journals-and-series/fundamenta-mathematicae/all/en/publishing-house/journals-and-series/fundamenta-mathematicae/all/15/0/92829/sur-le-probleme-des-courbes-gauches-en-topologie)
8. [Minimum Crossing Number Problem, University of Nevada, Reno thesis](https://www.cse.unr.edu/~fredh/papers/thesis/019-martin/text.pdf)
9. [Embedding K3,3 and K5 on the Double Torus, arXiv:2203.01150](https://arxiv.org/abs/2203.01150)
10. [David E. Kullman (1979). The Utilities Problem. Mathematics Magazine 52(5), 299–302](https://www.tandfonline.com/doi/full/10.1080/0025570X.1979.11976807)
11. [Mr. Townsend's Math Page – Puzzles](https://sites.google.com/view/mr-townsends-math-page/puzzles)
12. [Les trois maisons, DicoNombre](https://diconombre.fr/aJeux1/Topologi/Maison.htm)
13. [Antonio M. Oller-Marcén (2025). Exploring the Presence of Mathematics in the Spanish Weekly Magazine Alrededor del Mundo, Analecta](https://journals.pan.pl/Content/138566/Analecta_2_2025_14_Oller-Marc%C3%A9n.pdf)
14. [Kuratowski's Theorem and Graph Minors, MATH-CS COMPASS](https://math-cs-compass.com/Mathematics/Discrete/planar_graphs.html)
15. [John Hopcroft, Robert Tarjan (1974). Efficient Planarity Testing. Journal of the ACM 21(4), 549–568](https://doi.org/10.1145/321850.321852)
16. [John Boyer, Wendy Myrvold (2004). On the Cutting Edge: Simplified O(n) Planarity by Edge Addition. Journal of Graph Algorithms and Applications 8(3), 241–273](https://jgaa-v5.cs.brown.edu/index.php/jgaa/article/view/paper91)

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

Topic: 物质世界与数学 › 数学与统计学 › 逻辑与离散数学 › General discrete mathematics and discrete structures › Graph theory › Graph theory subfields and named results › Topological graph theory

Copyright 2026 Edgepedia

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

Source: https://www.edgepedia.org/zh/three-utilities-problem

English original: https://www.edgepedia.org/three-utilities-problem
