4. (a) Define what it means for a set $X \subseteq \mathbb{N}$ to be semi-decidable, and to be
co-semi-decidable.
(b) If X is both semi-decidable and co-semi-decidable, what can you infer about
X?
(c) Let $L_0$ be the set of register machines M that loop on input zero. Prove, by
constructing a suitable recognizing machine, that $L_0$ is co-semi-decidable.
You may describe your machine in high-level pseudo-code.
(d) Let L be the set of (register machine, input) pairs $(M, n)$ such that M loops
on input n. Construct many-one reductions from $L_0$ to L and from L to
$L_0$, showing that they are reductions.
(e) Let T be the set of triples $(M, m, n)$ such that either M does not halt on
input m, or M halts on input m, and also halts on input n in strictly less
time than on m. Is the set T decidable, semi-decidable, co-semi-decidable,
or none of these? Justify your answer.