|
Bijective numeration is any numeral system that establishes a bijection between the set of non-negative integers and the set of finite strings over a finite set of digits. A numeral is a symbol or group of symbols that represents a number. ...
In mathematics, a bijection, bijective function, or one-to-one correspondence is a function that is both injective (one-to-one) and surjective (onto), and therefore bijections are also called one-to-one and onto. ...
The integers consist of the positive natural numbers (1, 2, 3, …) the negative natural numbers (−1, −2, −3, ...) and the number zero. ...
Bijective base-k numeration uses the specific digit-set {1, 2, ..., k}(k ≥ 1), and is as follows: - The integer zero is represented by the empty string.
- The integer represented by the nonempty digit-string
-
- anan-1...a1a0
- is
- an*kn + an-1*kn-1 + ... + a1*k1 + a0*k0.
- The digit-string representing the integer m > 0 is
-
- anan-1...a1a0
- where
- a0 = m - q0*k, q0 = f(m/k);
- a1 = q0 - q1*k, q1 = f(q0/k);
- a2 = q1 - q2*k, q2 = f(q1/k);
- ...
- an = qn-1 - 0*k, qn = f(qn-1/k) = 0;
- and
- f(x) = ceil(x) - 1,
- ceil(x) being the least integer not less than x (the ceiling function).
Bijective base-k numeration is also called k-adic notation, not to be confused with the p-adic number system. Bijective base-1 is also called unary. In mathematics, the floor function is the function defined as follows: for a real number x, floor(x) is the largest integer less than or equal to x. ...
The p-adic number systems were first described by Kurt Hensel in 1897. ...
The unary numeral system is the simplest numeral system to represent natural numbers: in order to represent a number N, an arbitrarily chosen symbol is repeated N times. ...
Properties of bijective base-k numerals
For a given k ≥ 1, - there are exactly kn bijective base-k numerals of length n ≥ 0;
- a list of bijective base-k numerals, in natural order of the integers represented, is automatically in shortlex order (shortest first, lexicographical within each length). Thus, using ε to denote the empty string, the bijective base-1, base-2 and base-3 numerals are as follows (with the ordinary decimal representations listed for comparison):
| 1-adic: | ε | 1 | 11 | 111 | 1111 | 11111 | ... | (unary numeral system) | | 2-adic: | ε | 1 | 2 | 11 | 12 | 21 | 22 | 111 | 112 | 121 | 122 | 211 | 212 | 221 | 222 | 1111 | 1112 | ... | | 3-adic: | ε | 1 | 2 | 3 | 11 | 12 | 13 | 21 | 22 | 23 | 31 | 32 | 33 | 111 | 112 | 113 | 121 | ... | | decimal: | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | ... | The unary numeral system is the simplest numeral system to represent natural numbers: in order to represent a number N, an arbitrarily chosen symbol is repeated N times. ...
Examples 34152(five-adic) = 3*5^4 + 4*5^3 + 1*5^2 + 5*5^1 + 2*5^0 = 2427(decimal). 119A(ten-adic) = 1*10^3 + 1*10^2 + 9*10^1 + 10*10^0 = 1200(decimal). In the last example, the digit 'A' represents the integer ten. |