Why is unary not a legitimate radix?

371 Views Asked by At

In binary the only digits are '0' and '1'. Let's define base-one (unary) as having '0' as its sole digit. There's an obvious problem, though - there can be no numeral representing zero, but there's also an obvious fix: '0' can represent (drum roll) zero, '00' represents one, '000' represents two, etc. '-00000000000' is negative ten in unary, for example. '$\frac{00}{000}$' in unary is a rational number, one half. It is clear to see that any rational can be represented in unary.

Question: in what ways is this radix a misfit? It can represent any number base-N can represent for any natural N greater than or equal to two, or can it?

1

There are 1 best solutions below

5
On BEST ANSWER

The problem is that when an integer is represented in base $B$, its standard form is $n =\sum_{k=0}^{m(n)} d(n)_kB^k $ where $0 \le d_k < B $.

If $B=1$, then all the "digits" $d_k(n)$ have to be zero, so, as you have done, the number of unary digits for $n$ is $n$ (or $n+1$ to have a non-void representation of zero). This seems odd, which, of course, does not rule it out.

From a practical point of view, if $B > 1$, the base $B$ representation of $n$ takes $O(\log n)$ storage (more precisely, $O((\log B)(\log n))$ bits). Many algorithms working with integers depend on this to have a reasonable execution time.

My take: Yes, you can do it, and it might be OK if you are programming a Turing machine, but it would almost never be used in a real algorithm or computation.