# 一元数系

一元数系是一种书写数字的方法，其中每个自然数都由单个符号重复相应次数来表示；若该符号为 /，则数字七写作 / / / / / / / 。<sup>[1](https://mathresearch.utsa.edu/wiki/index.php?title=Number_Systems,_Base_10,_5_and_2)</sup>它是最简单的数系，而至今仍普遍用于计数与记分的计数刻痕，就是它在日常生活中的形式。<sup>[1](https://mathresearch.utsa.edu/wiki/index.php?title=Number_Systems,_Base_10,_5_and_2)</sup><sup> • </sup><sup>[2](https://link.springer.com/chapter/10.1007/978-3-319-63555-2_5)</sup>

| 关键事实 | 详情 |
|---|---|
| 表示方式 | 每个自然数 n 写作某一符号的 n 个副本；七即为 / / / / / / /<sup>[1](https://mathresearch.utsa.edu/wiki/index.php?title=Number_Systems,_Base_10,_5_and_2)</sup> |
| 长度 | 数值 w 在一元数系中需要 w 个符号，而在 b 进制位置数系中只需 \( \log_{b} w + 1 \) 位数字<sup>[1](https://mathresearch.utsa.edu/wiki/index.php?title=Number_Systems,_Base_10,_5_and_2)</sup> |
| 实用范围 | 仅适用于较小的数，但在理论计算机科学中扮演重要角色<sup>[1](https://mathresearch.utsa.edu/wiki/index.php?title=Number_Systems,_Base_10,_5_and_2)</sup> |
| 编码形式 | 作为二进制码，n 常写作 n 个 1 后跟一个 0（或 n 个 0 后跟一个 1）；在 FLAC 中，5 编码为 0b000001<sup>[3](https://www.rfc-editor.org/rfc/rfc9639.html?format=txt)</sup> |
| 压缩中的作用 | 埃利亚斯伽马编码用一元码表示二进制数的长度；FLAC 中的赖斯编码以一元形式存储商<sup>[1](https://mathresearch.utsa.edu/wiki/index.php?title=Number_Systems,_Base_10,_5_and_2)</sup><sup> • </sup><sup>[3](https://www.rfc-editor.org/rfc/rfc9639.html?format=txt)</sup> |
| 复杂性中的作用 | 当输入整数以一元形式给出时，许多 NP 完全或 NP 困难问题变得容易求解<sup>[4](https://pure.flib.u-fukui.ac.jp/en/publications/when-input-integers-are-given-in-the-unary-numeral-representation/)</sup> |
| 生物学 | 一元编码出现在负责鸟鸣产生的神经回路中<sup>[5](https://arxiv.org/abs/1411.7406)</sup> |

## 表示法与基本性质

一元数码不携带位置信息，也不使用零。数码的值就是其符号的计数，因此写下一个数与清点物体是同一回事。这使一元成为计数的自然记法：每计一件物品就加一道刻痕，无需符号表或位值规则。<sup>[1](https://mathresearch.utsa.edu/wiki/index.php?title=Number_Systems,_Base_10,_5_and_2)</sup><sup> • </sup><sup>[2](https://link.springer.com/chapter/10.1007/978-3-319-63555-2_5)</sup>

这种简单性的代价是长度。一个在 b 进制位置数系中需要 \( \log_{b} w + 1 \) 位数字的量 w，在一元数系中需要 w 道刻痕，因此表示长度与数值本身成正比，而非与其对数成正比。<sup>[1](https://mathresearch.utsa.edu/wiki/index.php?title=Number_Systems,_Base_10,_5_and_2)</sup>因此一元数系只对较小的数实用。<sup>[1](https://mathresearch.utsa.edu/wiki/index.php?title=Number_Systems,_Base_10,_5_and_2)</sup>

一元数系可视为位置记数法的一个极限情形。在双射记数法中——一种改进的 k 进制位置系统，数字为 1 到 k，零由空串表示——双射一进制与一元数系相同。<sup>[1](https://mathresearch.utsa.edu/wiki/index.php?title=Number_Systems,_Base_10,_5_and_2)</sup>一元记法也可通过为较大数值引入额外符号来缩写：若 / 代表一，− 代表十，+ 代表一百，则 304 可写作 +++ / / / / 。这称为符号-数值记数法，古埃及数字系统所用、以及变体形式的罗马数字所用的，正是这种类型。<sup>[1](https://mathresearch.utsa.edu/wiki/index.php?title=Number_Systems,_Base_10,_5_and_2)</sup>

## 计数刻痕与历史

**计数刻痕**是迄今所知最古老的一元记数形式。带有刻痕的骨、象牙、石、陶土和木片记录数值信息已有数万年之久：在南非莱邦博山脉发现的一块狒狒腿骨，碳定年超过四万年，上面有 29 道清晰的刻痕；而在今乌干达大湖地区发现的伊尚戈骨器，刻有距今两万多年前的三列标记。<sup>[6](https://www.computerhistory.org/storageengine/roman-philosopher-pliny-describes-tally-sticks/)</sup>数学史家将刻痕系统列为数系发展四个概念阶段中的第一个，其后依次为加法、乘法-加法以及十进制位置数系。<sup>[2](https://link.springer.com/chapter/10.1007/978-3-319-63555-2_5)</sup>

为便于辨认，计数刻痕通常每五个聚为一组，第五笔横划在前四笔之上。Unicode 对两种传统均有编码：表意计数刻痕区块包含 U+1D372 表意计数刻痕一至 U+1D376 表意计数刻痕五，其后是西式计数刻痕 U+1D377 计数刻痕一和 U+1D378 计数刻痕五，又称栅栏计数刻痕。<sup>[7](https://unicode.org/charts/PDF/U1D360.pdf)</sup>表意字符由肯·伦德与大浦大辅于 2015 年提出，2016 年获 Unicode 技术委员会采纳。<sup>[8](https://www.unicode.org/L2/L2016/16046-ideo-tally-marks.pdf)</sup>

## 数据压缩中的一元码

在编码理论中，一元码将非负整数 n 表示为 n 个相同比特后跟一个相反比特。一份讲义中的编码表给出例如 0 为 0，1 为 10，2 为 110，3 为 1110，以此类推，镜像形式 1、01、001、0001 可作为替代。<sup>[9](https://sciences.uodiyala.edu.iq/uploads/00%20Abdullah%20New%20website/Lectures/comp/%D8%AF.%D8%AC%D9%85%D8%A7%D9%86%D8%A9%20%D9%88%D9%84%D9%8A%D8%AF/%D8%B6%D8%BA%D8%B7%20%D8%A7%D9%84%D8%A8%D9%8A%D8%A7%D9%86%D8%A7%D8%AA/%D8%B6%D8%BA%D8%B7%20%D8%A7%D9%84%D8%A8%D9%8A%D8%A7%D9%86%D8%A7%D8%AA.pdf)</sup>FLAC 无损音频格式规定其一元编码为零比特后跟一个终止的一比特，因此数字 5 编码为 0b000001；这一选择可防止帧同步码出现在一元编码数字内部。<sup>[3](https://www.rfc-editor.org/rfc/rfc9639.html?format=txt)</sup>

一元编码是若干标准压缩方法的构件。埃利亚斯伽马编码广泛应用于数据压缩，它让一元记法指明对应二进制数的长度，从而表示任意大小的数。<sup>[1](https://mathresearch.utsa.edu/wiki/index.php?title=Number_Systems,_Base_10,_5_and_2)</sup>在蒂莫西·C·贝尔及其同事的压缩教材所描述的埃利亚斯伽马码中，整数 x 映射为在 x 的二进制值前加上 \( \lfloor \lg x \rfloor \) 个零；二进制值的前导 1 界定前缀，使编码可即时解码。<sup>[10](https://ics.uci.edu/~dhirschb/pubs/DC-Sec3.html)</sup>所罗门·W·哥伦布 1966 年的论文《游程编码》发表于《IEEE 信息论汇刊》12(3):399，描述了他如今著名的游程码，其中类似一元的前缀是一个组成部分。<sup>[11](https://urchin.earth.li/~twic/Golombs_Original_Paper/)</sup>在赖斯编码——FLAC 所用哥伦布编码的一个子集——中，每个残差值通过除以 \( 2^{k} \)（k 为赖斯参数）来拆分；商以一元形式存储，余数以二进制形式存储。<sup>[3](https://www.rfc-editor.org/rfc/rfc9639.html?format=txt)</sup>

一元编码已在数据压缩、神经网络训练以及解释鸟鸣产生机制方面得到应用。<sup>[5](https://arxiv.org/abs/1411.7406)</sup>在鸣禽中，不同音符的命令信号发自 HVC（高级发声中枢）的不同位置，HVC 是参与鸣唱学习与产生的大脑核团；这种一元编码作为空间编码起作用，因其固有的简单性与鲁棒性，是生物电路的一种高效策略。<sup>[1](https://mathresearch.utsa.edu/wiki/index.php?title=Number_Systems,_Base_10,_5_and_2)</sup>

## 在计算复杂性中的作用

一元表示改变了问题难度的衡量方式。复杂性理论通常以实例中整数的二进制形式长度来衡量输入规模，因此数字 n 约占 \( \log_{2} n \) 比特。在一元或“一元化”形式中，n 占 n 个符号，因此输入长度等于数值本身。<sup>[4](https://pure.flib.u-fukui.ac.jp/en/publications/when-input-integers-are-given-in-the-unary-numeral-representation/)</sup>

这一区别界定了弱困难与强困难之间的分野。若一个问题即使输入中的数值参数以一元表示给出仍为 NP 困难，则称其为强 NP 困难。<sup>[12](https://opencourse.inf.ed.ac.uk/sites/default/files/2024-02/lecture_26_-_np-completeness_-_a_closer_look.pdf)</sup>反之，若在实例的二进制化与一元化之间未观察到计算复杂性差异，则称这些问题为强 NP 完全。<sup>[4](https://pure.flib.u-fukui.ac.jp/en/publications/when-input-integers-are-given-in-the-unary-numeral-representation/)</sup>福井大学的山上智之在第 24 届意大利理论计算机科学会议（ICTCS 2023）上发表的一项 2023 年综述，列举了大量 NP 完全乃至 NP 困难问题，它们在输入整数以一元表示时变得容易求解，并讨论了由此产生的复杂性，用这份清单标出强 NP 完全与非强 NP 完全之间的结构差异。<sup>[4](https://pure.flib.u-fukui.ac.jp/en/publications/when-input-integers-are-given-in-the-unary-numeral-representation/)</sup>

## References

1. [Number Systems, Base 10, 5 and 2, Department of Mathematics, UTSA](https://mathresearch.utsa.edu/wiki/index.php?title=Number_Systems,_Base_10,_5_and_2)
2. [The What and Why of Whole Number Arithmetic, Springer](https://link.springer.com/chapter/10.1007/978-3-319-63555-2_5)
3. [RFC 9639: Free Lossless Audio Codec (FLAC)](https://www.rfc-editor.org/rfc/rfc9639.html?format=txt)
4. [Yamakami, T. (2023). When Input Integers are Given in the Unary Numeral Representation. CEUR Workshop Proceedings 3587, 268–282](https://pure.flib.u-fukui.ac.jp/en/publications/when-input-integers-are-given-in-the-unary-numeral-representation/)
5. [Error Correction Capacity of Unary Coding, arXiv](https://arxiv.org/abs/1411.7406)
6. [Roman philosopher Pliny describes tally sticks, Computer History Museum](https://www.computerhistory.org/storageengine/roman-philosopher-pliny-describes-tally-sticks/)
7. [The Unicode Standard, Version 17.0, Counting Rod Numerals block chart](https://unicode.org/charts/PDF/U1D360.pdf)
8. [L2/16-046: Proposal to encode five ideographic tally marks, Unicode Consortium](https://www.unicode.org/L2/L2016/16046-ideo-tally-marks.pdf)
9. [Data Compression Lecture 2, University of Diyala](https://sciences.uodiyala.edu.iq/uploads/00%20Abdullah%20New%20website/Lectures/comp/%D8%AF.%D8%AC%D9%85%D8%A7%D9%86%D8%A9%20%D9%88%D9%84%D9%8A%D8%AF/%D8%B6%D8%BA%D8%B7%20%D8%A7%D9%84%D8%A8%D9%8A%D8%A7%D9%86%D8%A7%D8%AA/%D8%B6%D8%BA%D8%B7%20%D8%A7%D9%84%D8%A8%D9%8A%D8%A7%D9%86%D8%A7%D8%AA.pdf)
10. [Data Compression, Section 3, Timothy C. Bell et al., UC Irvine](https://ics.uci.edu/~dhirschb/pubs/DC-Sec3.html)
11. [Golomb's Original Paper: Run-length encodings (1966)](https://urchin.earth.li/~twic/Golombs_Original_Paper/)
12. [Lecture 26: NP-Completeness, A Closer Look, University of Edinburgh](https://opencourse.inf.ed.ac.uk/sites/default/files/2024-02/lecture_26_-_np-completeness_-_a_closer_look.pdf)

---
*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: 物质世界与数学 › 数学与统计学 › 数与代数 › Arithmetic and number systems › Number systems › Integers and rational numbers

Copyright 2026 Edgepedia

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

Source: https://www.edgepedia.org/zh/unary-numeral-system

English original: https://www.edgepedia.org/unary-numeral-system
