rec.puzzles Archive

What is the probability that the decimal expansion of pi contains a sequence of exactly one million nines...

probability/pi.nines New

New entry, edited from material collected for the archive and not yet in a released version.

Problem

What is the probability that the decimal expansion of pi contains a
sequence of exactly one million nines somewhere?

-- Tim Roberts <tim@giaec.cc.monash.edu.au>
Show solution
In article <2ci6u5$kf9@gap.cco.caltech.edu> keith@cco.caltech.edu
(Keith Schneider) writes:
>Pretty close to 1, isn't it?

Either 1 or 0, depending on whether it *does* contain such a sequence
or not.

To be very meaningful, probabilities need to be talking about something
with a sample space of size greater than 1...

-- David Seal <dseal@armltd.co.uk>

In article <2cj422$nd3@hp-col.col.hp.com> cab@col.hp.com (Chris Best)
writes:
>We assume that pi goes on forever, therefore there are infinitely
>many one-million-digit sequences in it (digits 1 thru 1000000, digits
>2 thru 1000001, digits 3 thru 1000002, etc.).  This means that the
>sample space IS greater than one.  By quite a bit.

If you were picking your starting digit at random, this would be a
valid observation.  But the question was whether the one number, pi,
happened to have a particular property.  This is not a question of
probability.

>This infinite, random (whatever that really means) string of numbers
>should, in fact, contain any sequence you can think of.  As well as
>all of the ones you can't.

It's not random according to any mathematical definition I know of.
It is definitely not equivalent to rolling a 10-sided die for each
successive digit.  Why should I believe that any particular
subsequence occurs (unless, of course, it is shown by computing pi to
the necessary number of places)?

-- David A. Karr <karr@cs.cornell.edu>

Bernie Cosell (cosell@world.std.com) wrote:
: Yes, I know that Tim specified the decimal expansion, but unless
: there have been some theorems proven that I haven't heard about,
: merely knowing that PI is transcendental is _not_ sufficient to tell
: you whether a particular sequence necessarily occurs in its
: expansion.

Here is a quick disproof of this proposition.  The set of all numbers
whose digits are in {0,1} is uncountable.  The set of algebraic
numbers is countable.  Therefore, there is a transcendental number
whose digits are in {0,1}.

Now, a longer (but constructive) argument:

If x is algebraic and irrational, then there is an integer n and a
constant C so that |x - p/q| > C/q^n for all integers p,q with q > 0.
This theorem was proved by Liouville.

Let x = 1/10 + 1/10^2 + 1/10^6 + 1/10^24 + . . . + 1/10^k! + . . .

If q = 10^k! and p = [10^k! x], then |x - p/q| < 2/10^(k+1)! =
2/q^(k+1).  Therefore, x is transcendental.

-- David Radcliffe <radcliff@csd4.csd.uwm.edu>

In article <2cj422$nd3@hp-col.col.hp.com> cab@col.hp.com (Chris Best)
writes:
[...]

This would be sensible if the question was "what is the probability
that a randomly chosen sequence of a million digits from the decimal
expansion of pi consists of a million 9s?".  The random choice of
starting point means that you've got a sensible sample space.  In
particular, we know of no reason why you couldn't take an observation
(i.e. choose a starting point and see whether it starts a sequence of a
million 9s), then take another observation and get a different answer.
This is analogous to the fact that you can roll a die, see what it
gives you, then repeat the observation and get a different answer.
This is the sort of situation where the idea of probability makes
sense: when you say that the probability of rolling a 3 on a die is
1/6, you mean that if you throw the die repeated, the ratio (number of
3s thrown)/(number of throws) will almost certainly converge to 1/6.

(Aside: even the question needs more to be fully specified and so to
make an answer possible: either a probability distribution on the
starting points of the sequences being considered, or a converging
sequence of distributions.)

But the question was "What is the probability that the decimal
expansion of pi contains a sequence of a million 9s?".  If you somehow
manage to get an answer to that question, there's no chance (barring
human error! :-) that you'll get a different answer if you try to take
another observation.  As a result, the answer is either that it does
or that it doesn't: truth values rather than probabilities are the
right tool for dealing with this sort of one-off situation.

It might look simpler if we get rid of the dauntingly large number:

"What is the probability that a random chosen sequence of two digits
from the decimal expansion of pi consists of two 9s?" is a sensible
question.  What evidence we've got is that the answer is probably
1/100, at least for all the usual converging sequences of
distributions on the starting position.

"What is the probability that the decimal expansion of pi contains a
sequence of two 9s?" isn't really sensible.  The decimal expansion of
pi *does* contain a sequence of two 9s, and no amount of
re-observation will produce a different answer.  Technically, you can
say that a TRUE statement has probability 1 and a FALSE statement has
probability 0 if you want: the ratio (number of observed
occurrences)/(number of observations) converges (very rapidly! :-) to
0 and 1 respectively for these statements.  But it isn't a very useful
way of looking at it.  The correct tool for answering this sort of
question is a truth value: "The decimal expansion of pi contains a
sequence of two 9s" is a statement with truth value TRUE.

Also note incidentally that "probability 1" and "TRUE" do *not* mean
the same thing, nor do "probability 0" and "FALSE".  It is possible for
an event to have probability 0 or 1 without provably not
occurring/occurring.  So when you talk about events having probability
0 or 1, you're making a weaker statement than when you say they are
FALSE or TRUE.

-- David Seal <dseal@armltd.co.uk>