雙射記數
![]() | 此條目需要精通或熟悉数学的编者参与及协助编辑。 (2023年1月5日) |
记数系统 | |
---|---|
印度-阿拉伯数字系统 | |
西方阿拉伯数字 阿拉伯文数字 高棉數字 孟加拉数字 |
印度數字 波羅米數字 泰语数字 |
漢字文化圈記數系統 | |
中文数字 閩南語數字 越南语数字 算筹 |
日語數字 朝鲜语數字 苏州码子 |
字母記數系統 | |
阿拉伯字母數字 亚美尼亚数字 西里爾數字 吉茲數字 |
希伯來數字 希腊数字 阿利耶波多數字 |
其它記數系統 | |
雅典數字 巴比倫數字 古埃及数字 伊特拉斯坎數字 |
玛雅数字 罗马数字 熙笃会数字 卡克托维克数字 |
依底数区分的进位制系统 | |
1 2 3 4 5 6 8 9 10 11 12 15 16 18 20 24 30 32 36 60 64 | |
雙射記數系統(Bijective numeration)是一種表示數字的位置數值系統,每個非負整數都可使用有限數字串表示。該名稱「雙射」指的是非負整數集和用有限符號集的有限字符串集間存在雙射(即一一對應)。
大多數數字系統,例如十進制,都不是雙射的;因為不止一串數字可以表示同一個正整數:添加前導零不會改變表示的值,例如「1」、「01」、「001」都表示數字「1」。而一進制因為只有一個數字「1」所以必然「是」雙射的。
雙射進制-k記數系統是一個雙射進位制。使用集合{1, 2, ..., k}(其中k≥1)編碼正整數;值的位置定義為「k」的冪倍數。Smullyan (1961)稱此為k-adic:用有限非零數字串表示普通整數的系統,而p-adic數是包含整數作為子集的一個數學值系統,並且可能需要無限數字序列表示。
定義[编辑]
雙射進位制使用集合{1, 2, ..., k}(其中k≥ 1)來唯一編碼每個非負整數:
- 零由空字符串表示。
- 由非空數字串表示的整數
- anan−1 ... a1a0 = an kn + an−1 kn−1 + ... + a1 k1 + a0 k0.
- 表示整數的數字串m>0是anan−1 ... a1a0
- 當
- 且
- 是不小於的最小整數x(上取整函数)
相反,標準進位制可用類似遞歸算法定義當
擴展到整數[编辑]
在進制, the bijective base- numeration system could be extended to negative integers in the same way as the standard base- numeral system by use of an infinite number of the digit , where , represented as a left-infinite sequence of digits . This is because the Euler summation
meaning that
and for every positive number with bijective numeration digit representation is represented by . For base , negative numbers are represented by with , while for base , negative numbers are represented by . This is similar to how in signed-digit representations, all integers with digit representations are represented as where . This representation is no longer bijective, as the entire set of left-infinite sequences of digits is used to represent the -adic integers, of which the integers are only a subset.
性質[编辑]
對於進制:
- 表示非負整數n的雙射k進位位數是[1],與相比,k進制如果是「1」,位數就是n。
- 最小可表示為長度的雙射k進制數字的非負整數是。
- 最大可表示為長度的雙射k進制數字的非負整數是,相當於或。
- 非負整數n的雙射k進制可和普通進制k相同,當且僅當普通進制不含數字「0」,或者等效地,雙射進制既不是空字符串也不包含數字k。
對於進制,
雙射一進制 | λ | 1 | 11 | 111 | 1111 | 11111 | 111111 | 1111111 | 11111111 | 111111111 | 1111111111 | 11111111111 | 111111111111 | 1111111111111 | 11111111111111 | 111111111111111 | 1111111111111111 | ... | 一進制 | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
雙射二進制 | λ | 1 | 2 | 11 | 12 | 21 | 22 | 111 | 112 | 121 | 122 | 211 | 212 | 221 | 222 | 1111 | 1112 | ... | |||||||||||
二進制 | 0 | 1 | 10 | 11 | 100 | 101 | 110 | 111 | 1000 | 1001 | 1010 | 1011 | 1100 | 1101 | 1110 | 1111 | 10000 | ... | |||||||||||
雙射三進制 | λ | 1 | 2 | 3 | 11 | 12 | 13 | 21 | 22 | 23 | 31 | 32 | 33 | 111 | 112 | 113 | 121 | ... | |||||||||||
三進制 | 0 | 1 | 2 | 10 | 11 | 12 | 20 | 21 | 22 | 100 | 101 | 102 | 110 | 111 | 112 | 120 | 121 | ... | |||||||||||
雙射八進制 | λ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | ... | |||||||||||
八進制 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 20 | ... | |||||||||||
雙射十進制 | λ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | A | 11 | 12 | 13 | 14 | 15 | 16 | ... | |||||||||||
十進制 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | ... | |||||||||||
雙射十二進制 | λ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | A | B | C | 11 | 12 | 13 | 14 | ... | |||||||||||
十二進制 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | A | B | 10 | 11 | 12 | 13 | 14 | ... | |||||||||||
雙射十六進制 | λ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | A | B | C | D | E | F | G | ... | |||||||||||
十六進制 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | A | B | C | D | E | F | 10 | ... |
例[编辑]
- 雙射五進制的34152 = 3×54 + 4×53 + 1×52 + 5×51 + 2×1 = 2427(十進制)
- 雙射十進制119A(A代表數值10) = 1×103 + 1×102 + 9×101 + 10×1 = 1200(十進制)
- 雙射11進制B = 11(十進制)
- 雙射35進制Z = 35(十進制)
雙射十進制[编辑]
The bijective base-10 system is a base ten positional numeral system that does not use a digit to represent zero. It instead has a digit to represent ten, such as A.
As with conventional decimal, each digit position represents a power of ten, so for example 123 is "one hundred, plus two tens, plus three units." All positive integers that are represented solely with non-zero digits in conventional decimal (such as 123) have the same representation in decimal without a zero. Those that use a zero must be rewritten, so for example 10 becomes A, conventional 20 becomes 1A, conventional 100 becomes 9A, conventional 101 becomes A1, conventional 302 becomes 2A2, conventional 1000 becomes 99A, conventional 1110 becomes AAA, conventional 2010 becomes 19AA, and so on.
Addition and multiplication in decimal without a zero are essentially the same as with conventional decimal, except that carries occur when a position exceeds ten, rather than when it exceeds nine. So to calculate 643 + 759, there are twelve units (write 2 at the right and carry 1 to the tens), ten tens (write A with no need to carry to the hundreds), thirteen hundreds (write 3 and carry 1 to the thousands), and one thousand (write 1), to give the result 13A2 rather than the conventional 1402.
雙射26進制[编辑]
雙射26進制可全用字母寫作(A, B, C...X, Y, Z, AA, AB, AC...ZX, ZY, ZZ, AAA, AAB, AAC...)。
In the bijective base-26 system one may use the Latin alphabet letters "A" to "Z" to represent the 26 digit values one to twenty-six. (A=1, B=2, C=3, ..., Z=26)
With this choice of notation, the number sequence (starting from 1) begins A, B, C, ..., X, Y, Z, AA, AB, AC, ..., AX, AY, AZ, BA, BB, BC, ...
Each digit position represents a power of twenty-six, so for example, the numeral ABC represents the value 1 × 262 + 2 × 261 + 3 × 260 = 731 in base 10.
Many spreadsheets including Microsoft Excel use this system to assign labels to the columns of a spreadsheet, starting A, B, C, ..., Z, AA, AB, ..., AZ, BA, ..., ZZ, AAA, etc. For instance, in Excel 2013, there can be up to 16384 columns (214 in binary code), labeled from A to XFD.[3] A variant of this system is used to name variable stars.[4] It can be applied to any problem where a systematic naming using letters is desired, while using the shortest possible strings.
歷史[编辑]
The fact that every non-negative integer has a unique representation in bijective base-k (k ≥ 1) is a "folk theorem" that has been rediscovered many times. Early instances are Foster (1947) for the case k = 10, and Smullyan (1961) and Böhm (1964) for all k ≥ 1. Smullyan uses this system to provide a Gödel numbering of the strings of symbols in a logical system; Böhm uses these representations to perform computations in the programming language P′′. Knuth (1969) mentions the special case of k = 10, and Salomaa (1973) discusses the cases k ≥ 2. Forslund (1995) appears to be another rediscovery, and hypothesizes that if ancient numeration systems used bijective base-k, they might not be recognized as such in archaeological documents, due to general unfamiliarity with this system.
注釋[编辑]
- ^ How many digits are in the bijective base-k numeral for n?. Stackexchange. [22 September 2018].
- ^ Forslund (1995).
- ^ Harvey, Greg, Excel 2013 For Dummies, John Wiley & Sons, 2013, ISBN 9781118550007.
- ^ Hellier, Coel, Appendix D: Variable star nomenclature, Cataclysmic Variable Stars - How and Why They Vary, Praxis Books in Astronomy and Space, Springer: 197, 2001, ISBN 9781852332112.
參考[编辑]
- Böhm, C., On a family of Turing machines and the related programming language, ICC Bulletin, July 1964, 3: 191.
- Forslund, Robert R., A logical alternative to the existing positional number system, Southwest Journal of Pure and Applied Mathematics, 1995, 1: 27–29, MR 1386376, S2CID 19010664.
- Foster, J. E., A number system without a zero symbol, Mathematics Magazine, 1947, 21 (1): 39–41, JSTOR 3029479, doi:10.2307/3029479.
- Knuth, D. E., The Art of Computer Programming, Vol. 2: Seminumerical Algorithms 1st, Addison-Wesley, Solution to Exercise 4.1-24, p. 195, 1969. (Discusses bijective base-10.)
- Salomaa, A., Formal Languages, Academic Press, Note 9.1, pp. 90–91, 1973. (Discusses bijective base-k for all k ≥ 2.)
- Smullyan, R., 9. Lexicographical ordering; n-adic representation of integers, Theory of Formal Systems, Annals of Mathematics Studies 47, Princeton University Press: 34–36, 1961.
|