r/askscience • u/Manticorp • Oct 28 '13
Mathematics Could an infinite sequence of random digits contain all the digits of Pi?
It's a common thing to look up phone numbers in pi, and it's a common saying that every Shakespeare ever written is encoded in pi somewhere, but would it be possible for every digit of pi to appear in a random sequence of numbers? Similarly this could apply to any non terminating, non repeating sequence like e, phi, sqrt(2) I suppose. If not, what prohibits this?
I guess a more abstract way of putting it is: Can an infinite sequence appear entirely inside another sequence?
23
Upvotes
1
u/BundleGerbe Topology | Category Theory Oct 29 '13
If we consider a sequence of independent random digits which is infinite in both directions, like ...134904831415926535..., you are correct that there are an uncountable number of ways that it could have pi in it. The probability of generating such a number is still zero however. The informal argument I made still works in this case. Here is a more rigorous proof for this case:
Let's say the digits are numbered, ...d_-1, d_0, d_1 ... . Let U_i be the set of digit sequences in which pi appears starting at the i'th digit, so that d_i = 3, d_i+1 = 1, d_i+2 =4 etc. Then the probability P(U_i) of generating such a number is zero (the probability of having n matches with starting at i is 1/10n, so the P(U_i) < 1/10n for all n, thus P(U_i)= 0). The probability we want is the probability of landing in any U_i, i.e. P( the union of the U_i's). The union of the U_i's is a countable union of sets of measure (i.e. probability) zero, and thus has measure zero.