# The perfect Number system

I was thinking of the number system presently in use(the decimal system) and its shortcomings. One of them is that all numbers cannot be represented accurately, for example the value of any irrational number. Although I know several attempts have been made for the development of such a system, none of them, as far as I know, have succeeded-none of them can represent all known numbers uniquely and accurately. Is such a number system even possible?

## 2 Answers

In any number system that uses a finite (or even countably infinite) set of characters, the set of numbers that are representable in a finite string is at most $\aleph_0$. Most reals will therefore not be representable by any finite string, so a perfect (as I read your definition) number system is not possible.

There is a unique continued fraction representation for every real number. In particular, a continued fraction is defined as follows, using the notation $[a_0;a_1,a_2,\ldots]$ for a continued fraction where $a_i$ is a possibly infinite series of positive integers. We say $$x=[a_0;a_1,a_2,\ldots]$$ exactly when $$x=a_0+\frac{1}{a_1+\frac{1}{a_2+\frac{1}{a_3+\ddots}}}$$ or, writing this recursively: $$x=a_0+\frac{1}{[a_1;a_2,a_3,\ldots]}.$$ What this says is, basically, we first approximate any real $x$ by finding the best integer approximation below it - that is $a_0=\lfloor x\rfloor$. Then, there is some remainder $x-a_0$ which is between $0$ and $1$. We take the reciprocal of this, $\frac{1}{x-a_0}$, which is between $1$ and $\infty$ and approximate that, and continue doing so. It is provable that this represents each rational number with a finite continued fraction and each irrational number with an infinite continued fraction and that these representations are unique.

A caveat of this is, although it is possible to do computations on continued fractions, it is not nearly as convenient as positional notations (like decimal). Whereas we can compute a product $ab$ or a sum $a+b$ to some number of decimal places (usually) given a fixed number of digits of $a$ and $b$, there is not a clear correspondence between how many terms of the continued fraction we have and how accurate it is (and how many terms of a sum or product we could find therefrom). Given that computation is often the point of using decimal expansions, where we often don't worry about theoretical issues like non-unique or non-terminating expansions, this makes continued fractions somewhat impractical as an upgrade to decimals (but theoretically, they're quite useful)

• Although this method adheres to the 'unique' requirement very well, it cannot render absolutely accurate values for quantities like 'pi' or any other irrational number. – Quantum Sphinx Dec 2 '14 at 3:22
• There are more real numbers than finite strings (see Ross' answer) - that inevitably means that we have to work with infinite sequences to talk about the reals. Every real does have a continued fraction - it's just infinitely long (and in that sense "can't be written down" - but that's not a really rigorous idea). You can't do much better than writing down $\pi$ to express $\pi$ if you want to work exactly. – Milo Brandt Dec 2 '14 at 3:30