| Part ofa series on | |||
| Numeral systems | |||
|---|---|---|---|
| |||
| |||
| List of numeral systems | |||
Bijective numeration is anynumeral system in which every non-negativeinteger can be represented in exactly one way using a finitestring of digits. The name refers to thebijection (i.e. one-to-one correspondence) that exists in this case between the set of non-negative integers and the set of finite strings using a finite set of symbols (the "digits").
Most ordinary numeral systems, such as the commondecimal system, are not bijective because more than one string of digits can represent the same positive integer. In particular, addingleading zeroes does not change the value represented, so "1", "01" and "001" all represent the numberone. Even though only the first is usual, the fact that the others are possible means that the decimal system is not bijective. However, theunary numeral system, with only one digit,is bijective.
Abijectivebase-k numeration is a bijectivepositional notation. It uses a string of digits from the set {1, 2, ...,k} (wherek ≥ 1) to encode each positive integer; a digit's position in the string defines its value as a multiple of a power ofk.Smullyan (1961) calls this notationk-adic, but it should not be confused with thep-adic numbers: bijective numerals are a system for representing ordinaryintegers by finite strings of nonzero digits, whereas thep-adic numbers are a system of mathematical values that contain the integers as a subset and may need infinite sequences of digits in any numerical representation.
Thebase-k bijective numeration system uses the digit-set {1, 2, ...,k} (k ≥ 1) to uniquely represent every non-negative integer, as follows:
In contrast, standardpositional notation can be defined with a similar recursive algorithm where
For base, the bijective base- numeration system could be extended to negative integersin 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 theEuler 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 insigned-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.
For a given base,
For a given base,
| bijective base 1: | λ | 1 | 11 | 111 | 1111 | 11111 | 111111 | 1111111 | 11111111 | 111111111 | 1111111111 | 11111111111 | 111111111111 | 1111111111111 | 11111111111111 | 111111111111111 | 1111111111111111 | ... | (unary numeral system) | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| bijective base 2: | λ | 1 | 2 | 11 | 12 | 21 | 22 | 111 | 112 | 121 | 122 | 211 | 212 | 221 | 222 | 1111 | 1112 | ... | |||||||||||
| binary: | 0 | 1 | 10 | 11 | 100 | 101 | 110 | 111 | 1000 | 1001 | 1010 | 1011 | 1100 | 1101 | 1110 | 1111 | 10000 | ... | |||||||||||
| bijective base 3: | λ | 1 | 2 | 3 | 11 | 12 | 13 | 21 | 22 | 23 | 31 | 32 | 33 | 111 | 112 | 113 | 121 | ... | |||||||||||
| ternary: | 0 | 1 | 2 | 10 | 11 | 12 | 20 | 21 | 22 | 100 | 101 | 102 | 110 | 111 | 112 | 120 | 121 | ... | |||||||||||
| bijective base 8: | λ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | ... | |||||||||||
| octal: | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 20 | ... | |||||||||||
| bijective base 10: | λ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | A | 11 | 12 | 13 | 14 | 15 | 16 | ... | |||||||||||
| decimal: | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | ... | |||||||||||
| bijective base 12: | λ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | A | B | C | 11 | 12 | 13 | 14 | ... | |||||||||||
| duodecimal: | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | A | B | 10 | 11 | 12 | 13 | 14 | ... | |||||||||||
| bijective base 16: | λ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | A | B | C | D | E | F | G | ... | |||||||||||
| hexadecimal: | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | A | B | C | D | E | F | 10 | ... | |||||||||||
The bijective base-10 system is a baseten positionalnumeral system that does not use a digit to representzero. It instead has a digit to represent ten, such asA.
As with conventionaldecimal, each digit position represents a power of ten, so for example 123 is "one hundred, plus two tens, plus three units." Allpositive integers that are represented solely with non-zero digits in conventional decimal (such as 123) have the same representation in the bijective base-10 system. 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 andmultiplication in this system 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.
In the bijective base-26 system one may use the Latin alphabet letters "A" to "Z" to represent the 26 digit valuesone totwenty-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 WI represents the value23 × 261 + 9 × 260 = 607 in base 10.
Manyspreadsheets includingMicrosoft 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]Malware variants are also named using this system: for example, the first widespread Microsoft Word macro virus, Concept, is formally named WM/Concept.A, its 26th variant WM/Concept.Z, the 27th variant WM/Concept.AA, et seq. A variant of this system is used to namevariable 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 areFoster (1947) for the casek = 10, andSmullyan (1961) andBöhm (1964) for allk ≥ 1. Smullyan uses this system to provide aGödel numbering of the strings of symbols in a logical system; Böhm uses these representations to perform computations in the programming languageP′′.Knuth (1969) mentions the special case ofk = 10, andSalomaa (1973) discusses the casesk ≥ 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.