Lably
Skip to content

Bijective numeration

Numeral system in which every non-negative integer can be represented in exactly one way

  • 6 min read
  • 6 chapters

Related on Lably

Through Numeral system, Integer and Bijection

Most ordinary numeral systems, such as the common decimal system, are not bijective because more than one string of digits can represent the same positive integer. In particular, adding leading zeroes does not change the value represented, so "1", "01" and "001" all represent the number one. Even though only the first is usual, the fact that the others are possible means that the decimal system is not bijective. However, the unary numeral system, with only one digit, is bijective.

A bijective base-k numeration is a bijective positional notation. It uses a string of digits from the set {1, 2, ..., k} (where k ≥ 1) to encode each positive integer; a digit's position in the string defines its value as a multiple of a power of k. Smullyan (1961) calls this notation k-adic, but it should not be confused with the p-adic numbers: bijective numerals are a system for representing ordinary integers by finite strings of nonzero digits, whereas the p-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. Base-26 bijective numeration is commonly seen in the column labels of spreadsheets.

Definition

The base-k bijective numeration system uses the digit-set {1, 2, ..., k} (k ≥ 1) to uniquely represent every non-negative integer, 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−q0k,q0=f(mk)a1=q0−q1k,q1=f(q0k)a2=q1−q2k,q2=f(q1k)⋮⋮an=qn−1−0k,qn=f(qn−1k)=0
and
f(x)=⌈x⌉−1,
⌈x⌉ being the least integer not less than x (the ceiling function).

In contrast, standard positional notation can be defined with a similar recursive algorithm where

f(x)=⌊x⌋,

Extension to integers

For base k>1, the bijective base-k numeration system could be extended to negative integers in the same way as the standard base-b numeral system by use of an infinite number of the digit dk−1, where f(dk−1)=k−1, represented as a left-infinite sequence of digits …dk−1dk−1dk−1=dk−1¯. This is because the Euler summation

g(dk−1¯)=∑i=0∞f(dk−1)ki=−k−1k−1=−1

meaning that

g(dk−1¯dk)=f(dk)∑i=1∞f(dk−1)ki=1+∑i=0∞f(dk−1)ki=0

and for every positive number n with bijective numeration digit representation d is represented by dk−1¯dkd. For base k>2, negative numbers n<−1 are represented by dk−1¯did with i<k−1, while for base k=2, negative numbers n<−1 are represented by dk¯d. This is similar to how in signed-digit representations, all integers n with digit representations d are represented as d0¯d where f(d0)=0. This representation is no longer bijective, as the entire set of left-infinite sequences of digits is used to represent the k-adic integers, of which the integers are only a subset.

Sign in to keep reading

5 more chapters are free with a Lably account.

More in Basics