Choosing things is hard: infinite hats, definability, and topology

A hat puzzle

Hat-Puzzle-1-3964260265-1571331739116.png

Infinitely many prisoners are assembled in a line as pictured. Each knows their place in the line. Each wears either a black or white hat, and each can only see the hats in front of them. Starting from the back of the line, each prisoner has to guess the color of their own hat. The prisoners were allowed to coordinate before the hats were assigned, but now no communication is allowed. Even the guesses must be silently submitted.

If only finitely many prisoners guess wrong, then everybody goes free. Can they succeed?

(Pause for thought.)

Amazingly, yes! Here’s the strategy: 

Label white hats as 1 and black as 0. Then an assignment of hats becomes an infinite binary sequence, i.e. an element of 2. Define an equivalence relation called E0 on 2 as follows: 

x E0 y if and only if (∃n ∈ ℕ) (∀m > n) (xm = ym)
“x and y eventually agree”

When the prisoners meet up beforehand, they coordinate by agreeing on a choice of one representative from each class.

Once they’re in the room, every prisoner can see all but a finite number of hats. So they all know exactly which equivalence class they’re in. Now each prisoner guesses as if they were in the representative sequence from this class. Since the actual sequence and the representative sequence eventually agree, the prisoners’ guesses eventually agree with reality, and so they go free!

Making choices is hard

I talked about this puzzle a few years ago in this post. Several commenters balked at the solution and said something like: “but there are uncountably many equivalence classes, so therefore the prisoners need to be able to coordinate on uncountably many representatives. Surely this is unreasonable!”

I think that uncountably many representatives is not what’s at issue here. Consider the equivalence relation on the reals defined by:

x ~ y if and only if x – y ∈ ℤ.

Here we also have uncountably many equivalence classes, but the prisoners could easily come to an agreement on which representative to pick. They could for instance agree to choose the unique representative which lies in the interval [0,1). Here the prisoners are able to coordinate on uncountably many representatives, simply by agreeing on a function (f(x) = x mod 1) which takes each real to the representative for its class. A function f like this is called a reduction of ~ to =, as it converts the problem of deciding x ~ y into the problem of deciding if two real numbers are equal (in particular, f(x) = f(y)).

Now, is there a function f from 2 to 2 that takes an infinite binary sequence to the representative sequence for its class? That is, is there a reduction of E0 to the identity relation on 2? Sure! Each E0-class C is non-empty, so we can “make a choice” of any element γC ∈ C. Then set f(x) = γ[x], where [x] denotes the equivalence class of x.

I highlighted the key phrase in the above definition: make a choice. I said that we could choose an element from each class, but didn’t tell you how. And this is a problem for the prisoners! For them to all agree on the function’s values, they must be able to communicate how this choice is made to each other.

In the case of the equivalence relation ~, we were able to find a precise recipe for choosing representatives, namely the definition of the function (x ↦ x mod 1). But can the prisoners find a precise recipe for choosing representatives for the E0-classes?

That is, is there a definable function that reduces E0 to =? Well, what exactly is definability?

What is definability?

A major theme of descriptive set theory is the following identification, which I’d like to try to motivate:

DEFINABLE = BOREL

A definition is a syntactic thing. It’s a sentence with a free variable, like “x is the 15th digit in the decimal expansion of π” or “f is the identity function on ℝ”. To precisely state what definability is, we must specify a formal language to work in. The simplest logical language is that given by propositional logic. Here we begin with an alphabet, a countable set of basic atomic propositions, and build all other sentences through finite conjunctions, disjunctions, and negation. 

Returning to our puzzle, we were interested in describing 2 and its subsets. We want our atomic propositions to represent easily definable subsets of 2, or equivalently, simple properties of infinite binary sequences. A natural choice for these basic atomic properties is Pnm = “x’s nth bit is m”, interpreted as defining the set {x ∈ 2 | x’s nth bit is m}. Translated back to prisoners and hats, these are sentences like “Prisoner 35 is wearing a black hat” or “Prisoner 15 is wearing a white hat”. Intuitively, everything that can be said about infinite binary sequences, should be in principle expressible just in terms of sentences like these. 

With finite conjunctions, disjunctions, and negation, we can define sets like {x ∈ 2 | x starts with 010110} and {x ∈ 2 | x’s first two bits agree}. Identifying 0 with “left” and 1 with “right”, we can draw these sets as subsets of the infinite binary tree:

x starts with 010110
x’s first two bits agree

How about a set like {x ∈ 2 | x contains at least one 1}?

x contains at least one 1

What we want is a proposition like “x’s first bit is 0 or x’s second bit is 0 or …”, i.e. 

(P00 ∨ P10 ∨ P20 ∨ …), or \/n∈ℕ Pn,0

What we need is the ability to take countably infinite conjunctions and disjunctions. Ordinary propositional logic doesn’t allow this. So we graduate to countable propositional logic. In other words, we expand the syntax by closing it under countable conjunctions and disjunctions:

For any countable collection of sentences {φn | n ∈ ℕ},
/\n φn and \/n φn are also sentences

On the semantic side, our collection of definable sets is now closed under countable unions, intersections, and negations. For the measure theorist, this is a familiar object: we’ve just defined a sigma-algebra!

(Technical note: when we say “closed under countable unions and intersections”, we also include empty unions and intersections, which correspond to ∅ and X, respectively. For notational convenience, we introduce the symbols ⊥ and ⊤ into our syntax, thought of as the atomic propositions “False” and “True”.) 

In general there are many different sigma algebras you can put on a set, corresponding to different choices of the atomic propositions. But when our set is also a topological space, as in ℝ and 2, there’s a natural choice of sigma-algebra, called the Borel sigma-algebra. Here we take our atomic propositions to define the basic (or sub-basic) open sets. Then the Borel sets are all the sets constructible through countable unions and intersections from basic opens, or equivalently,  the sets definable in countable propositional logic.

In 2 the topology is generated by sets of the form

{x ∈ 2 | x’s nth bit is m} for any n, m ∈ ℕ,

which are the same as our earlier Pmn.

How about in ℝ? Here the topology is generated by basic sets of the form 

(a,b) = {x ∈ ℝ | a < x < b}  for any a, b ∈ ℚ

So we choose our atomic propositions accordingly: for any two rationals a,b, we have an atomic proposition Pab, which we interpret as “a < x < b”.

Let’s pause to recall how we got here. We began by trying to define “definability”, and have found that there’s a natural way to interpret countable propositional logic through Borel sigma algebras on topological spaces. We have an atomic proposition for each (sub-)basic open set, and every set is defined by some countable propositional sentence. As we vary our interpretation of the atomic propositions, we move between different topological spaces. 

The question “can the prisoners coordinate on a strategy?” has now taken on a definite form: “is there a Borel subset of 2 that picks exactly one element from each equivalence class?” And it turns out that the answer is no! For the prisoners to coordinate on a choice function, they need more syntactic resources at hand than countable propositional logic.

(To be continued…)

4 thoughts on “Choosing things is hard: infinite hats, definability, and topology

  1. I have always been troubled by this…

    In the construction of Cantor’s diagonal argument (the binary string version) it is my understanding that it is the AoC that justifies the assumption that each row identifies a unique binary string….that allows us to assume each row is a ‘completed infinity’.

    As I see it, that by its very nature assumes a 1-1 correspondence between the individual digits in the string and N (in the form of the powers of two corresponding to each digit).

    Now, the initial assumption, “assume we have a 1-1 correspondence between N and the set of all infinite binary strings”…looks identical to the previous assumption that there exists (by the AoC) a uniqueness that depends on the 1-1 correspondence between the digits of each individual row and N….it looks identical when one considers that the rows and columns are a mirror image of each other (in the sense that they consist of an assumed correspondence between elements in N and the set of infinite binary strings).

    Therefore, we end up in a self-cancelling circle akin to Russell’s paradox: the conclusion of the argument depends on the diagonal string whose n’th digit depends on the 1-1 correspondence across the ‘top’ while denying the very same correspondence ‘vertically’ on the left…but if one such correspondence fails then the n’th digit of each row and column are both likewise indeterminate along with the n’th digit of the diagonal string that “provides the contradiction”.

    It seems to me that Cantor’s ‘proof’ lies outside classical logic (it is squarely in the realm of a logic that does not assume the excluded middle) and as such offers information about the Continuum…just not what he (and most mathematicians, apparently) thought it does.

  2. The AoC is never necessary in this argument.
    Cantor’s diagonal argument works for any finite or countably infinite list, even those whose rows are not necessarily the same, so the rows need not be unique binary strings. The argument can be phrased as “given any countable list of infinite binary strings, an infinite binary string not on the list can be constructed, as follows…”.

    So we can then use his argument to show that the set of infinite binary strings is not countable:

    Suppose (for contradiction) that it were countable. (This assumption is made because, to prove the negation of some statement P, one assumes P and derives a contradiction: this is true even when the law of the excluded middle is not assumed, since that is how the negation of a statement is defined.)
    Then there would exist a countable list of all infinite binary strings.
    By the argument, there exists an infinite binary string not on this list.
    By assumption, this infinite binary string must be in the list of all infinite binary strings.
    The last two lines give a contradiction, so we are done.

    1. The axiom of choice is necessary to prove that there exists a transversal of E_0, i.e. a set containing exactly one “representative” from each eventual-equality class. Not the full strength of the axiom of choice, but certainly at least dependent choice. It is consistent with ZF that every subset of 2^w is Borel, but in ZF you can prove (proof at *) that there is no Borel transversal of E_0. So it’s consistent with ZF that E_0 has no transversal at all.

      * The standard argument is: Suppose that E_0 has a Borel transversal, call it T. Then you could partition 2^w into countably many Borel “translates” of T, where each “translation” is the result of flipping the bits at some fixed finite set of indices. But then each part of the partition would have some probability under the coin-flip measure u, and by translation-invariance of this measure, they would all have the SAME measure, namely u(T). But then we get that sum_{i in w} u(T) = 1, which is a contradiction.

  3. In reply to Anonymous:
    The very fact that you assume there exists a completed infinity is the very essence of the AoC… and the circularity of the argument. Those of us who choose to deny the excluded middle (along with predestination… fate… the Absolute…”a point outside the world”) and choose not to deny the role of time in the reality we live in, find the Cantorian argument about as valid as “Truth comes out of the barrel of a gun”.

Leave a Reply to squarishbracketCancel reply