# Bijective numeration

**Bijective numeration**is any numeral system in which every non-negative integer can be represented in exactly one way using a finite string of digits. The name derives from this bijection between the set of non-negative integers and the set of finite strings using a finite set of symbols.

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 decimal is not bijective. However, unary, with only one digit,

*is*bijective.

A

**bijective base-**is a bijective positional notation. It uses a string of digits from the set to encode each positive integer; a digit's position in the string defines its value as a multiple of a power of

*k*numeration*k*. 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.

## Definition

The base-*k*bijective numeration system uses the digit-set 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
- The digit-string representing the integer
*m*> 0 is

### Extension to integers

For base, 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 summationmeaning 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.

## Properties of bijective base-''k'' numerals

For a given base*k*≥ 1,

- there are exactly
*k*^{n}bijective base-*k*numerals of length*n*≥ 0. - if
*k*≥ 2, the number of digits in the bijective base-*k*numeral representing a nonnegative integer*n*is Logarithm|, in contrast to Floor and ceiling functions#Number of digits| for ordinary base-*k*numerals; if*k*= 1, then the number of digits is just*n*; - if
*k*≥ 2, the bijective base-*k*and ordinary base-*k*numerals for a nonnegative integer*n**are identical*if and only if the ordinary numeral does not contain the digit*0*. - a list of bijective base-
*k*numerals, in natural order of the integers represented, is automatically in shortlex order. Thus, using λ to denote the empty string, the base 1, 2, 3, 8, 10, 12, and 16 numerals are as follows :

## Examples

## The bijective base-10 system

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 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, ten tens, thirteen hundreds, and one thousand, to give the result 13A2 rather than the conventional 1402.

## The bijective base-26 system

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.With this choice of notation, the number sequence 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 = 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, labeled from A to XFD. A variant of this system is used to name variable stars. It can be applied to any problem where a systematic naming using letters is desired, while using the shortest possible strings.

## Historical notes

The fact that every non-negative integer has a unique representation in bijective base-*k*is a "folk theorem" that has been rediscovered many times. Early instances are for the case

*k*= 10, and and 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′′. mentions the special case of

*k*= 10, and discusses the cases

*k*≥ 2. 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.