# 二元戈莱码

二元戈莱码是一种完美二元线性纠错码，长度为23，维数为12，最小距离为7；这意味着它包含 \( 2^{12} = 4096 \) 个码字，并能纠正23位分组中的任意三个比特错误。它由马塞尔·J. E. 戈莱（Marcel J. E. Golay）于1949年在一篇仅半页长的论文中发表，在编码理论中占据独特地位：它是唯一一种消息比特数大于1且能纠正两个以上错误的完美二元码。<sup>[1](https://mathworld.wolfram.com/GolayCode.html)</sup><sup> • </sup><sup>[2](https://www.sfu.ca/~mdevos/notes/comb_struct/golay.pdf)</sup>

| 关键事实 | 详情 |
|---|---|
| 参数 | 完美二元 \([23, 12, 7]\) 码：4096个长度为23的码字，最小距离为7，可纠正3个错误<sup>[1](https://mathworld.wolfram.com/GolayCode.html)</sup><sup> • </sup><sup>[3](https://bnaskrecki.faculty.wmi.amu.edu.pl/crypto/book/part15_code_based_frontiers/ch43_code_based_crypto.html)</sup> |
| 扩展码 | 对每个码字增加一个奇偶校验位，得到 \([24, 12, 8]\) 扩展戈莱码；这是一种自对偶码，其自同构群为马蒂厄群（Mathieu group）\( M_{24} \)<sup>[1](https://mathworld.wolfram.com/GolayCode.html)</sup><sup> • </sup><sup>[4](https://passagemath.org/docs/latest/html/en/reference/coding/sage/coding/golay_code.html)</sup> |
| 唯一性 | 在 \( k > 1 \) 且 \( e > 2 \) 的条件下，唯一的完美 \([n, k, 2e+1]\) 二元码<sup>[2](https://www.sfu.ca/~mdevos/notes/comb_struct/golay.pdf)</sup> |
| 起源 | 马塞尔·戈莱，《数字编码札记》（"Notes on Digital Coding"），Proc. IRE 37, 657 (1949)<sup>[1](https://mathworld.wolfram.com/GolayCode.html)</sup> |
| 组合结构 | 扩展码的759个重量为8的码字构成施泰纳系统（Steiner system）\( S(5,8,24) \)<sup>[5](https://www.lms.ac.uk/sites/default/files/4.%20Curtis%20-%20Error%20Correction%20and%20the%20Binary-Golay%20Code.pdf)</sup> |
| 循环形式 | 以 \( g(x) = 1 + x^2 + x^4 + x^5 + x^6 + x^{10} + x^{11} \) 为生成多项式构造的循环码<sup>[3](https://bnaskrecki.faculty.wmi.amu.edu.pl/crypto/book/part15_code_based_frontiers/ch43_code_based_crypto.html)</sup> |
| 应用 | 美国国家航空航天局（NASA）在旅行者1号（Voyager 1）和旅行者2号（Voyager 2）任务中使用它，从外行星传输图像和数据<sup>[3](https://bnaskrecki.faculty.wmi.amu.edu.pl/crypto/book/part15_code_based_frontiers/ch43_code_based_crypto.html)</sup><sup> • </sup><sup>[6](https://ntrs.nasa.gov/api/citations/19830008325/downloads/19830008325.pdf)</sup> |

## 完美码的含义

二元 \([n, k, d]\) 码是 \( \mathbb{F}_2^n \) 的 \( k \) 维子空间，因此有 \( 2^k \) 个码字；最小距离 \( d \) 是两个码字不同的坐标数的最小值。若 \( d \geq 2e+1 \)，则以各码字为中心、半径为 \( e \) 的汉明球互不相交，因此任何不超过 \( e \) 个传输错误的图样，都可以通过译码到最近码字来纠正。<sup>[2](https://www.sfu.ca/~mdevos/notes/comb_struct/golay.pdf)</sup>

当一个码的这些半径为 \( e \) 的球恰好划分整个空间 \( \mathbb{F}_2^n \)，不留下任何未译码的字时，该码就是完美的。对戈莱码而言，这是一个计数恒等式：以4096个码字为中心、半径为3的球包含

\[ 2^{12} \left( 1 + 23 + \binom{23}{2} + \binom{23}{3} \right) = 2^{12} \cdot 2048 = 2^{23} \]

个字，即所有长度为23的二元向量。因此，每个接收到的23位字都恰好与一个码字的距离不超过3，每个分组中的三个错误总能被消除。<sup>[2](https://www.sfu.ca/~mdevos/notes/comb_struct/golay.pdf)</sup>

## 扩展码及其对称性

对 \( G_{23} \) 的每个码字追加一个总奇偶校验位，便得到扩展戈莱码 \( G_{24} \)，这是一个 \([24, 12, 8]\) 二元线性码。\( G_{24} \) 的每个码字都有偶重量，且 \( G_{24} \) 是自对偶的，即它等于自己的对偶码；反过来，删去 \( G_{24} \) 的任意一个坐标，都能恢复出 \( G_{23} \)。<sup>[1](https://mathworld.wolfram.com/GolayCode.html)</sup><sup> • </sup><sup>[2](https://www.sfu.ca/~mdevos/notes/comb_struct/golay.pdf)</sup><sup> • </sup><sup>[4](https://passagemath.org/docs/latest/html/en/reference/coding/sage/coding/golay_code.html)</sup>

扩展码具有刚性的重量结构。它的4096个码字由零向量、759个重量为8的码字、2576个重量为12的码字、759个重量为16的码字以及重量为24的全1向量组成。<sup>[5](https://www.lms.ac.uk/sites/default/files/4.%20Curtis%20-%20Error%20Correction%20and%20the%20Binary-Golay%20Code.pdf)</sup> 那759个重量为8的码字的支撑集称为八元组（octads），它们构成施泰纳系统 \( S(5,8,24) \)：在24元集合的759个八元子集中，每个五元子集恰好包含于一个八元组。计数恰好闭合，因为 \( \binom{24}{5} = 759 \cdot \binom{8}{5} \)。<sup>[5](https://www.lms.ac.uk/sites/default/files/4.%20Curtis%20-%20Error%20Correction%20and%20the%20Binary-Golay%20Code.pdf)</sup><sup> • </sup><sup>[7](https://citeseerx.ist.psu.edu/document?doi=37d22569e8fbee781f07c5a1733283fd92186c4c&repid=rep1&type=pdf)</sup>

这种设计结构把该码与群论联系起来。将码字映为码字的24个坐标的置换构成马蒂厄群 \( M_{24} \)，它5-重传递地作用在坐标上，是散在单群之一；完美码 \( G_{23} \) 的自同构群是子群 \( M_{23} \)。<sup>[2](https://www.sfu.ca/~mdevos/notes/comb_struct/golay.pdf)</sup> 施泰纳系统 \( S(5,8,24) \) 又决定了利奇格（Leech lattice），即已知24维中最密的球堆积，因此戈莱码也位于该构造的基础位置。<sup>[8](https://vtechworks.lib.vt.edu/items/153f3508-b113-4dce-9997-13cd582c92ad)</sup>

## 构造

若干初等构造给出同一个码。<sup>[2](https://www.sfu.ca/~mdevos/notes/comb_struct/golay.pdf)</sup>

- **循环形式。** 在 \( \mathbb{F}_2 \) 上分解 \( x^{23} - 1 \) 得到不可约因子，任何次数大于1的因子都可作为循环码的生成多项式；标准选择是 \( g(x) = 1 + x^2 + x^4 + x^5 + x^6 + x^{10} + x^{11} \)。<sup>[3](https://bnaskrecki.faculty.wmi.amu.edu.pl/crypto/book/part15_code_based_frontiers/ch43_code_based_crypto.html)</sup><sup> • </sup><sup>[9](https://personalpages.manchester.ac.uk/staff/yuri.bazlov/code/notes/lecnotes.pdf)</sup> 循环结构使编码和解码对硬件友好。<sup>[3](https://bnaskrecki.faculty.wmi.amu.edu.pl/crypto/book/part15_code_based_frontiers/ch43_code_based_crypto.html)</sup>
- **来自二十面体的生成矩阵。** \( G_{24} \) 的一个生成矩阵是 \( [I \; A] \)，其中 \( I \) 是 \( 12 \times 12 \) 单位矩阵，\( A \) 是二十面体邻接矩阵的补矩阵。<sup>[2](https://www.sfu.ca/~mdevos/notes/comb_struct/golay.pdf)</sup>
- **贪心形式。** 按字典序列出24位字，并反复追加与所有已选字距离至少为8的最小字，便构造出 \( G_{24} \) 的一个生成集。<sup>[2](https://www.sfu.ca/~mdevos/notes/comb_struct/golay.pdf)</sup>
- **砖块构造。** R. T. 柯蒂斯（R. T. Curtis）的构造取三个由法诺平面（Fano plane）建立的8维空间的副本，并定义一个最小重量被强制为8的12维子空间；该构造同时证明施泰纳系统 \( S(5,8,24) \) 存在。<sup>[5](https://www.lms.ac.uk/sites/default/files/4.%20Curtis%20-%20Error%20Correction%20and%20the%20Binary-Golay%20Code.pdf)</sup>

## 实际纠错

由于最小距离为7，该完美码可纠正任意三个错误，并检测四个错误。对于扩展码，一个含有四个错误的接收字会被识别为非码字，尽管它与六个码字的距离为4，因此在这种情况下无法唯一推断出原始码字。<sup>[5](https://www.lms.ac.uk/sites/default/files/4.%20Curtis%20-%20Error%20Correction%20and%20the%20Binary-Golay%20Code.pdf)</sup> 译码可以通过扩展码进行：由于 \( G_{24} \) 的每个码字都有偶重量，长度为23的字可通过追加一个奇偶校验位并应用 \( G_{24} \) 的译码算法来译码。<sup>[10](https://staff.fnwi.uva.nl/r.r.j.bocklandt/notes/CT.pdf)</sup>

一项比较结果修正了通常对扩展码的偏好：在最大似然硬判决译码下，\([23,12,7]\) 码比 \([24,12,8]\) 扩展码的功率效率略高，尽管额外的奇偶校验符号有时能纠正重量为4的错误图样。<sup>[11](https://arxiv.org/abs/1602.05620)</sup>

## 旅行者号及其他用途

美国国家航空航天局为旅行者计划（Voyager program）选择了二元戈莱码。旅行者2号于1977年8月20日发射，旅行者1号于1977年9月5日发射；这两艘航天器使用该码，在干扰使稳健纠错成为必需的距离上，把木星（Jupiter）和土星（Saturn）的图像传回地球。<sup>[5](https://www.lms.ac.uk/sites/default/files/4.%20Curtis%20-%20Error%20Correction%20and%20the%20Binary-Golay%20Code.pdf)</sup> 美国国家航空航天局技术文献将戈莱码列为旅行者号使用的分组码之一，与为后续飞掠阶段考虑使用的里德-所罗门码（Reed-Solomon code）并列。<sup>[6](https://ntrs.nasa.gov/api/citations/19830008325/downloads/19830008325.pdf)</sup> 该码分组长度小且纠错能力精确，使其适用于航天器有限的计算资源；软件中也使用过紧凑到仅需一张编码表和一张8K译码表的实现。<sup>[12](https://sources.debian.org/src/outguess/1%3A0.2-5/golay.c)</sup>

## 在编码理论中的地位

戈莱族包含四个码：二元戈莱码和三元戈莱码，二者都是完美码；以及它们的扩展版本，二者都是自对偶码。<sup>[4](https://passagemath.org/docs/latest/html/en/reference/coding/sage/coding/golay_code.html)</sup> 二元码和三元码是仅有的 \( t \geq 2 \) 的完美 \( t \) 纠错码，而二元 \([23,12,7]\) 码是唯一的非平凡多重纠错完美二元码。<sup>[13](https://www.cambridge.org/core/books/abs/design-theory/witt-designs-and-mathieu-groups/8EAB506738374381189264D23764C8F1)</sup><sup> • </sup><sup>[3](https://bnaskrecki.faculty.wmi.amu.edu.pl/crypto/book/part15_code_based_frontiers/ch43_code_based_crypto.html)</sup> 除工程应用外，该码还与群论、组合学、利奇格乃至粒子物理有深刻联系；它属于已被证明为普适最优的一类码，在所有具有相同大小和长度的码中，使一大类势能最小化。<sup>[1](https://mathworld.wolfram.com/GolayCode.html)</sup><sup> • </sup><sup>[14](https://arxiv.org/abs/1212.1913)</sup>

## References

1. [Golay Code, Wolfram MathWorld](https://mathworld.wolfram.com/GolayCode.html)
2. [The Golay Code, Coding Theory notes, Simon Fraser University](https://www.sfu.ca/~mdevos/notes/comb_struct/golay.pdf)
3. [Chapter 43: Code-Based Cryptography: McEliece and Goppa Codes, Elements of Cryptanalysis](https://bnaskrecki.faculty.wmi.amu.edu.pl/crypto/book/part15_code_based_frontiers/ch43_code_based_crypto.html)
4. [Golay code, Passagemath Coding Theory documentation](https://passagemath.org/docs/latest/html/en/reference/coding/sage/coding/golay_code.html)
5. [R. T. Curtis, Error-correction and the binary Golay code, LMS Impact150 Stories 1 (2016) 51–58](https://www.lms.ac.uk/sites/default/files/4.%20Curtis%20-%20Error%20Correction%20and%20the%20Binary-Golay%20Code.pdf)
6. [NASA Technical Reports Server, Deep space communications document 19830008325](https://ntrs.nasa.gov/api/citations/19830008325/downloads/19830008325.pdf)
7. [Some design theoretic results on the Conway group ·0, CiteSeerX](https://citeseerx.ist.psu.edu/document?doi=37d22569e8fbee781f07c5a1733283fd92186c4c&repid=rep1&type=pdf)
8. [An Introduction to S(5,8,24), Virginia Tech VTechWorks](https://vtechworks.lib.vt.edu/items/153f3508-b113-4dce-9997-13cd582c92ad)
9. [Yuri Bazlov, Golay codes: Classification of perfect codes, lecture notes, University of Manchester](https://personalpages.manchester.ac.uk/staff/yuri.bazlov/code/notes/lecnotes.pdf)
10. [Perfect codes, University of Amsterdam course notes](https://staff.fnwi.uva.nl/r.r.j.bocklandt/notes/CT.pdf)
11. [The Golay Code Outperforms the Extended Golay Code Under Hard-Decision Decoding, arXiv:1602.05620](https://arxiv.org/abs/1602.05620)
12. [golay.c, Debian source package outguess](https://sources.debian.org/src/outguess/1%3A0.2-5/golay.c)
13. [Witt designs and Mathieu groups (IV), Design Theory, Cambridge University Press](https://www.cambridge.org/core/books/abs/design-theory/witt-designs-and-mathieu-groups/8EAB506738374381189264D23764C8F1)
14. [Energy-minimizing error-correcting codes, arXiv:1212.1913](https://arxiv.org/abs/1212.1913)

---
*Initially written Oct 15, 2026 · Edited: Oct 25, 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/binary-golay-code

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