# 第30号规则

**第30号规则**是斯蒂芬·沃尔夫拉姆（Stephen Wolfram）于1983年提出的一种基本细胞自动机规则：一种一维自动机，其中每个二元细胞根据自身状态及其两个紧邻细胞的状态进行更新，从单个黑色初始细胞产生出混沌的三角形图案。该规则以沃尔夫拉姆代码编号30命名，其二进制形式00011110编码了该规则的八种输出结果。<sup>[1](https://mathworld.wolfram.com/Rule30.html)</sup>

| 关键事实 | 详情 |
|---|---|
| 定义 | 基本细胞自动机（2种状态，半径1）；规则编号30 = 二进制00011110<sup>[1](https://mathworld.wolfram.com/Rule30.html)</sup> |
| 更新公式 | \( a'_{i} = a_{i-1} \oplus (a_{i} \vee a_{i+1}) \)，等价于 \( (a_{i-1} + a_{i} + a_{i+1} + a_{i} a_{i+1}) \bmod 2 \)<sup>[2](https://www.sciencedirect.com/science/article/pii/019688588690028X)</sup> |
| 行为 | 归类为混沌型（沃尔夫拉姆第3类）；从单个黑色细胞出发的中心列起始为1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1, ...（OEIS A051023）<sup>[1](https://mathworld.wolfram.com/Rule30.html)</sup><sup> • </sup><sup>[3](https://plato.stanford.edu/entries/cellular-automata/)</sup> |
| 实际用途 | 曾作为沃尔夫拉姆语言中大整数的随机数生成器<sup>[1](https://mathworld.wolfram.com/Rule30.html)</sup> |
| 已证明的结果 | 埃丽卡·詹（Erica Jen，1990）证明了从单个黑色细胞出发，任意两个相邻细胞的颜色序列都不是周期的<sup>[1](https://mathworld.wolfram.com/Rule30.html)</sup> |
| 未解决问题 | 三个沃尔夫拉姆第30号规则奖问题，每项奖金10,000美元，于2019年公布<sup>[4](https://rule30prize.org/)</sup> |
| 密码分析 | 迈尔（Meier）和施塔费尔巴赫（Staffelbach）从有限第30号规则生成器的输出中恢复了其种子，因此它不适合用于密码密钥生成<sup>[5](https://cellular.solves.ca/rule-30-prng)</sup> |

## 定义与规则表

基本细胞自动机是一排细胞，每个细胞持有0或1，在每个离散时间步中并行更新。一个细胞的新值仅取决于该细胞及其左右邻居的前一时刻值，因此共有 \( 2^{3} = 8 \) 种邻域构型，以及 \( 2^{8} = 256 \) 种可能的规则。在沃尔夫拉姆代码中，八种输出结果作为一个二进制数来命名规则；对于第30号规则，该数为00011110<sub>2</sub>。<sup>[1](https://mathworld.wolfram.com/Rule30.html)</sup><sup> • </sup><sup>[3](https://plato.stanford.edu/entries/cellular-automata/)</sup>

该规则可以简洁地写出。沃尔夫拉姆1986年的分析给出更新式 \( a'_{i} = a_{i-1} \oplus (a_{i} \vee a_{i+1}) \)，或等价地 \( a'_{i} = (a_{i-1} + a_{i} + a_{i+1} + a_{i} a_{i+1}) \bmod 2 \)。<sup>[2](https://www.sciencedirect.com/science/article/pii/019688588690028X)</sup>用文字表述：如果一个细胞及其右邻居均为白色，则该细胞取其左邻居的颜色；否则取其左邻居颜色的相反色。<sup>[6](https://wpmedia.wolfram.com/sites/13/2018/02/16-3-4.pdf)</sup>沃尔夫拉姆指出，该规则的全部复杂性来自唯一的非线性项 \( a_{i} a_{i+1} \)；去掉该项后，规则退化为线性的第150号规则，后者拥有完整的代数理论。<sup>[7](https://writings.stephenwolfram.com/2019/10/announcing-the-rule-30-prizes/)</sup>

## 发现与历史

沃尔夫拉姆在1983年发表于《现代物理评论》的论文《细胞自动机的统计力学》中引入了基本细胞自动机，将256种规则作为自组织的简单模型进行分析。<sup>[8](https://journals.aps.org/rmp/abstract/10.1103/RevModPhys.55.601)</sup>他特别描述了第30号规则的发现过程：1982年，他假设从单个黑色细胞出发的简单规则必定产生规则的、自相似的图案，随后对所有256种规则进行了系统性实验，而第30号规则恰恰打破了这一假设。<sup>[9](https://www.stephenwolfram.com/publications/past-future-scientific-computing/)</sup>

该规则表面上的随机性在沃尔夫拉姆1986年的论文《通过细胞自动机生成随机序列》中得到了深入分析，该文提出了一种基于该规则的高效随机序列生成器。<sup>[2](https://www.sciencedirect.com/science/article/pii/019688588690028X)</sup>在沃尔夫拉姆对基本规则的四类分类法中，第30号规则属于第3类，即导致看似混沌的、非周期行为的规则。<sup>[3](https://plato.stanford.edu/entries/cellular-automata/)</sup>

## 混沌行为与结构

从白色背景上的单个黑色细胞出发，第30号规则产生一个大致均匀无序的三角形图案，没有全局规律性。连续的世代作为二进制数读出，依次为1, 111, 11001, 1101111, 110010001, ...（OEIS A070950）。<sup>[1](https://mathworld.wolfram.com/Rule30.html)</sup>中心列是研究最多的特征：它起始为1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1, ...，并通过了标准的随机性检验。<sup>[1](https://mathworld.wolfram.com/Rule30.html)</sup><sup> • </sup><sup>[10](https://www.nature.com/articles/s41598-026-66952-w)</sup>

某些结构是可以证明存在的。当时从事细胞自动机理论研究的数学家埃丽卡·詹于1990年证明，在单黑色细胞初始状态下，任意两个相邻细胞所达到的颜色序列都不是周期的。<sup>[1](https://mathworld.wolfram.com/Rule30.html)</sup><sup> • </sup><sup>[11](https://www.sciencedirect.com/science/article/pii/016727899090169P)</sup>罗格斯大学的埃里克·S·罗兰（Eric S. Rowland）证明了图案的右对角线是周期的，周期长度为 \( 2^{A} \)，因此在第 \( 2^{n} \) 行，初始条件的某个区域在右侧重新出现，自动机在局部“重新开始”；这产生了局部嵌套结构，尽管远比第90号规则的全局嵌套受到更多限制。<sup>[6](https://wpmedia.wolfram.com/sites/13/2018/02/16-3-4.pdf)</sup>第30号规则分别是第86、135和149号规则的镜像、补集和镜像补集。<sup>[1](https://mathworld.wolfram.com/Rule30.html)</sup>

该图案有一个生物学对应物：基本相同的三角形天然生长在织锦芋螺（*Conus textile*）的壳上。<sup>[12](https://www.memorisepi.com/rule-30)</sup>

## 随机数生成与密码学

沃尔夫拉姆提出将第30号规则用作伪随机数生成器：用密钥作为采用周期边界条件的一维自动机的种子，迭代运行，取中心细胞的轨迹作为密钥流，在类似弗纳姆（Vernam）流密码中与明文进行异或运算。<sup>[13](https://doi.org/10.1016/j.dam.2025.10.014)</sup>在沃尔夫拉姆语言中，该规则曾作为大整数的随机数生成器，目前仍可使用“Rule30CA”方法；旧版整数生成器直接使用了它。<sup>[1](https://mathworld.wolfram.com/Rule30.html)</sup><sup> • </sup><sup>[14](https://reference.wolfram.com/language/tutorial/RandomNumberGeneration.html)</sup>

该生成器的统计质量良好，但其密码学安全性未能成立。瑞士联邦理工学院的密码分析学家威利·迈尔（Willi Meier）和奥特马尔·施塔费尔巴赫（Othmar Staffelbach）在欧洲密码学会议上发表的研究表明，有限带第30号规则生成器的种子可以从其输出中以远少于穷举搜索所需的材料量被恢复，这是一种已知明文式的相关攻击。<sup>[5](https://cellular.solves.ca/rule-30-prng)</sup><sup> • </sup><sup>[15](https://dblp.org/pid/47/6600)</sup>后来的分析还指出，此类基于细胞自动机的生成器存在扩散性差的问题，因为小的输入差异传播速度不超过局部规则的直径。<sup>[13](https://doi.org/10.1016/j.dam.2025.10.014)</sup>第30号规则仍被用作模拟中的伪随机源，也仍用于文献中研究的加密方案，但它不适合用于密码密钥生成。<sup>[5](https://cellular.solves.ca/rule-30-prng)</sup><sup> • </sup><sup>[16](https://www.mdpi.com/2073-8994/14/3/443)</sup>

## 第30号规则奖问题

2019年，沃尔夫拉姆基金会公布了三个悬奖问题，涉及从单个非零细胞生成的无限中心细胞值序列，每个问题的首个正确证明奖金为10,000美元，总计30,000美元。<sup>[4](https://rule30prize.org/)</sup><sup> • </sup><sup>[7](https://writings.stephenwolfram.com/2019/10/announcing-the-rule-30-prizes/)</sup>这三个问题是：

1. 中心列是否始终是非周期的？
2. 中心列中每种颜色的细胞是否平均出现频率相同？
3. 计算中心列的第 \( n \) 个细胞是否需要至少 \( O(n) \) 的计算量？

沃尔夫拉姆观察到，问题3的肯定答案将蕴含问题1的肯定答案，因为中心列的亚线性算法将揭示序列中的结构。<sup>[7](https://writings.stephenwolfram.com/2019/10/announcing-the-rule-30-prizes/)</sup>这些问题仍未解决；中心列中黑色和白色细胞的经验计数接近1:1的比例，在 \( t = 10^{8} \) 时黑色细胞与总细胞之比约为1.0004，黑色细胞略占优势。<sup>[7](https://writings.stephenwolfram.com/2019/10/announcing-the-rule-30-prizes/)</sup>

## References

1. [Weisstein, Eric W. "Rule 30." Wolfram MathWorld](https://mathworld.wolfram.com/Rule30.html)
2. [Wolfram, S. "Random Sequence Generation by Cellular Automata." Advances in Applied Mathematics 7 (1986): 123–169](https://www.sciencedirect.com/science/article/pii/019688588690028X)
3. ["Cellular Automata." Stanford Encyclopedia of Philosophy](https://plato.stanford.edu/entries/cellular-automata/)
4. [The Wolfram Rule 30 Prizes, Wolfram Foundation](https://rule30prize.org/)
5. ["Rule 30 as a random number generator," Elementary CA Zoo](https://cellular.solves.ca/rule-30-prng)
6. [Rowland, Eric S. "Local Nested Structure in Rule 30." Complex Systems 16 (2006): 239–258](https://wpmedia.wolfram.com/sites/13/2018/02/16-3-4.pdf)
7. [Wolfram, Stephen. "Announcing the Rule 30 Prizes." Stephen Wolfram Writings, October 2019](https://writings.stephenwolfram.com/2019/10/announcing-the-rule-30-prizes/)
8. [Wolfram, S. "Statistical Mechanics of Cellular Automata." Reviews of Modern Physics 55 (1983): 601–644](https://journals.aps.org/rmp/abstract/10.1103/RevModPhys.55.601)
9. [Wolfram, Stephen. "The Past and Future of Scientific Computing"](https://www.stephenwolfram.com/publications/past-future-scientific-computing/)
10. ["Secure image exchange over cloud networks with neural key exchange protocol." Scientific Reports (2026)](https://www.nature.com/articles/s41598-026-66952-w)
11. [Jen, Erica. "Aperiodicity in One-Dimensional Cellular Automata." Physica D 45 (1990): 3–18](https://www.sciencedirect.com/science/article/pii/016727899090169P)
12. ["Rule 30," PlayMemorize](https://www.memorisepi.com/rule-30)
13. ["Combinatorial designs and cellular automata: A survey." Discrete Applied Mathematics (2025)](https://doi.org/10.1016/j.dam.2025.10.014)
14. ["Random Number Generation," Wolfram Documentation](https://reference.wolfram.com/language/tutorial/RandomNumberGeneration.html)
15. [dblp: Willi Meier, publication record](https://dblp.org/pid/47/6600)
16. ["RGB Image Encryption through Cellular Automata, S-Box and the Lorenz System." Symmetry 14 (2022): 443](https://www.mdpi.com/2073-8994/14/3/443)

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

Topic: 物质世界与数学 › 数学与统计学 › 逻辑与离散数学 › General discrete mathematics and discrete structures › Formal languages and automata theory › Cellular automata theory

Copyright 2026 Edgepedia

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

Source: https://www.edgepedia.org/zh/rule-30

English original: https://www.edgepedia.org/rule-30
