Paper 2, Section I, H

Automata and Formal Languages
Part II, 2019

(a) Define a recursive set and a recursively enumerable (r.e.) set. Prove that EN0E \subseteq \mathbb{N}_{0} is recursive if and only if both EE and N0\E\mathbb{N}_{0} \backslash E are r.e. sets.

(b) Let E={fn,k(m1,,mk)(m1,,mk)N0k}E=\left\{f_{n, k}\left(m_{1}, \ldots, m_{k}\right) \mid\left(m_{1}, \ldots, m_{k}\right) \in \mathbb{N}_{0}^{k}\right\} for some fixed k1k \geqslant 1 and some fixed register machine code nn. Show that E={mN0fj,1(m)}E=\left\{m \in \mathbb{N}_{0} \mid f_{j, 1}(m) \downarrow\right\} for some fixed register machine code jj. Hence show that EE is an r.e. set.

(c) Show that the function f:N0N0f: \mathbb{N}_{0} \rightarrow \mathbb{N}_{0} defined below is primitive recursive.

f(n)={n1 if n>00 if n=0f(n)= \begin{cases}n-1 & \text { if } n>0 \\ 0 & \text { if } n=0\end{cases}

[Any use of Church's thesis in your answers should be explicitly stated. In this question N0\mathbb{N}_{0} denotes the set of non-negative integers.]