BREAKING NEWS

## Summary

The radix economy of a number in a particular base (or radix) is the number of digits needed to express it in that base, multiplied by the base (the number of possible values each digit could have). 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.

Radix economy also has implications for organizational structure, networking, and other fields.

## Definition

The radix economy E(b,N) for any particular number N in a given base b is defined as

$E(b,N)=b\lfloor \log _{b}(N)+1\rfloor \,$

where we use the floor function $\lfloor \rfloor$  and the base-b logarithm $\log _{b}$ .

If both b and N are positive integers, then the radix economy $E(b,N)$  is equal to the number of digits needed to express the number N in base b, multiplied by base b. The radix economy thus measures the cost of storing or processing the number N in base b if the cost of each "digit" is proportional to b. A base with a lower average radix economy is therefore, in some senses, more efficient than a base with a higher average radix economy.

For example, 100 in decimal has three digits, so its radix economy is 10×3 = 30; its binary representation has seven digits (11001002) so it has radix economy 2×7 = 14 in base 2; in base 3 its representation has five digits (102013) with a radix economy of 3×5 = 15; in base 36 (2S36) its radix economy is 36×2 = 72.

If the number is imagined to be represented by a combination lock or a tally counter, in which each wheel has b digit faces, from $0,1,...,b-1$  and having $\lfloor \log _{b}(N)+1\rfloor$  wheels, then the radix economy $b\lfloor \log _{b}(N)+1\rfloor$  is the total number of digit faces needed to inclusively represent any integer from 0 to N.

## Asymptotic behavior

The radix economy for large N can be approximated as follows:

$E(b,N)=b\lfloor \log _{b}(N)+1\rfloor \sim b\ \log _{b}(N)={b \over \ln(b)}\ln(N).$
${E(b,N) \over \ln(N)}\sim {b \over \ln(b)}.$

The asymptotically best radix economy is obtained for base 3, since $b \over \ln(b)$  attains a minimum for $b=3$ :

${2 \over \ln(2)}\approx 2.88539\,,$
${3 \over \ln(3)}\approx 2.73072\,,$
${4 \over \ln(4)}\approx 2.88539\,.$

For base 10, we have:

${10 \over \ln(10)}\approx 4.34294\,.$

## Radix economy of different bases

### e has the lowest radix economy

Here is a proof that base e is the real-valued base with the lowest average radix economy:

First, note that the function

$f(x)={\frac {x}{\ln(x)}}\,$

is strictly decreasing on 1 < x < e and strictly increasing on x > e. Its minimum, therefore, for x > 1, occurs at e.

Next, consider that

${E(b,N)}\approx {b\ {\log _{b}(N)}}={b{\ln(N) \over \ln(b)}}$

Then for a constant N, ${E(b,N)}$  will have a minimum at e for the same reason f(x) does, meaning e is therefore the base with the lowest average radix economy. Since 2 / ln(2) ≈ 2.89 and 3 / ln(3) ≈ 2.73, it follows that 3 is the integer base with the lowest average radix economy.

### Comparing different bases

The radix economy of bases b1 and b2 may be compared for a large value of N:

${{E(b_{1},N)} \over {E(b_{2},N)}}\approx {{b_{1}{\log _{b_{1}}(N)}} \over {b_{2}{\log _{b_{2}}(N)}}}={\left({\dfrac {b_{1}\ln(N)}{\ln(b_{1})}}\right) \over \left({\dfrac {b_{2}\ln(N)}{\ln(b_{2})}}\right)}={{b_{1}\ln(b_{2})} \over {b_{2}\ln(b_{1})}}\,.$

Choosing e for b2 gives the economy relative to that of e by the function:

${{E(b)} \over {E(e)}}\approx {{b\ln(e)} \over {e\ln(b)}}={{b} \over {e\ln(b)}}\,$

The average radix economies of various bases up to several arbitrary numbers (avoiding proximity to powers of 2 through 12 and e) are given in the table below. Also shown are the radix economies relative to that of e. Note that the radix economy of any number in base 1 is that number, making it the most economical for the first few integers, but as N climbs to infinity so does its relative economy.

Base b Avg. E(b,N)

N = 1 to 6

Avg. E(b,N)

N = 1 to 43

Avg. E(b,N)

N = 1 to 182

Avg. E(b,N)

N = 1 to 5329

${{E(b)} \over {E(e)}}$  Relative size of
E (b )/E (e )
1 3.5 22.0 91.5 2,665.0 $\infty$
2 4.7 9.3 13.3 22.9 1.0615

e 4.5 9.0 12.9 22.1 1.0000

3 5.0 9.5 13.1 22.2 1.0046

4 6.0 10.3 14.2 23.9 1.0615

5 6.7 11.7 15.8 26.3 1.1429

6 7.0 12.4 16.7 28.3 1.2319

7 7.0 13.0 18.9 31.3 1.3234

8 8.0 14.7 20.9 33.0 1.4153

9 9.0 16.3 22.6 34.6 1.5069

10 10.0 17.9 24.1 37.9 1.5977

12 12.0 20.9 25.8 43.8 1.7765

15 15.0 25.1 28.8 49.8 2.0377

16 16.0 26.4 30.7 50.9 2.1230

20 20.0 31.2 37.9 58.4 2.4560

30 30.0 39.8 55.2 84.8 3.2449

40 40.0 43.7 71.4 107.7 3.9891

60 60.0 60.0 100.5 138.8 5.3910

## Ternary tree efficiency

One result of the relative economy of base 3 is that ternary search trees offer an efficient strategy for retrieving elements of a database. A similar analysis suggests that the optimum design of a large telephone menu system to minimise the number of menu choices that the average customer must listen to (i.e. the product of the number of choices per menu and the number of menu levels) is to have three choices per menu.

## Computer hardware efficiencies

The 1950 reference High-Speed Computing Devices describes a particular situation using contemporary technology. Each digit of a number would be stored as the state of a ring counter composed of several triodes. Whether vacuum tubes or thyratrons, the triodes were the most expensive part of a counter. For small radices r less than about 7, a single digit required r triodes. (Larger radices required 2r triodes arranged as r flip-flops, as in ENIAC's decimal counters.)

So the number of triodes in a numerical register with n digits was rn. In order to represent numbers up to 106, the following numbers of tubes were needed:

Radix r Tubes N = rn
2 39.20
3 38.24
4 39.20
5 42.90
10 60.00

The authors conclude,

Under these assumptions, the radix 3, on the average, is the most economical choice, closely followed by radices 2 and 4. These assumptions are, of course, only approximately valid, and the choice of 2 as a radix is frequently justified on more complete analysis. Even with the optimistic assumption that 10 triodes will yield a decimal ring, radix 10 leads to about one and one-half times the complexity of radix 2, 3, or 4. This is probably significant despite the shallow nature of the argument used here.

## Other criteria

In another application, the authors of High-Speed Computing Devices consider the speed with which an encoded number may be sent as a series of high-frequency voltage pulses. For this application the compactness of the representation is more important than in the above storage example. They conclude, "A saving of 58 per cent can be gained in going from a binary to a ternary system. A smaller percentage gain is realized in going from a radix 3 to a radix 4 system."

Binary encoding has a notable advantage over all other systems: greater noise immunity. Random voltage fluctuations are less likely to generate an erroneous signal, and circuits may be built with wider voltage tolerances and still represent unambiguous values accurately.