# Predicting Real Numbers

Here is an astounding riddle that at first seems impossible to solve. I'm certain the axiom of choice is required in any solution, and I have an outline of one possible solution, but would like to see how others might think about it.

$$100$$ rooms each contain countably many boxes labeled with the natural numbers. Inside of each box is a real number. For any natural number $$n$$, all $$100$$ boxes labeled $$n$$ (one in each room) contain the same real number. In other words, the $$100$$ rooms are identical with respect to the boxes and real numbers.

Knowing the rooms are identical, $$100$$ mathematicians play a game. After a time for discussing strategy, the mathematicians will simultaneously be sent to different rooms, not to communicate with one another again. While in the rooms, each mathematician may open up boxes (perhaps countably many) to see the real numbers contained within. Then each mathematician must guess the real number that is contained in a particular unopened box of his choosing. Notice this requires that each leaves at least one box unopened.

$$99$$ out of $$100$$ mathematicians must correctly guess their real number for them to (collectively) win the game.

What is a winning strategy?

• As I said, at first a solution seems impossible, but it also seems impossible that two unit spheres can be assembled from the pieces of one unit sphere. Strange results are possible with the axiom of choice. Also, to address vonbrand's comment, there is not necessarily any relation between the numbers, and it is only required that at least, and not exactly, one box be left unopened. Apr 24, 2013 at 15:30
• @Alex, but the difference is that the prisoners puzzle allow for an arbitrarily large, but finite, failure. Reducing this failure to a single failure seems... unlikely. Apr 24, 2013 at 17:08
• If I fill the boxes with undefinable numbers, then no mathematician can guess the number in any box, since there is no way he can name it :p Apr 24, 2013 at 18:43
• Since a couple of comments have mentioned the "probability" of correct guesses, I'd like to second (and perhaps amplify) Qiaochu Yuan's comment: There is nothing probabilistic going on in the problem. Furthermore, I don't see anything the mathematicians can gain by randomizing their guesses. Apr 25, 2013 at 2:15
• @KarolisJuodelė No, he does not ask for some probability to be $\frac{99}{100}$. He asks for a strategy that ensures that 99 of the 100 guesses are correct. Apr 25, 2013 at 17:12

Before entering, the mathematicians agree on a choice of representatives for real sequences when two sequence are equivalent if they are equal past some index ; and a re-labeling of $\Bbb N$ into $M \times \Bbb N$ where $M$ is the set of mathematicians.

Once a mathematician $m$ is in the room, he opens every box not labeled $(m,x)$ for $x \in \Bbb N$, and for $m' \neq m$ he carefully notes the greatest index $x(m')$ (which is independent of $m$) where the sequence $(m',x)$ has a different value from that of its corresponding representative, and $x(m') = -1$ if it is the representative.
Then, $m$ computes $y(m) = \max_{m' \neq m} x(m') +1$, and opens every box labeled $(m,x)$ for $x > y(m)$. He finds the representative of that sequence, and guesses what's inside box $(m,y(m))$ according to that representative. He has the risk of guessing wrong if $y(m) \le x(m)$ (he is the only one not knowing the value of $x(m)$).

If there is an $m$ such that $x(m') < x(m)$ for every $m' \neq m$, then $m$ will be the only mathematician that can answer wrongly (for the others, $y(m') > x(m) > x(m')$). If there are several $m$ whose $x(m)$ tie for greatest, then they will all answer correctly.

• This is more or less the solution I know, exposited very nicely! I like the idea to re-label the boxes. The solution I know has mathematician $m$ open all boxes not congruent to $m\operatorname{mod}100$, which is just a specific re-labeling in your solution. Apr 25, 2013 at 16:18
• The representative before opening $(m, x)$ for large $x$ can (will) be different from the representative after. Hence you actually have two different values of $x(m')$ and of $y(m)$. After opening the $(m, x)$ boxes, the old values might as well be random numbers. While they can all be recalculated, what guarantee is there, that the box $(m, y_2(m))$ was not opened already? Apr 25, 2013 at 19:10
• @KarolisJuodelė: I don't understand. The entire sequence for $m'$ was already opened for each $m' \neq m$, so the values of $x(m')$ (and hence $y(m)$) won't change. Apr 25, 2013 at 21:14
• @Kundor, for simplicity, say $M = \{m_1, m_2\}$ and $n \in N$ is relabled so that even numbers belong to $m_2$. Say after $m_2$ opens boxes for $m_1$, he sees $4?2?0?0?0?0?0\dots$ (where $?$ is an unopened box). He picks the representative $0000000000000\dots$ and thus $y_1(m_2) = 3$. He then opens his own boxes and sees $4?2?0?0101010\dots$, but now the equivalence class has changed and the new representative is $654321010101\dots$ and $y_2(m_2) = 4$ but the box $(m_2, 4)$ is already open. Apr 26, 2013 at 5:13
• Correct me if I'm wrong, but there's nothing special about real numbers here. You can have a fixed collection of objects, say ordinals below $\aleph_7$, and say 100 mathematicians see a countable sequence of boxes, each containing an ordinal below $\aleph_7$. Choose equivalence class representatives of the countable sequences of these ordinals, etc.
– mbsq
Mar 15, 2017 at 17:28

Found this via Reddit. Here's my writeup of the solution.

The strategy involves the axiom of choice like so: the mathematicians group sequences of real numbers such that two sequences are in the same group if and only if they agree on all but the first few terms.

For example, let $$\pi_i$$ denote the $$i$$-th digit of $$\pi$$ (i.e. $$\pi_0=3,\pi_1 = 1,\pi_2=4,\dots$$).
Then the sequences $$(\gamma,e,\sqrt 2,2^{4/3},\pi_1,\pi_2,\pi_3,\dots)$$ and $$(\ln(2),\gamma,-7.8,\pi_0,\pi_1,\pi_2,\pi_3,...)$$ are in the same group, because they both are equal on all but the first 4 elements.

The Axiom of Choice is required to choose an arbitrary representative from each group. For example, I can choose $$(1.49,3,-\cos(4),\pi_0,\pi_1,\pi_2,...)$$ to represent the group I described above, but since there's infinitely many groups and I only have a finite amount of space to describe my strategy, I must appeal to the Axiom of Choice to produce a "choice function" that tells me which representative should be chosen from each of the groups.

Now I'll describe the plan. Let's say I'm mathematician #1. I'm going to open every box except 1, 101, 201, 301, and so on. Meanwhile mathematician #2 will open every box except 2, 102, 202, 302, etc., and in general mathematician #$$n$$ will open all boxes except those labeled $$n,100+n,200+n,300+n,...$$.

Back to me. I know what's inside the boxes that my buddy in room 2 didn't open. Let's suppose the numbers are:

• 2 -> 1739218.33
• 102 -> sqrt(5)-sqrt(2)
• 202 -> Arctan(37.238)
• 302 -> 382
• 402 -> -832.019
• 502 -> 4
• 602 -> $$\pi_3$$
• 702 -> $$\pi_4$$
• 802 -> $$\pi_5$$
• ...

Okay, I know the group that falls in. (Coincidentally, it's the group I talked about above.) I'm going to write a note that it started matching the representative from box $$602$$ onward. Let's write that note like this: "x(2)=6". I'll repeat that process for #3, noting "x(3)=5" for box $$503$$, and for #4, perhaps I note that "x(4)=7" for box $$704$$, and so on.

What I've done is defined $$x(m)$$ for $$m\in\{2,\dots,100\}$$ to be the first box that disagrees with the associated representative given by the Axiom of Choice. However, I don't know the value of $$x(1)$$ since I haven't opened boxes $$1,101,201,\dots$$ yet.

What I can do though is let $$y(1) = \max(x(2),...,x(100))+1$$ be larger than all the observed numbers. It just so happened that $$x(4)=7$$ was the biggest, so $$y(1)=8$$.

It's finally time to open most of the remaining boxes. I'll open all the boxes in my sequence $$1, 101, 201, \dots$$, starting with the box given by $$y(1)=8$$: box $$801$$. (Since $$y(1)$$ has to be at least $$1$$, this strategy always leaves at least box $$001$$ closed.) Let's see what I got (let $$e_i$$ denote the $$i$$-th digit of $$e$$):

• 1 -> ???
• 101 -> ???
• ...
• 701 -> ???
• 801 -> 7pi+sqrt(3)
• 901 -> $$e_{9}$$
• 1001 -> $$e_{10}$$
• 1101 -> $$e_{11}$$
• ...

Seeing those last digits, I know enough to figure out which group it belongs to: the group with representative $$(\sqrt 2,e_1,e_2,e_3,...)$$.

I now know enough to make my guess. I'm going to use the representative, and pick the box given by $$y(1)-1=7$$, which is the maximum value of $$\{x(2),\dots,x(100)\}$$ (which we said was $$x(4)$$ in this example). In this case, the seventh entry is $$e_7=1$$ (note that we're zero-indexing so that the first entry goes with box $$001$$). So I'll guess that box $$701$$ contains $$1$$.

Of course, mathematician #$$n$$ will do exactly the same thing by considering the values of $$\{x(1),\dots,x(n-1),x(n+1),\dots,x(100)\}$$, computing $$y(n)$$, and so on. Now, I need to prove to you that these strategies work.

To do this, I just need to prove that if I'm wrong, then everyone else is right! (99/100 ain't bad, according to the rules.)

Okay, I'm wrong, so what happened? Obviously, the box given by $$y(1)-1$$ didn't match the Axiom of Choice's representative. That means that $$x(1)>y(1)-1$$, since $$x(1)$$ is the number for which every other mathematician knew the boxes from that point forward matched the Axiom of Choice's representative.

With this information, I realize something. $$y(1)-1\geq x(n)$$ for every other number n, since $$y(1)$$ is defined to be the maximum of the $$x(n)$$ plus one! So here's what I now know:

$$x(n)\leq y(1)-1

This is great news. Everyone else defined $$y(n)$$ knowing $$x(1)$$, and $$x(1)$$ has just been shown to be bigger than the other $$x(n)$$. So:

$$x(n)\leq y(1)-1

So, for each mathematician #$$n$$, all boxes $$x(1)$$ and onward match the representative given by the Axiom of Choice. Every mathematician #$$n$$ opened $$x(1)+1$$ onward, and guessed the choice function's $$x(1)$$ entry for the $$x(1)$$ box, which has to match up!

Thus, if I'm wrong, everyone else has to be right. And that beats the game.

• Nice argument but the paragraph before the conclusion confuses me. Shouldn't it read "for each mathematician #m, all boxes x(m) and onward match the representative"? I am also not sure about the three uses of the x(1) box that follow in the next sentence; wasn't the mathematician #m supposed to guess the y(m)-1 box corresponding to his representative? Aug 14, 2013 at 18:46
• Ah! I was forgetting that in the case x(1) is the greatest, then y(m)-1 is actually x(1). I leave the comment as a remark just in case someone else bumps into that confusion. For a moment it looked like everyone was guessing on the first mathematician sequence and not on their own. Aug 14, 2013 at 19:00
• +1 for clearer explanation, e.g. your phrase "sequences of real numbers" with examples, and your clearer explanation of the $x$ and $y$ functions. Jul 20, 2018 at 8:13
• Hey, this same strategy works when there are a finite number of numbers, say for example 1000 boxes in each room, so each room has a 100 sequences. But it doesn't seem intuitive that it works for a finite number of boxes. Did I do wrong anywhere? Jul 30, 2018 at 15:35
• @Tinkidinki There's a couple issues with only having finitely many boxes. For one, all the finite sequences match on all but finitely many terms, so everything belongs to the same equivalence class. Another is that we cannot define $x(n)$ to be the first box that matches the equivalent class representative, since that box may not exist (all boxes may be different). Jul 31, 2018 at 17:06