Logarithms – Feynman’s Algorithm for Computing a Logarithm of a Number in [1,2]

logarithmssequences-and-series

I came upon the following quote concerning Feynman (the entire essay this is from can be found here):

Consider the problem of finding the logarithm of a fractional number between 1.0 and 2.0 (the algorithm can be generalized without too much difficulty). Feynman observed that any such number can be uniquely represented as a product of numbers of the form $1 + 2^{-k}$, where $k$ is an integer. Testing each of these factors in a binary number representation is simply a matter of a shift and a subtraction. Once the factors are determined, the logarithm can be computed by adding together the precomputed logarithms of the factors. The algorithm fit especially well on the Connection Machine, since the small table of the logarithms of $1 + 2^{-k}$ could be shared by all the processors. The entire computation took less time than division.

I've given this half a thought and searched a little online, and by basically doing a "binary search" algorithm, one can determine what a set of factors are. See this question on another SE site. However, I am not convinced the factorization is unique since I can't think of an argument. (As an aside, the binary search method doesn't seem the most elegant way to compute the factors.)

So my question is more precisely the following. For ${\bf a} = (a_1, a_2, \dots ) \in \{0,1\}^{{\bf N}}$, show that each number $x \in (1,2]$ is uniquely represented by a certain $\bf{a}$ such that
$$x = \prod_{k=1}^\infty (1+a_k 2^{-k}).$$

I know
$$\prod_{k=1}^\infty (1+a_k 2^{-k}) = 1 + \sum_{k=1}^\infty \left(a_k + \sum_{1\leq i<j,i+j=k} a_i a_j \right) 2^{-k} = 1 + \sum_{k=1}^\infty b_k 2^{-k}$$
where $b_k$ are the binary digits of $x$, but this doesn't give me much insight.

Best Answer

The representation cannot be unique as stated. Consider $1+\dfrac{1}{2}$, which has the obvious representation $(1,0,0,\ldots)$. But $(1+\dfrac{1}{2})/(1+\dfrac{1}{4})=1.2<1+\dfrac{1}{4}$, and so will have a representation of the form $(0,0,1,\ldots)$. So $1+\dfrac{1}{2}$ will also have a representation $$(1+\dfrac{1}{4})\cdot (0,0,1,\ldots)=(0,1,1,\ldots)$$

The point is similar to the familiar observation that $1.=0.\overline{9}$ in decimal. Consequently no real number representation can be unique unless additional restrictions are imposed (indeed, that's an important technical point in Cantor's diagonal argument). So I think the more interesting question is what conditions must be imposed to get a unique Feynman representation...

Related Question