4

Recently, I happened to be thinking again about the question: "Is it possible to simulate a fair six-sided die using only fair coin flips?" One type of answer which tends to be given is along the lines of: flip the coin three times. On HHH, answer 1; ...; on THT, answer 6; and on TTH or TTT discard the flips and start over. This terminates with probability 1, and each result has probability $\frac{1}{6}$. However, then a common objection might be: Terminating with probability 1 is not enough, I want it to be absolutely guaranteed that the process will terminate no matter what the sequence of coin flips is.

Now classically, it is straightforward to prove this is impossible to do with an absolute guarantee of termination, in the formulation that such a process would essentially be a function $f$ from finite sequences in $\{ H, T \}^{< \omega}$ to $\{ 1, \ldots, 6, again \}$ such that:

  • Whenever $f(s) \ne again$ for some $s \in \{ H, T \}^{< \omega}$, and $t$ has $s$ as a prefix, then $f(t) = f(s)$.
  • Every infinite sequence in $\{ H, T \}^\omega$ has some finite prefix $s$ such that $f(s) \ne again$.
  • For each $n \in \{ 1, \ldots, 6 \}$, the set of $s \in \{ H, T \}^\omega$ such that $f(s') = n$ for some prefix $s'$ of $s$ has Lebesgue measure $\frac{1}{6}$.

Constructing the "decision tree" of $f$, we can see that for each $n \in \omega$, there must be some $s \in \{H, T\}^n$ with $f(s) = again$ - for otherwise, the Lebesgue measures mentioned above would all necessarily be integer multiples of $2^{-n}$, giving a contradiction. Now, a classical theorem states that for any tree such that each node has finitely many children, and where for any $n$ there exists a path from the root of length $n$, then there exists an infinite path in the tree from the root. In our case, that implies that there exists a branch $s \in \{ H, T \}^\omega$ such that $f(s') = again$ for each finite prefix of $s'$, contradicting the second requirement above.


So now the question I was wondering about was: the classical theorem about trees used above does not seem to be intuitionistically valid. (Informal argument: suppose we had an algorithm which given a description of a tree in terms of the root of the tree and functions such as "give the finite list of children of $x$", along with a function "given a natural number $n$, give a path from the root of length $n$" -- would output an infinite branch of the tree. Now trace the running of this algorithm on the "binary heap" tree on $\mathbb{N}$ with root 0 and with $n$ having children $2n+1$ and $2n+2$, and the "give a path from the root of length $n$" function outputting $0, 1, 3, 7, \ldots, 2^n-1$ -- until this algorithm outputs a child of 0 (i.e. either 1 or 2) in the proposed branch. At this point, it can only have made finitely many calls to the mentioned functions, so the outputs it has gotten are also consistent with a tree where that child has subtree terminating at some finite level high enough for the outputs so far to be valid, while the other subtree remains the same; and with a "path of length $n$" function which is either the same if the algorithm output 2 or which switches to returning $0, 2, 5, 11, 23, \ldots, 3 \cdot 2^{n-1}-1$ after that finite level if the algorithm output 1. This gives a contradiction that the algorithm would have been doomed if that had been the tree and "path of length $n$" function it had been given in the first place.)

Given that, the main question is: can it be proved using only intuitionistic logic that no function $f$ satisfying the above conditions can exist?


For one avenue of attack, I thought of trying to see what the Goedel translation of the classical theorem about trees -- that a tree with only finitely many children of each node, of unbounded depth, has an infinite branch -- would say as an intuitionistically valid theorem. Then, I could see whether that is close enough to get a contradiction given some $f$. However, I quickly get bogged down in trying to trace down what that Goedel translation would actually say.

On another avenue of attack, I get the feeling it might be possible to do a "adverserial algorithm" type argument like the above to disprove any proposed constructive proof of $\forall f, cond_1(f) \land cond_2(f) \land cond_3(f) \rightarrow \bot$. The trick would be to start off with the almost solution of "flip the coin until the corresponding binary decimal is forced to be in $(\frac{k-1}{6}, \frac{k}{6})$ and at that point return $k$". And then, at any time the function for the second condition is called, switch the "split points" away from that sequence at some point, consistent with the values of $f$ given so far, and then return the level where you switched. And for the third point, the function would be taking a rational $\epsilon > 0$ and $n \in \{1, \ldots, 6\}$ and demonstrating through some finite number of values of $f$ that the Lebesgue measure of the set for $n$ is forced to be within $\epsilon$ of $\frac{1}{6}$, which should be possible with the switched "almost solution" so far. However, if I try to describe more formally what exactly the "switching split points" would be doing, I end up getting bogged down in details again.

(And incidentally, is there a way of formalizing this type of "adverserial algorithm" type of argument? For instance, in the first such argument above, I get the feeling it might be useful to look at the Kripke frame of finite sets of information about a tree which is either the full binary heap tree, or that tree with the left subtree pruned at some finite level. But in that frame, the statement $\forall n, \exists (\mathrm{path~of~length~}n)$ is not yet true; so I get the feeling some sort of modal logic argument might be necessary from here, and I don't know nearly enough modal logic to proceed.)

One observation which might simplify reasoning a bit: the existence of a guaranteed terminating process to simulate a die with coin flips would be equivalent to the existence of a guaranteed terminating process involving coin flips which returns true with probability $\frac{1}{3}$ and false with probability $\frac{2}{3}$. In one direction: if you have such a process, then on true you can do one more coin flip and return 1 or 2; on false, you can do two more coin flips and return 3 through 6 accordingly. In the other direction, if you have a process to simulate a die, then just return true if that process returns 1 or 2 and false otherwise.

  • OK, I've added an introductory paragraph; and in the (now) second paragraph I explain that I'm asking about a proof that no function $f$ with the given properties exists. – Daniel Schepler Oct 24 '20 at 22:24

0 Answers0