Tue 22 Jul 2008
Two posts ago I showed how many coin flips it would take in order to have a 98% confidence of getting 92 heads in a row (à la Rosencratz and Guildenstern Are Dead). The answer turns out to be
coin flips, which if you tried to do by yourself, it would take 100 billion times longer than the current age of the universe. Since I mentioned that only Wowbagger, the Infinitely Prolonged could pull off such a stunt, I think it’s only fair that any other solution also be Adamsian, at least in practicality if nothing else.
My friend Spencer proposed a Dyson sphere to power a huge number of coin-flipping robots. I think he’s on the right track and I had similar thoughts, however my ideas are a bit larger in scale and less detailed. I won’t go into detail on what kind of Dyson Sphere is best or such, since even simplistic models are fraught with difficulties and instabilities (a nice page talking about Dyson Spheres and some simple analysis is here). Instead, let’s just say that we can build some kind of large Dyson network in order to capture a significant portion of the Sun’s energy. We’ll be conservative and say that after light capture, conversion to useful energy, and then maintenance, etc. we can use 10% of the Sun’s radiant energy to power an array of coin-flipping robots.
Spencer also mentioned the concern that once you have good enough robots, that coin flipping is no longer random: exactly precise robots flipping exactly precise coins in the exactly precise way will give the exact same result every time. That may be the case, but we’ll assume that the robots and coins are made imprecise enough that there will be enough random variance in between all the robots to make the system truly random and fair (this is in all reality probably impossible, but we’re in Adam’s universe so we’ll assume it can be done anyway).
Since the robots don’t have to do anything but flip coins and report the outcome, we’ll say each robot consumes about as much power as a toaster oven, or 1000 W. The sun’s luminosity is
, so assuming we can use 10% of the sun’s energy we have:
robots
This many robots would give us the same number of flips every second, so that will give us the required number of flips in:
11 days and 14 hours.
Now that is a considerable improvement.
This potential solution does have some problems though, the most obvious being whether there is enough useful material in the entire solar system to build
robots, plus the Dyson power grid to run the whole thing, plus a maintenance system to keep it all in good working order, etc. If we limit ourselves to just the easy to use material, like just the asteroid belt, that limits us to about
kg of mass. Assuming a total of 10 kg for each robot (including Dyson network power generation, infrastructure, maintenance, etc.), that limits us to just
robots. This number of coin-flipping robots would then take 6.14 years to get the required
coin flips, which still isn’t bad at all. It might take several millenia to build the coin-flipping robot Dyson network, but once it was up and running you’d have your 92 heads in a row in just a few short years!
So lets say we let our coin flipping Dyson array keep running, say, until the Sun becomes a red giant in about 5 billion years, destroying our Dyson array. We would have

coin flips.
From this can we calculate how many coin heads in a row we can expect to get during this time? Our initial equation is

where F the confidence probability we we desire (we’ve been using 0.98, or 98%), n is the number of heads in a row, and f is the number of coin flips. Rearranging this for n we have:

For some various confidence probabilities we have these results:
| F | n |
|---|---|
| 0.9999 | 120 |
| 0.999 | 120 |
| 0.99 | 121 |
| 0.9 | 122 |
| 0.75 | 123 |
| 0.5 | 124 |
So what does this mean? You have a 99.99% chance of getting at least 120 heads in a row, pretty much guaranteed. However, you only have a 50% chance of getting up to 124 heads in a row. What gives? We go from flipping coins for 6 years to 5 billion years, and the only improvement we get is an additional 28 heads in a row? That’s because each additional head in a row has half the probability of occuring, so the probability decreases exponentially with a linear increase in number of heads required. Conversely, for an exponential increase in the number of coin flips, we see only a modest linear increase in number of expected heads in a row.




![(1/2)(1/2)(1/2)cdots[92~times]cdots(1/2)=2^-92 = 2.019*10^-28 (1/2)(1/2)(1/2)cdots[92~times]cdots(1/2)=2^-92 = 2.019*10^-28](http://www.moroha.net/blog/wp-content/plugins/wpmathpub/phpmathpublisher/img/math_971_08673d4fbd02809d942d08e4ffa09df0.png)


. k is the number of trials, and P is the probability of the event occurring once within k trials. However, this equation doesn’t quite give us the probability distribution we need. This function will give us the probability of getting exactly one event (heads 92 times in a row) out of k trials (flipping a coin 92 times in a row k times). We’re not interested in the probability of exactly one success, we’re interested in the probability of one or more successes. For that, we need the related Cumulative Distribution Function. Basically it’s the sum of the probabilities of 1, 2, 3,… up to k successes out of k trials. It’s actually pretty easy to derive without performing sums for arbitrarily large values of k. Since we want one or more successes, that means the only thing we don’t want is a failure for every trial. The probability of a single failure is simply
, so the probability of k failures is
. Since we want every possible combination except every trial a failure, we just subtract this from one (the sum of all possible combinations is of course equal to one). This function comes out to be:


. It is



years old. That puts it as 100 billion times longer than the current age of the universe. This is a feat that could only be pulled off by, say,
. You’d have a millions of times better chance of winning the lottery than achieving this feat. In fact, given a lottery that has a one in one billion chance of winning, you’d have a better chance of winning said lottery 3 times in a row then you would of getting 92 heads in a row on a fair coin.
.













