We can think of a computably enumerable (or c.e.) set as a bag which some computer program puts more and more numbers into over time. The set then consists of all numbers which are in the bag from some point on (i.e., the numbers which are eventually put in the bag by the program).
Suppose that we relax the restrictions on the program, and we allow it to take a number out of the bag that it has put in (but once the program has done that, the number stays out forever). We call the set of numbers which are in the bag from some point on (i.e., the set of numbers which are put in the bag and never taken out) in a procedure of this sort a 2-c.e. set.
We can analogously let an -c.e. set be one given by a program which can, for each number, “toggle” that number’s status up to and including
times if it likes.
The puzzle is then to find, for each , an example of a set which is
-c.e. but not
-c.e.
Here is an example of a set which is -c.e. but not
-c.e.: The program simulates all Turing machines simultaneously (by dovetailing, this can still be done with a finite algorithm).
For each it does the following: If the
th Turing machine halts, it puts
in the bag. In this case, the program also checks to see what number the
th Turing machine output when it halted; call it
. If eventually the
th Turing machine halts, the program takes
out of the bag. In this case, the program also checks to see what number the
th Turing machine output when it halted; call it
. If eventually the
th Turing machine halts, the program puts
back in the bag. And so on, up to a maximum of
times.
Call that set . Clearly it’s
-c.e. We have to show that it’s not
-c.e.
First observe that each is complete with respect to
-c.e. sets. This means that if
is
-c.e., then there is a computable function
such that
iff
for all
.
Now observe that if is
-c.e., then its complement
is
-c.e. We can find an
-c.e. presentation of
by letting our computer program start by putting all numbers in the bag and then doing the opposite of what the
-c.e. presentation of
does.
Combining these two observations, there is a computable function such that for all
,
iff
. By Kleene’s Fixed Point Theorem (also known as Kleene’s Recursion Theorem), there is an
such the
th Turing machine behaves the same as the
th Turing machine. For this particular
we then have that
iff
, which is a contradiction.