Paper 1, Section II, F

Automata and Formal Languages
Part II, 2020

(a) Define a register machine, a sequence of instructions for a register machine and a partial computable function. How do we encode a register machine?

(b) What is a partial recursive function? Show that a partial computable function is partial recursive. [You may assume that for a given machine with a given number of inputs, the function outputting its state in terms of the inputs and the time tt is recursive.]

(c) (i) Let g:NNg: \mathbb{N} \rightarrow \mathbb{N} be the partial function defined as follows: if nn codes a register machine and the ensuing partial function fn,1f_{n, 1} is defined at nn, set g(n)=fn,1(n)+1g(n)=f_{n, 1}(n)+1. Otherwise set g(n)=0g(n)=0. Is gg a partial computable function?

(ii) Let h:NNh: \mathbb{N} \rightarrow \mathbb{N} be the partial function defined as follows: if nn codes a register machine and the ensuing partial function fn,1f_{n, 1} is defined at nn, set h(n)=fn,1(n)+1h(n)=f_{n, 1}(n)+1. Otherwise, set h(n)=0h(n)=0 if nn is odd and let h(n)h(n) be undefined if nn is even. Is hh a partial computable function?