# 戈莱码

戈莱码是两种特殊的纠错分组码，一种为二元码，一种为三元码，由马塞尔·J. E. 戈莱（Marcel J. E. Golay）在其1949年发表于《无线电工程师学会会刊》（*Proceedings of the IRE*）的短文《数字编码札记》（"Notes on Digital Coding"）中提出。二元戈莱码是长度为23、可纠正3个错误的完美码，三元戈莱码是长度为11、可纠正2个错误的完美码；两者在各自参数下都是唯一的，并且都有长度为偶数的扩展变体。<sup>[1](https://www.math.uci.edu/~nckaplan/teaching_files/kaplancodingnotes.pdf)</sup><sup> • </sup><sup>[2](https://encyclopediaofmath.org/index.php?title=Golay_code)</sup> 在任何字母表大小为正素数幂的字母表上，它们是仅有的能纠正一个以上错误的非平凡完美码；这一结果由 A. 蒂泰韦宁（A. Tietäväinen）与 J. H. 范林特（J. H. van Lint）证明。<sup>[2](https://encyclopediaofmath.org/index.php?title=Golay_code)</sup>

| 关键事实 | 细节 |
|---|---|
| 二元戈莱码 | 一个 [23, 12, 7] 二元码：F\(_2^{23}\) 的12维子空间，最小距离为7，可纠正3个错误；完美且唯一<sup>[1](https://www.math.uci.edu/~nckaplan/teaching_files/kaplancodingnotes.pdf)</sup><sup> • </sup><sup>[2](https://encyclopediaofmath.org/index.php?title=Golay_code)</sup>  |
| 扩展二元码 | 添加一个奇偶校验位便得到 [24, 12, 8] 扩展二元戈莱码，它能检测最多四个错误的所有模式<sup>[1](https://www.math.uci.edu/~nckaplan/teaching_files/kaplancodingnotes.pdf)</sup><sup> • </sup><sup>[3](https://ntrs.nasa.gov/api/citations/19970009858/downloads/19970009858.pdf)</sup>  |
| 三元戈莱码 | F\(_3") 上的一个 [11, 6, 5] 三元码，完美且唯一；将其扩展为使每个字的坐标和为零，便得到 [12, 6, 6] 自对偶扩展三元码<sup>[1](https://www.math.uci.edu/~nckaplan/teaching_files/kaplancodingnotes.pdf)</sup><sup> • </sup><sup>[4](https://pages.mtu.edu/~tonchev/Coding-Theory-Tohoku-June-09)</sup>  |
| 完美性算术 | 对二元码，1 + 23 + 253 + 1771 = 2048 = 2\(^{11}\) 个错误模式等于伴随式的数目；对三元码，半径2的球各含 3\(^5\) = 243 个字，且 243 · 3\(^6\) = 3\(^{11}\)<sup>[5](https://sources.debian.org/src/outguess/1%3A0.2-5/golay.c)</sup><sup> • </sup><sup>[1](https://www.math.uci.edu/~nckaplan/teaching_files/kaplancodingnotes.pdf)</sup>  |
| 起源 | 由马塞尔·J. E. 戈莱于1949年6月发表（《无线电工程师学会会刊》，第37卷，第657页）；三元码更早出现，1947年由尤哈尼·维尔塔卡利奥（Juhani Virtakallio）给出<sup>[6](https://vectree.io/c/ternary-golay-code)</sup> |
| 对称性 | 扩展二元码的自同构群是5重传递的马蒂厄群 M\(_{24}\)；三元码带有马蒂厄群 M\(_{11}\) 和 M\(_{12}\)<sup>[7](https://doczz.net/doc/7941958/the-witt-designs--golay-codes-and-mathieu-groups)</sup><sup> • </sup><sup>[4](https://pages.mtu.edu/~tonchev/Coding-Theory-Tohoku-June-09)</sup>  |
| 著名应用 | (24, 12, 8) 码在旅行者号任务（Voyager mission）中提供差错控制，包括1979年和1980年从木星（Jupiter）和土星（Saturn）传回图像<sup>[8](https://www.sciencedirect.com/science/article/abs/pii/S0020025510003889)</sup><sup> • </sup><sup>[9](https://forohistorico.coit.es/index.php/biblioteca/articulos-seminales/item/notes-on-digital-coding)</sup>  |

## “完美”的含义

当一个码的码字周围半径为 t 的汉明球恰好铺满整个空间，既无空隙也无重叠时，这个码就是完美的：每一个可能接收到的字都恰好落在某一个码字的距离 t 之内。<sup>[2](https://encyclopediaofmath.org/index.php?title=Golay_code)</sup> 这是球填充界（sphere-packing bound）的等号情形；对大多数参数选择而言，球填充界只是一个不等式。

对二元戈莱码，F\(_2^{23}\) 中半径3的球包含 \( \binom{23}{0} + \binom{23}{1} + \binom{23}{2} + \binom{23}{3} = 2048 \) 个字。由于 2048 = 2\(^{11}\)，而该码有 2\(^{12}\) = 4096 个码字，这些球恰好填满空间中的 2\(^{23}\) 个字。<sup>[1](https://www.math.uci.edu/~nckaplan/teaching_files/kaplancodingnotes.pdf)</sup> 同样的计算在 F\(_3\) 上也成立：半径2的球含 \( 1 + 2 \cdot 11 + 4 \cdot \binom{11}{2} = 243 = 3^5 \) 个字，且 3\(^5 \cdot 3^6 = 3^{11}\)。<sup>[1](https://www.math.uci.edu/~nckaplan/teaching_files/kaplancodingnotes.pdf)</sup> 三元码在扩展之前和之后也都达到格里斯默界（Griesmer bound）的等号。<sup>[1](https://www.math.uci.edu/~nckaplan/teaching_files/kaplancodingnotes.pdf)</sup>

## 历史

戈莱的一页短文于1949年2月23日被学会收到，并于1949年6月作为通信栏目文章发表于《无线电工程师学会会刊》第37卷，第657页。<sup>[10](https://pierre-hyvernat.apps.math.cnrs.fr/data/Enseignement/2223/info602/TP-Golay/golay_paper.pdf)</sup> 他在文中不仅提出了完美的二元 [23, 12, 7] 码和三元 [11, 6, 5] 码，还提出了如今称为汉明码（Hamming codes）的完美单错误纠正码族。<sup>[4](https://pages.mtu.edu/~tonchev/Coding-Theory-Tohoku-June-09)</sup>

三元码还有一位更早的独立发现者。芬兰足球彩票爱好者尤哈尼·维尔塔卡利奥于1947年在足球彩票杂志《韦卡亚》（*Veikkaaja*）第27、28和33期上发表了这729个码字，比戈莱的论文早两年；他只是把它们作为一种良好的足球彩票投注系统提出。<sup>[6](https://vectree.io/c/ternary-golay-code)</sup><sup> • </sup><sup>[11](https://www.terpconnect.umd.edu/~abarg/reprints/dawn.pdf)</sup> 与投注的联系并非偶然：选择一组三元猜测，使每一个可能结果都落在某个猜测的距离2以内，正是足球彩票问题——汉明空间 F\(_3^{11}\) 中的一个覆盖问题——而三元戈莱码完美地解决了它。<sup>[11](https://www.terpconnect.umd.edu/~abarg/reprints/dawn.pdf)</sup>

## 结构与唯一性

**循环形式。** 二元戈莱码是一个循环码：生成多项式可以取为 \( g(x) = x^{11} + x^9 + x^7 + x^6 + x^5 + x + 1 \)，它由模23的非零二次剩余构造，即 {1, 2, 3, 4, 6, 8, 9, 12, 13, 16, 18}。<sup>[8](https://www.sciencedirect.com/science/article/abs/pii/S0020025510003889)</sup> 其循环性质还给出一种直接写出生成矩阵的方法：平移一个固定码字即可。<sup>[12](https://xenon.stanford.edu/~blynn/pr/perfect.html)</sup> 扩展三元码有一个生成矩阵，由第一行为012210的5×5循环矩阵构造，并且它是最小距离为6的自对偶码。<sup>[4](https://pages.mtu.edu/~tonchev/Coding-Theory-Tohoku-June-09)</sup>

**重量分布。** 在扩展二元 (24, 12) 码中，每个码字都有偶重量，该码包含759个重量8的字、2576个重量12的字、重量24的全1字，以及零字。<sup>[3](https://ntrs.nasa.gov/api/citations/19970009858/downloads/19970009858.pdf)</sup> 这759个重量8字的支撑集构成施泰纳系（Steiner system）S(5, 8, 24)，即大维特设计（Witt design）；其中每一个5元坐标集都恰好位于一个区组中。<sup>[4](https://pages.mtu.edu/~tonchev/Coding-Theory-Tohoku-June-09)</sup><sup> • </sup><sup>[7](https://doczz.net/doc/7941958/the-witt-designs--golay-codes-and-mathieu-groups)</sup> 类似地，三元码的重量5字构成一个 4-(11, 5, 1) 设计，扩展三元码的重量6字构成一个 5-(12, 6, 1) 设计。<sup>[4](https://pages.mtu.edu/~tonchev/Coding-Theory-Tohoku-June-09)</sup>

**对称群。** 扩展二元戈莱码的完全自同构群是5重传递的马蒂厄群 M\(_{24}\)，其阶为 24 · 23 · 22 · 21 · 20 · 16 · 3；[23, 12, 7] 码的自同构群是4重传递群 M\(_{23}\)。<sup>[7](https://doczz.net/doc/7941958/the-witt-designs--golay-codes-and-mathieu-groups)</sup><sup> • </sup><sup>[4](https://pages.mtu.edu/~tonchev/Coding-Theory-Tohoku-June-09)</sup> 在三元码方面，[11, 6, 5] 码和 [12, 6, 6] 码的自同构群中的置换分别形成同构于马蒂厄群 M\(_{11}\)（阶7920）和 M\(_{12}\)（阶95040）的群。<sup>[4](https://pages.mtu.edu/~tonchev/Coding-Theory-Tohoku-June-09)</sup> 这些群是散在单群，而维特设计 S(5, 8, 24) 与 S(5, 6, 12) 在各自参数下都是唯一的。<sup>[13](https://repository.tudelft.nl/file/File_bf67642a-fed0-4889-9c70-e3a7e4c5972f)</sup><sup> • </sup><sup>[14](https://aeb.win.tue.nl/graphs/S.html)</sup>

**唯一性。** 两种戈莱码在各自参数下都是唯一的。三元自对偶 [12, 6, 6] 码是唯一的，这推出三元戈莱码 C\(_{11}\) 的唯一性；二元码的唯一性则来自其自同构群的传递性。<sup>[11](https://www.terpconnect.umd.edu/~abarg/reprints/dawn.pdf)</sup><sup> • </sup><sup>[7](https://doczz.net/doc/7941958/the-witt-designs--golay-codes-and-mathieu-groups)</sup>

## 在完美码中的地位

在二元字母表上，线性完美码的完整列表有两族无限族——重复码和汉明码——外加一个例外成员，即二元戈莱码；它们都有扩展变体。<sup>[12](https://xenon.stanford.edu/~blynn/pr/perfect.html)</sup> 在更大的字母表上，一般的完美码约束为 \( \sum_{i=0}^{e} \binom{n}{i}(q-1)^i = q^{n-k} \)，而三元戈莱码以 n = 11、e = 2、q = 3 实现该等式。<sup>[12](https://xenon.stanford.edu/~blynn/pr/perfect.html)</sup> 在后来的工作中，蒂泰韦宁与范林特证明：当 e > 1 时，除戈莱码之外，在素数幂大小的字母表上不存在纠正 e 个错误的完美码。<sup>[2](https://encyclopediaofmath.org/index.php?title=Golay_code)</sup> 有限域上所有完美码的参数由范林特与蒂泰韦宁在一系列论文中确定。<sup>[4](https://pages.mtu.edu/~tonchev/Coding-Theory-Tohoku-June-09)</sup>

这些码还延伸到邻近的数学领域。20世纪60年代，利奇格（Leech lattice）进入约翰·康威（John Conway）的视野；人们逐渐清楚，与最大的马蒂厄群 M\(_{24}\) 相关联的维特设计 S(5, 8, 24)，通过戈莱码充当利奇格的框架，而利奇格是唯一的24维无根偶幺模格。<sup>[15](https://assets.cambridge.org/97810093/38042/frontmatter/9781009338042_frontmatter.pdf)</sup>

## 应用

**深空通信。** (24, 12, 8) 扩展二元戈莱码曾在旅行者号任务中用于提供差错控制。<sup>[8](https://www.sciencedirect.com/science/article/abs/pii/S0020025510003889)</sup> 给每个23位字添加一个奇偶校验位便得到这个半率码；一个著名应用是1979年和1980年从木星和土星传回图像。<sup>[8](https://www.sciencedirect.com/science/article/abs/pii/S0020025510003889)</sup><sup> • </sup><sup>[9](https://forohistorico.coit.es/index.php/biblioteca/articulos-seminales/item/notes-on-digital-coding)</sup> 该码还被用于高频无线电通信中的军用安全数据传输。<sup>[9](https://forohistorico.coit.es/index.php/biblioteca/articulos-seminales/item/notes-on-digital-coding)</sup> 在美国国家航空航天局（NASA）的深空实践中，戈莱码之类的分组码与码率1/2的卷积码结合使用，先进行维特比（Viterbi）译码，再进行分组译码。<sup>[16](https://ntrs.nasa.gov/api/citations/19830008325/downloads/19830008325.pdf)</sup>

**译码。** 由于长度短（23）且有11个冗余位，二元戈莱码可以用查找表进行编码和译码；一种实现使用16K编码表和8K译码表，利用2048个伴随式与可纠正错误模式一一对应这一点。<sup>[5](https://sources.debian.org/src/outguess/1%3A0.2-5/golay.c)</sup> 人们为该码发展了许多译码算法，包括代数方法、计算复杂度较低的逐步方案，以及一种精简查找表只需42个伴随式的伴随式重量译码器。<sup>[17](https://globals.ieice.org/en_transactions/fundamentals/10.1093/ietfec/e89-a.8.2235/_p)</sup><sup> • </sup><sup>[8](https://www.sciencedirect.com/science/article/abs/pii/S0020025510003889)</sup> 一项比较研究发现，在最大似然硬判决译码下，非扩展 (23, 12, 7) 码的功率效率略高于扩展 (24, 12, 8) 码：对于扩展码的一个码字，与忽略第24个符号并译码前23个符号相比，并不会获得更高的正确译码概率。<sup>[18](https://arxiv.org/abs/1602.05620)</sup>

**量子信息。** 三元戈莱码自然产生一个由11个量子三态位组成的量子纠错码，用于容错量子计算中的魔法态蒸馏；它以三次方误差抑制蒸馏“奇异”量子三态位态，去极化噪声阈值约为0.387，并且是已知唯一能蒸馏该态的码。<sup>[19](https://arxiv.org/abs/2003.02717)</sup> 两种戈莱码的码字还可以转换为射线，在维数为24和12的实状态空间中给出科亨-斯佩克定理（Kochen-Specker theorem）的证明。<sup>[20](https://arxiv.org/abs/2206.04209)</sup>

## References

1. [N. Kaplan. Coding Theory Lecture Notes, University of California, Irvine.](https://www.math.uci.edu/~nckaplan/teaching_files/kaplancodingnotes.pdf)
2. [Golay code, Encyclopedia of Mathematics.](https://encyclopediaofmath.org/index.php?title=Golay_code)
3. [NASA Technical Memorandum: coding theory reference (weight distributions, extended Golay (24,12) code).](https://ntrs.nasa.gov/api/citations/19970009858/downloads/19970009858.pdf)
4. [P. Wild, An Introduction to Coding Theory: The Ternary Golay Codes (lecture notes, Michigan Technological University).](https://pages.mtu.edu/~tonchev/Coding-Theory-Tohoku-June-09)
5. [R. Morelos-Zaragoza (1994). golay23.c: Encoder/decoder for a binary (23,12,7) Golay code, Debian source package outguess.](https://sources.debian.org/src/outguess/1%3A0.2-5/golay.c)
6. [Ternary Golay code, Vectree visual explainer.](https://vectree.io/c/ternary-golay-code)
7. [The Witt Designs, Golay Codes and Mathieu Groups.](https://doczz.net/doc/7941958/the-witt-designs--golay-codes-and-mathieu-groups)
8. [Decoding the (23, 12, 7) Golay Code, Information Sciences (ScienceDirect).](https://www.sciencedirect.com/science/article/abs/pii/S0020025510003889)
9. [Notes on digital coding (1949), COIT historical library, with commentary by J. A. Delgado-Penín.](https://forohistorico.coit.es/index.php/biblioteca/articulos-seminales/item/notes-on-digital-coding)
10. [Notes on Digital Coding, scanned original (Proc. IRE, received February 23, 1949).](https://pierre-hyvernat.apps.math.cnrs.fr/data/Enseignement/2223/info602/TP-Golay/golay_paper.pdf)
11. [A. Barg (1993). At the Dawn of the Theory of Codes, The Mathematical Intelligencer.](https://www.terpconnect.umd.edu/~abarg/reprints/dawn.pdf)
12. [Perfect Codes, Probability and computing notes (B. Lynn, Stanford).](https://xenon.stanford.edu/~blynn/pr/perfect.html)
13. [Steiner Systems, master's thesis, TU Delft.](https://repository.tudelft.nl/file/File_bf67642a-fed0-4889-9c70-e3a7e4c5972f)
14. [A. E. Brouwer. Steiner systems, S(5,8,24) and related designs.](https://aeb.win.tue.nl/graphs/S.html)
15. [Cambridge University Press frontmatter: the Witt designs, Golay code, and the Leech lattice.](https://assets.cambridge.org/97810093/38042/frontmatter/9781009338042_frontmatter.pdf)
16. [NASA Technical Memorandum: deep space communications and coding (Golay block code with convolutional coding).](https://ntrs.nasa.gov/api/citations/19830008325/downloads/19830008325.pdf)
17. [Ching-Lung Chr, Szu-Lin Su, Shao-Wei Wu (2006). Decoding the (23, 12, 7) Golay Code Using a Low-Complexity Scheme. IEICE Trans. Fundamentals, E89-A(8), 2235-2238.](https://globals.ieice.org/en_transactions/fundamentals/10.1093/ietfec/e89-a.8.2235/_p)
18. [The Golay Code Outperforms the Extended Golay Code Under Hard-Decision Decoding, arXiv:1602.05620.](https://arxiv.org/abs/1602.05620)
19. [S. Prakash (2020). Magic State Distillation with the Ternary Golay Code, arXiv:2003.02717.](https://arxiv.org/abs/2003.02717)
20. [The Golay Codes and Quantum Contextuality, arXiv:2206.04209.](https://arxiv.org/abs/2206.04209)

---
*Initially written Oct 15, 2026*

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

Copyright 2026 Edgepedia

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

Source: https://www.edgepedia.org/zh/golay-code

English original: https://www.edgepedia.org/golay-code
