Mixed radix

Last updated

Mixed radix numeral systems are non-standard positional numeral systems in which the numerical base varies from position to position. Such numerical representation applies when a quantity is expressed using a sequence of units that are each a multiple of the next smaller one, but not by the same factor. Such units are common for instance in measuring time; a time of 32 weeks, 5 days, 7 hours, 45 minutes, 15 seconds, and 500 milliseconds might be expressed as a number of minutes in mixed-radix notation as:

Contents

... 32, 5, 07, 45; 15,  500 ...  ∞, 7, 24, 60; 60, 1000

or as

325707244560.15605001000

In the tabular format, the digits are written above their base, and a semicolon indicates the radix point. In numeral format, each digit has its associated base attached as a subscript, and the radix point is marked by a full stop or period. The base for each digit is the number of corresponding units that make up the next larger unit. As a consequence there is no base (written as ∞) for the first (most significant) digit, since here the "next larger unit" does not exist (and one could not add a larger unit of "month" or "year" to the sequence of units, as they are not integer multiples of "week").

Examples

The most familiar example of mixed-radix systems is in timekeeping and calendars. Western time radices include, both cardinally and ordinally, decimal years, decades, and centuries, septenary for days in a week, duodecimal months in a year, bases 28–31 for days within a month, as well as base 52 for weeks in a year. Time is further divided into hours counted in base 24 hours, sexagesimal minutes within an hour and seconds within a minute, with decimal fractions of the latter.

A standard form for dates is 2021-04-10 16:31:15, which would be a mixed radix number by this definition, with the consideration that the quantities of days vary both per month, and with leap years. One proposed calendar instead uses base 13 months, quaternary weeks, and septenary days.

A mixed radix numeral system is often best expressed with a table. A table describing what can be understood as the 604800 seconds of a week is as follows, with the week beginning on hour 0 of day 0 (midnight on Sunday):

Radix7246060
Denominationdayhourminutesecond
Place value (seconds)864003600601

In this numeral system, the mixed radix numeral 37172451605760 seconds would be interpreted as 17:51:57 on Wednesday, and 0702402602460 would be 00:02:24 on Sunday. Ad hoc notations for mixed radix numeral systems are commonplace.

The Maya calendar consists of several overlapping cycles of different radices. A short count tzolk'in overlaps base 20 named days with tridecimal numbered days. A haab' consists of vigesimal days, octodecimal months, and base-52 years forming a round. In addition, a long count of vigesimal days, octodecimal winal, then base 24 tun, k'atun, b'ak'tun, etc., tracks historical dates.

A second example of a mixed-radix numeral system in current use is in the design and use of currency, where a limited set of denominations are printed or minted with the objective of being able to represent any monetary quantity; the amount of money is then represented by the number of coins or banknotes of each denomination. When deciding which denominations to create (and hence which radices to mix), a compromise is aimed for between a minimal number of different denominations, and a minimal number of individual pieces of coinage required to represent typical quantities. So, for example, in the UK, banknotes are printed for £50, £20, £10 and £5, and coins are minted for £2, £1, 50p, 20p, 10p, 5p, 2p and 1p—these follow the 1-2-5 series of preferred values.

Prior to decimalisation, monetary amounts in the UK were described in terms of pounds, shillings, and pence, with 12 pence per shilling and 20 shillings per pound, so that "£1 7s 6d", for example, corresponded to the mixed-radix numeral 1720612.

United States customary units are generally mixed radix systems, with multipliers varying from one size unit to the next in the same manner that units of time do.

Mixed-radix representation is also relevant to mixed-radix versions of the Cooley–Tukey FFT algorithm, in which the indices of the input values are expanded in a mixed-radix representation, the indices of the output values are expanded in a corresponding mixed-radix representation with the order of the bases and digits reversed, and each subtransform can be regarded as a Fourier transform in one digit for all values of the remaining digits.

Manipulation

Mixed-radix numbers of the same base can be manipulated using a generalization of manual arithmetic algorithms. Conversion of values from one mixed base to another is easily accomplished by first converting the place values of the one system into the other, and then applying the digits from the one system against these.

APL and J include operators to convert to and from mixed-radix systems.

Factorial number system

Another proposal is the so-called factorial number system:

Radix87654321
Place value7!6!5!4!3!2!1!0!
Place value in decimal5040720120246211
Highest digit allowed76543210

For example, the biggest number that could be represented with six digits would be 543210 which equals 719 in decimal: 5×5! + 4×4! + 3×3! + 2×2! + 1×1! It might not be clear at first sight but the factorial based numbering system is unambiguous and complete. Every number can be represented in one and only one way because the sum of respective factorials multiplied by the index is always the next factorial minus one:

There is a natural mapping between the integers 0, ..., n!  1 and permutations of n elements in lexicographic order, which uses the factorial representation of the integer, followed by an interpretation as a Lehmer code.

The above equation is a particular case of the following general rule for any radix (either standard or mixed) base representation which expresses the fact that any radix (either standard or mixed) base representation is unambiguous and complete. Every number can be represented in one and only one way because the sum of respective weights multiplied by the index is always the next weight minus one:

, where ,

which can be easily proved with mathematical induction.

Related Research Articles

<span class="mw-page-title-main">Arithmetic</span> Elementary branch of mathematics

Arithmetic is an elementary part of mathematics that consists of the study of the properties of the traditional operations on numbers—addition, subtraction, multiplication, division, exponentiation, and extraction of roots. In the 19th century, Italian mathematician Giuseppe Peano formalized arithmetic with his Peano axioms, which are highly important to the field of mathematical logic today.

<span class="mw-page-title-main">Decimal</span> Number in base-10 numeral system

The decimal numeral system is the standard system for denoting integer and non-integer numbers. It is the extension to non-integer numbers of the Hindu–Arabic numeral system. The way of denoting numbers in the decimal system is often referred to as decimal notation.

In mathematics and computing, the hexadecimal numeral system is a positional numeral system that represents numbers using a radix (base) of sixteen. Unlike the decimal system representing numbers using ten symbols, hexadecimal uses sixteen distinct symbols, most often the symbols "0"–"9" to represent values 0 to 9, and "A"–"F" to represent values from ten to fifteen.

<span class="mw-page-title-main">Numeral system</span> Notation for expressing numbers

A numeral system is a writing system for expressing numbers; that is, a mathematical notation for representing numbers of a given set, using digits or other symbols in a consistent manner.

<span class="mw-page-title-main">Number</span> Used to count, measure, and label

A number is a mathematical object used to count, measure, and label. The original examples are the natural numbers 1, 2, 3, 4, and so forth. Numbers can be represented in language with number words. More universally, individual numbers can be represented by symbols, called numerals; for example, "5" is a numeral that represents the number five. As only a relatively small number of symbols can be memorized, basic numerals are commonly organized in a numeral system, which is an organized way to represent any number. The most common numeral system is the Hindu–Arabic numeral system, which allows for the representation of any number using a combination of ten fundamental numeric symbols, called digits. In addition to their use in counting and measuring, numerals are often used for labels, for ordering, and for codes. In common usage, a numeral is not clearly distinguished from the number that it represents.

The octal, or oct for short, is the base-8 positional numeral system, and uses the digits 0 to 7. This is to say that 10octal represents eight and 100octal represents sixty-four. However, English, like most languages, uses a base-10 number system, hence a true octal system might use different vocabulary.

A senary numeral system has six as its base. It has been adopted independently by a small number of cultures. Like decimal, it is a semiprime, though it is unique as the product of the only two consecutive numbers that are both prime. As six is a superior highly composite number, many of the arguments made in favor of the duodecimal system also apply to senary.

<span class="mw-page-title-main">Decimal separator</span> Numerical symbol

A decimal separator is a symbol used to separate the integer part from the fractional part of a number written in decimal form. Different countries officially designate different symbols for use as the separator. The choice of symbol also affects the choice of symbol for the thousands separator used in digit grouping.

<span class="mw-page-title-main">Babylonian cuneiform numerals</span> Numeral system

Babylonian cuneiform numerals, also used in Assyria and Chaldea, were written in cuneiform, using a wedge-tipped reed stylus to print a mark on a soft clay tablet which would be exposed in the sun to harden to create a permanent record.

A binary number is a number expressed in the base-2 numeral system or binary numeral system, a method of mathematical expression which uses only two symbols: typically "0" (zero) and "1" (one).

A numerical digit is a single symbol used alone or in combinations, to represent numbers in a positional numeral system. The name "digit" comes from the fact that the ten digits of the hands correspond to the ten symbols of the common base 10 numeral system, i.e. the decimal digits.

<span class="mw-page-title-main">Positional notation</span> Method for representing or encoding numbers

Positional notation usually denotes the extension to any base of the Hindu–Arabic numeral system. More generally, a positional system is a numeral system in which the contribution of a digit to the value of a number is the value of the digit multiplied by a factor determined by the position of the digit. In early numeral systems, such as Roman numerals, a digit has only one value: I means one, X means ten and C a hundred. In modern positional systems, such as the decimal system, the position of the digit means that its value must be multiplied by some value: in 555, the three identical symbols represent five hundreds, five tens, and five units, respectively, due to their different positions in the digit string.

In a positional numeral system, the radix or base is the number of unique digits, including the digit zero, used to represent numbers. For example, for the decimal system the radix is ten, because it uses the ten digits from 0 through 9.

In combinatorics, the factorial number system, also called factoradic, is a mixed radix numeral system adapted to numbering permutations. It is also called factorial base, although factorials do not function as base, but as place value of digits. By converting a number less than n! to factorial representation, one obtains a sequence of n digits that can be converted to a permutation of n elements in a straightforward way, either using them as Lehmer code or as inversion table representation; in the former case the resulting map from integers to permutations of n elements lists them in lexicographical order. General mixed radix systems were studied by Georg Cantor.

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 refers to the bijection that exists in this case between the set of non-negative integers and the set of finite strings using a finite set of symbols.

Non-standard positional numeral systems here designates numeral systems that may loosely be described as positional systems, but that do not entirely comply with the following description of standard positional systems:

The radix economy of a number in a particular base is the number of digits needed to express it in that base, multiplied by the base. This is one of various proposals that have been made to quantify the relative costs of using different radices in representing numbers, especially in computer systems.

A non-integer representation uses non-integer numbers as the radix, or base, of a positional numeral system. For a non-integer radix β > 1, the value of

References