Subscribe to DSC Newsletter

# Difficult Probability Problem: Distribution of Digits in Rogue Systems

I recently posted a table summarizing probabilistic properties of digits in various number representation systems, see here.  The topic is already rather difficult for well-behaved systems (those listed in my table) but some systems are rogue, and do not have these nice statistical properties. Here we focus on one of these less known systems, though at this point it is not sure if it is well-behaved or not: It is part of this problem to figure this out.

The problem is about the representation of a real number x greater or equal to 1, in some base b, using the following infinite product rather than the familiar (well-behaved) representation such as in the decimal or binary system:

The a(k)'s are called the (binary) digits of x in that system. The case b = 2 has been used to compute logarithms using the Feynman's algorithm, see here. Not all x's can not be represented that way. A necessary condition for x to have such a representation in base b is

The last inequality becomes an equality when all the a(k)'s are equal to 1. Also not all b's work. If b > 2, not all x's can be represented this way. The algorithm to compute, for a given x, the digits a(k)'s, is as follows:

Algorithm to compute the digits

1. Start with a(0) = 1 and w(0) = 1.

2. Compute a(k) for k > 0 with the formula3. Compute w(k) using

Questions

Here are some difficult problems:

• What are the conditions on b to guarantee that all x's smaller than the upper limit (depending on b) can be represented exactly?
• For a given b, is the distribution of the digits always the same for almost all x's? Is it 50% of 0's and 50% of 1's? Is there a distribution at all, at least asymptotically as k becomes large? Exercise: Choose 10,000 numbers randomly (for instance using RAND in Excel) and check the distribution of 0's and 1's, for b = 2 and b = 1.5.
• Are the digits auto-correlated, for instance a 0 more likely to be followed by a 0 rather than a 1, and conversely?

Note that the algorithm to generate the digits becomes very unstable after 30 iterations or so. You may need to use high precision computing or some other technique to analyze long-term behavior, see here.

For illustration purposes, here are the first few digits a(k) for x = Pi / 2 and b = 2, yielding 8 correct decimals when expressed in traditional base 10:

Pi / 2 = (1, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 0, 0, 1...)

Equilibrium distribution

For the well-behaved number representation systems, there is always a two-step iterative algorithm of the form

• Step 1: x(k) = g(x(k-1)) for some smooth, simple function g not depending on x nor on k
• Step 2: a(k) = h(x(k)) for some basic function h not depending on x nor on k

to compute the digits, see here.  The function g is associated with the equilibrium distribution (see same reference.)

Is it also the case here? I suspect that the answer is no. Are there bivariate functions g and h that would work, for instance something like x(k) = g(x(k-1), x(k-2)) ? This could lead to a stochastic integral equation, perhaps easily solvable, as for the well-behaved systems.

Finally, there are other number representation systems that are not well-behaved, for instance Egyptian fractions.

For related articles from the same author, click here or visit www.VincentGranville.com. Follow me on LinkedIn.

DSC Resources

Popular Articles

Views: 1237

Comment

### You need to be a member of Data Science Central to add comments!

Join Data Science Central

Comment by Vincent Granville on November 2, 2019 at 8:07am

Is the representation unique? See this article. It would be interesting to compare the following representations: x = [a(1) a(2) ... a(n) 1 0 0 0 0 0 ...] with y = [a(1) a(2) ... a(n) 0 1 1 1 1 1 ...].

• If x > y then there are gaps: numbers that can not be represented that way
• If x  <  y, then there are overlaps: numbers with more than one representation
• If x = y, the system is sound.

In this case, a number can have more than one representation, for instance (here with b = 2):

## Videos

• ### DSC Webinar Series: ML/AI Models: Continuous Integration & Deployment

Added by Tim Matteson

• ### DSC Webinar Series: Edge Computing with Real-time Analytics at Scale

Added by Tim Matteson

• ### DSC Webinar Series: How Bank of America Uses Data Prep for Faster Reporting

Added by Tim Matteson