Let be the set of all such that the th Turing machine halts. (For these puzzles, we will assume that Turing machines are always run on a blank initial state, i.e., they take no input.) Recall that is computably enumerable, but not decidable.

**Puzzle #1.** Describe a winning strategy for the following game: You are given three numbers . You must correctly say for each number whether or not it is in . You are allowed to ask (and receive a truthful answer to) two questions of the form “Is in K?” for any .

**Puzzle #2.** Show that there is *no* winning strategy for the game which is the same as that in Puzzle #1 except you are given two numbers and may ask only one question. (Even stronger, show that if is a set such that you *can* win that game, then must be decidable.)

These puzzles are special cases of more general questions answered in Terse sets, superterse sets, and verbose sets by Richard Beigel, William Gasarch, John Gill, and James Owings. I also suggest looking at Richard Beigel’s page of online papers, which has a lot of interesting stuff.

I read about this first in Piergiorgio Odifreddi’s book “Classical Recursion Theory, Volume 1.”

**Answer #1.** The first thing to do is to find out how many of are in . To do this, let be such that the th Turing machine simulates the th, th and th Turing machines in parallel, and halts after any two of them halt.

By asking if is in , you will find out either that there are two or more or that there are one or less of in . Use a similar second question to find out exactly how many of are in .

Once you know how many of are in , just run the th, th, and th Turing machines in parallel, and wait until all the ones that are going to halt do halt. Then you will know which of them are in .

**Answer #2**. Suppose that you have a winning strategy, and I’ll show how to compute . Let be the function which, given and , returns the guess for whether or not is in , supposing that you received a “no” answer to whatever question your strategy decided to ask. Similarly define , , and .

Either it is the case that for all there is a such that or it isn’t. Suppose first that it is. Then given , we may compute whether or not is in by searching for such a and computing (which equals ). This must be the correct guess since either “yes” or “no” must be the correct answer to whatever question the strategy asked.

Now suppose that there is an such that for all , . Since is just a single number, we can assume that we know whether or not it’s in . Then, given any , since we know which of them is correct, hence we know whether “yes” or “no” is the correct answer to the question that the strategy would pose. Hence we can compute its correct guess as to whether or not is in .

**Additional Results.** The paper linked above gives generalizations of both puzzles: You can find out whether any set of numbers is in by asking questions (by the same strategy of determining how many of them are in ), and, for any , if you can determine whether any set of numbers is in by asking questions then is decidable.

The authors call a set *verbose* if it is such that you can determine whether any set of numbers is in that set by asking questions. They call it *terse* if you need questions to determine whether or not numbers are in the set. They are show a number of interesting results about these, mainly along the lines that (very roughly) lots of both kinds exist, and in lots of different places.

You seem to switch from running Turing machines on their own codes as input in the posing of the puzzles to running Turing machines with no input in the solution – I assume that some sort of diagonalization or recursion theorem trickery means that this is an inessential point?

Also, it’s pretty funny that “Possible related posts” corrently includes “Strategies for Adjusting to Puberty?”

Whoops, thanks. I fixed it so that the Turing machines in the posing of the problem also take no input.

You’re right, though, it’s inessential: Let be the set of Turing machines which halt with no input (say they start on a blank tape or something) and be the set of Turing machines which halt when given their own code as put. Then there are computable functions and such that for all , iff and iff .

There’s not even really any fancy trickery going on here. Just let the th Turing machine erase whatever input its given and then simulate the th Turing machine, and let the th Turing machine first write on the input tape and then simulate the th Turing machine.