Part III

Part III. Theory of Algorithms

[160/85%]
Show
LaTeX
Problem III.1.1

Prove that every primitive recursive function is everywhere defined.

?
Problem III.1.2

Prove that if the function fn(x1,…,xn)f^{n}(x_{1}, \ldots , x_{n}) is primitive recursive, then the following functions are primitive recursive:

?
(a)

f1(x1,x2,…,xn)=f(x2,x1,…,xn)f_{1}(x_{1}, x_{2}, \ldots , x_{n}) = f(x_{2}, x_{1}, \ldots , x_{n}) (permutation of arguments);

(b)

f2(x1,x2,…,xn)=f(x2,…,xn,x1)f_{2}(x_{1}, x_{2}, \ldots , x_{n}) = f(x_{2}, \ldots , x_{n}, x_{1}) (cyclic permutation of arguments);

(c)

f3(x1,…,xn,xn+1)=f(x1,…,xn)f_{3}(x_{1}, \ldots , x_{n}, x_{n+1}) = f(x_{1}, \ldots , x_{n}) (introduction of a dummy argument);

(d)

f4(x1,…,xn−1)=f(x1,x1,…,xn−1)f_{4}(x_{1}, \ldots , x_{n-1}) = f(x_{1}, x_{1}, \ldots , x_{n-1}) (identification of arguments).

Problem III.1.3

Which functions are obtained from the simplest functions using superpositions alone?

?
Problem III.1.4

Prove that the functions x+1x+1 and 2x2x cannot be obtained from o1o^{1} and ImnI_{m}^{n} using superpositions and primitive recursion schemes.

?
Problem III.1.5

Prove that the following functions are primitive recursive:

?
(a)

f(x)=x+nf(x) = x + n;

(b)

f(x)=nf(x) = n;

(c)

f(x,y)=x+yf(x, y) = x + y;

(d)

f(x,y)=x⋅yf(x, y) = x \cdot y;

(e)

f(x,y)=xyf(x, y) = x^{y} (here 00=10^{0} = 1);

(f)

f(x,y)=x!f(x, y) = x! (here 0!=10! = 1).

Problem III.1.6

Which function is obtained from gg and hh by means of the primitive recursion scheme:

?
(a)

g(x)=xg(x) = x, h(x,y,z)=zxh(x, y, z) = z^{x};

(b)

g(x)=xg(x) = x, h(x,y,z)=xzh(x, y, z) = x^{z}?

Problem III.1.7

Prove that the following functions are primitive recursive:

?
(a)

sg⁡(x)={0,if x=0,1,if x>0;\operatorname {sg}(x) = \begin{cases} 0, & \text{if } x = 0, \\ 1, & \text{if } x > 0; \end{cases}

(b)

sg⁡‾(x)={0,if x>0,1,if x=0;\overline{\operatorname {sg}}(x) = \begin{cases} 0, & \text{if } x > 0, \\ 1, & \text{if } x = 0; \end{cases}

(c)

x\symdiff1={0,if x=0,x−1,if x>0;x \symdiff 1 = \begin{cases} 0, & \text{if } x = 0, \\ x - 1, & \text{if } x > 0; \end{cases}

(d)

x\symdiffy={0,if x≤y,x−y,if x>y;x \symdiff y = \begin{cases} 0, & \text{if } x \leq y, \\ x - y, & \text{if } x > y; \end{cases}

(e)

∣x−y∣\left|x - y\right|;

(f)

max⁡(x,y)\max (x, y);

(g)

min⁡(x,y)\min (x, y).

Problem III.1.8

Prove the following identities:

?
(a)

x\symdiffy=s(x)\symdiffs(y)x \symdiff y = s(x) \symdiff s(y);

(b)

x+(y\symdiffx)=y+(x\symdiffy)x + (y \symdiff x) = y + (x \symdiff y);

(c)

x\symdiff(y+z)=(x\symdiffy)\symdiffzx \symdiff (y+z) = (x \symdiff y) \symdiff z;

(d)

(x\symdiffy)\symdiffz=(x\symdiffz)\symdiffy(x \symdiff y) \symdiff z = (x \symdiff z) \symdiff y.

Problem III.1.9

Let gn+1,αm,βmg^{n+1}, \alpha^{m}, \beta^{m} be primitive recursive functions. Prove that the following functions are primitive recursive:

?
(a)

fn+1(x1,…,xn,xn+1)=∑i=0xn+1g(x1,…,xn,i)f^{n+1}(x_{1}, \ldots , x_{n}, x_{n+1}) = \displaystyle \sum_{i=0}^{x_{n+1}} g(x_{1}, \ldots , x_{n}, i);

(b)

fn+2(x1,…,xn,y,z)={∑i=yzg(x1,…,xn,i),if y≤z,0,if y>z;f^{n+2}(x_{1}, \ldots , x_{n}, y, z) = \begin{cases} \displaystyle \sum_{i=y}^{z} g(x_{1}, \ldots , x_{n}, i), & \text{if } y \leq z, \\ 0, & \text{if } y > z; \end{cases}

(c)

fn+m(x1,…,xn,y1,…,ym)={∑i=α(y1,…,ym)β(y1,…,ym)g(x1,…,xn,i),if α(y1,…,ym)≤β(y1,…,ym),0,otherwise;f^{n+m}(x_{1}, \ldots , x_{n}, y_{1}, \ldots , y_{m}) = \begin{cases} \displaystyle \sum_{i=\alpha (y_{1}, \ldots , y_{m})}^{\beta (y_{1}, \ldots , y_{m})} g(x_{1}, \ldots , x_{n}, i), & \text{if } \alpha (y_{1}, \ldots , y_{m}) \leq \beta (y_{1}, \ldots , y_{m}), \\ 0, & \text{otherwise;} \end{cases}

(d)

fn+1(x1,…,xn,xn+1)=∏i=0xn+1g(x1,…,xn,i)f^{n+1}(x_{1}, \ldots , x_{n}, x_{n+1}) = \displaystyle \prod_{i=0}^{x_{n+1}} g(x_{1}, \ldots , x_{n}, i);

(e)

fn+2(x1,…,xn,y,z)={∏i=yzg(x1,…,xn,i),if y≤z,0,if y>z;f^{n+2}(x_{1}, \ldots , x_{n}, y, z) = \begin{cases} \displaystyle \prod_{i=y}^{z} g(x_{1}, \ldots , x_{n}, i), & \text{if } y \leq z, \\ 0, & \text{if } y > z; \end{cases}

(f)

fn+m(x1,…,xn,y1,…,ym)={∏i=α(y1,…,ym)β(y1,…,ym)g(x1,…,xn,i),if α(y1,…,ym)≤β(y1,…,ym),0,otherwise.f^{n+m}(x_{1}, \ldots , x_{n}, y_{1}, \ldots , y_{m}) = \begin{cases} \displaystyle \prod_{i=\alpha (y_{1}, \ldots , y_{m})}^{\beta (y_{1}, \ldots , y_{m})} g(x_{1}, \ldots , x_{n}, i), & \text{if } \alpha (y_{1}, \ldots , y_{m}) \leq \beta (y_{1}, \ldots , y_{m}), \\ 0, & \text{otherwise.} \end{cases}

Problem III.1.10

Prove that if ff is obtained from primitive recursive functions gg and hh by means of the bounded μ\mu-operator, then ff is primitive recursive.

?
Problem III.1.11

Let the functions f0n,f1n,…,fsnf_{0}^{n}, f_{1}^{n}, \ldots , f_{s}^{n} have the following property: for any natural values x1,…,xnx_{1}, \ldots , x_{n}, one and only one of these functions equals 00. We say that the function gng^{n} is defined by cases, if

gn(x1,…,xn)={h0n(x1,…,xn),if f0n(x1,…,xn)=0,\makebox[0pt][l]\dotfillhsn(x1,…,xn),if fsn(x1,…,xn)=0. g^{n}(x_{1}, \ldots , x_{n}) = \begin{cases} h_{0}^{n}(x_{1}, \ldots , x_{n}), & \text{if } f_{0}^{n}(x_{1}, \ldots , x_{n}) = 0, \\ \makebox[0pt][l]{\dotfill } \\ h_{s}^{n}(x_{1}, \ldots , x_{n}), & \text{if } f_{s}^{n}(x_{1}, \ldots , x_{n}) = 0. \end{cases}

Prove that if the functions h0n,…,hsn,f0n,…,fsnh_{0}^{n}, \ldots , h_{s}^{n}, f_{0}^{n}, \ldots , f_{s}^{n} are primitive recursive, then gng^{n} is primitive recursive.

?
Problem III.1.12
(a)
(b)
(c)
(d)
(e)
(f)
(g)
(h)
(i)
(j)
(k)
(l)
(m)
(n)
(o)
(p)
(q)
Problem III.1.13
?
(a)

Prove that the function

c(x,y)=(x+y)2+3x+y2 c(x, y) = \frac{(x+y)^{2} + 3x + y}{2}

(the Cantor pairing function) is a bijection between N2\mathbb {N}^{2} and N\mathbb {N} (i.e., it numbers pairs of natural numbers).

(b)

Let l(x)l(x) and r(x)r(x) be such that

c(l(x),r(x))=x. c(l(x), r(x)) = x.

Prove that l(x)l(x) and r(x)r(x) are primitive recursive and l(c(x,y))=xl(c(x, y)) = x, r(c(x,y))=yr(c(x, y)) = y.

Problem III.1.14

For each n≥1n \geq 1 define the functions

c1(x1)=x1,cn+1(x1,x2,x3,…,xn+1)=cn(c(x1,x2),x3,…,xn+1) c^{1}(x_{1}) = x_{1}, \qquad c^{n+1}(x_{1}, x_{2}, x_{3}, \ldots , x_{n+1}) = c^{n}(c(x_{1}, x_{2}), x_{3}, \ldots , x_{n+1})

(see problem III.1.13).

Let cinc_{i}^{n} (1≤i≤n1 \leq i \leq n) be such that cn(c1n(x),…,cnn(x))=xc^{n}(c_{1}^{n}(x), \ldots , c_{n}^{n}(x)) = x.

?
(a)

Prove the identities

cin(cn(x1,…,xn))=xi for 1≤i≤n. c_{i}^{n}(c^{n}(x_{1}, \ldots , x_{n})) = x_{i} \ \text{for } 1 \leq i \leq n.
(b)

Prove that the functions cnc^{n} and cinc_{i}^{n} are primitive recursive.

(c)

Prove that the functions cn(x1,…,xn)c^{n}(x_{1}, \ldots , x_{n}) are bijections between Nn\mathbb {N}^{n} and N\mathbb {N} (i.e., they number nn-tuples of natural numbers).

Problem III.1.15

How can all partial recursive functions be obtained from one-place partial recursive functions and the functions cn(x1,…,xn)c^{n}(x_{1}, \ldots , x_{n})?

?
Problem III.1.16

Call a one-place function f(x)f(x) a function of large spread, if it takes on every natural number as its value infinitely many times.

?
(a)

Let the pair of functions ⟨f1(x),f2(x)⟩\langle f_{1}(x), f_{2}(x) \rangle map N\mathbb {N} onto N2\mathbb {N}^{2}. Prove that f1(x)f_{1}(x) and f2(x)f_{2}(x) are functions of large spread.

(b)

Let f1(x)f_{1}(x) be an arbitrary primitive recursive function of large spread. Construct a primitive recursive function f2(x)f_{2}(x) so that the functions f1(x)f_{1}(x) and f2(x)f_{2}(x) form a bijection between N\mathbb {N} and N2\mathbb {N}^{2}.

Problem III.1.17

Consider the Godel function

β(x,y,z)=rest⁡(x,1+y(z+1)). \beta (x, y, z) = \operatorname {rest}(x, 1 + y(z+1)).

Prove that, whatever the finite sequence of natural numbers a1,…,ana_{1}, \ldots , a_{n} may be, the system of equations

{β(x,y,0)=α0,\makebox[0pt][l]\dotfillβ(x,y,n)=αn, \begin{cases} \beta (x, y, 0) = \alpha _{0}, \\ \makebox[0pt][l]{\dotfill } \\ \beta (x, y, n) = \alpha _{n}, \end{cases}

has at least one solution x,yx, y.

?
Problem III.1.18

Prove that if the functions g,h,t1,…,tsg, h, t_{1}, \ldots , t_{s} are primitive recursive and ff is obtained from them by course-of-values recursion with delays, then the function ff is primitive recursive.

?
Problem III.1.19

Prove that the function enumerating the Fibonacci numbers in order:

{f(0)=0,f(1)=1,f(n+2)=f(n)+f(n+1), \begin{cases} f(0) = 0, \quad f(1) = 1, \\ f(n+2) = f(n) + f(n+1), \end{cases}

is primitive recursive.

?
Problem III.1.20

Let the functions ff and gg be defined as follows:

{f(0)=a,g(0)=b,f(x+1)=h1(x,f(x),g(x)),g(x+1)=h2(x,f(x),g(x)). \begin{cases} f(0) = a, \quad g(0) = b, \\ f(x+1) = h_{1}(x, f(x), g(x)), \\ g(x+1) = h_{2}(x, f(x), g(x)). \end{cases}

Prove that if the functions h1h_{1} and h2h_{2} are primitive recursive, then the functions ff and gg are primitive recursive.

?
Problem III.1.21

Let f1n+1,…,fkn+1f_{1}^{n+1}, \ldots , f_{k}^{n+1} be defined by means of simultaneous recursion:

{fin+1(x1,…,xn,0)=gin(x1,…,xn),fin+1(x1,…,xn,y+1)=fin+1(x1,…,xn,y+1)= hin+k+1(x1,…,xn,y,f1(x1,…,xn,y),…,fk(x1,…,xn,y)) \begin{cases} f_{i}^{n+1}(x_{1}, \ldots , x_{n}, 0) = g_{i}^{n}(x_{1}, \ldots , x_{n}), \\ f_{i}^{n+1}(x_{1}, \ldots , x_{n}, y+1) = \\ \hphantom {f_{i}^{n+1}(x_{1}, \ldots , x_{n}, y+1) =} \, h_{i}^{n+k+1}(x_{1}, \ldots , x_{n}, y, f_{1}(x_{1}, \ldots , x_{n}, y), \ldots , f_{k}(x_{1}, \ldots , x_{n}, y)) \end{cases}

for all 1≤i≤k1 \leq i \leq k.

Prove that if the functions g1,…,gk,h1,…,hkg_{1}, \ldots , g_{k}, h_{1}, \ldots , h_{k} are primitive recursive, then the functions f1,…,fkf_{1}, \ldots , f_{k} are primitive recursive.

?
Problem III.1.22

Prove that every primitive recursive function is general recursive.

?
Problem III.1.23
?
(a)

Prove that the superposition of general recursive functions is a general recursive function.

(b)

Prove that applying the primitive recursion operator to general recursive functions yields a general recursive function.

(c)

Give an example of a general recursive function from which the μ\mu-operator yields a function that is not general recursive.

Problem III.1.24

Prove that if the function f(x1,…,xn)f(x_{1}, \ldots , x_{n}) is partial recursive, then the following functions are partial recursive:

?
(a)

f1(x1,x2,…,xn)=f(x2,x1,…,xn)f_{1}(x_{1}, x_{2}, \ldots , x_{n}) = f(x_{2}, x_{1}, \ldots , x_{n}) (permutation of arguments);

(b)

f2(x1,x2,…,xn)=f(x2,…,xn,x1)f_{2}(x_{1}, x_{2}, \ldots , x_{n}) = f(x_{2}, \ldots , x_{n}, x_{1}) (cyclic permutation of arguments);

(c)

f3(x1,…,xn,xn+1)=f(x1,…,xn)f_{3}(x_{1}, \ldots , x_{n}, x_{n+1}) = f(x_{1}, \ldots , x_{n}) (introduction of a dummy argument);

(d)

f4(x1,…,xn−1)=f(x1,x1,…,xn−1)f_{4}(x_{1}, \ldots , x_{n-1}) = f(x_{1}, x_{1}, \ldots , x_{n-1}) (identification of arguments).

Problem III.1.25

Prove that:

?
(a)

there are exactly ℵ0\aleph_{0} partial recursive functions;

(b)

there is a partial numerical function that is not partial recursive;

(c)

there is an everywhere defined numerical function that is not general recursive.

Problem III.1.26

Prove that the following functions are partial recursive:

?
(a)

the nowhere defined function ω\omega, i.e., the function ω\omega with empty domain of definition;

(b)

f(x,y)={x−y,if x≥y,undefined otherwise;f(x, y) = \begin{cases} x - y, & \text{if } x \geq y, \\ \text{undefined otherwise}; \end{cases}

(c)

f(x,y)={xy,if y divides x,undefined otherwise;f(x, y) = \begin{cases} \dfrac {x}{y}, & \text{if } y \text{ divides } x, \\ \text{undefined otherwise}; \end{cases}

(d)

f(x,y)={z,if zy=x,undefined otherwise;f(x, y) = \begin{cases} z, & \text{if } z^{y} = x, \\ \text{undefined otherwise}; \end{cases}

(e)

a function defined at finitely many points.

Problem III.1.27

Prove that if the functions gn+1,hn+1g^{n+1}, h^{n+1}, and tn+1t^{n+1} are partial recursive, then the following functions are partial recursive:

?
(a)

μy[g(x1,…,xn,y)=h(x1,…,xn,y)]\mu y \left[g(x_{1}, \ldots , x_{n}, y) = h(x_{1}, \ldots , x_{n}, y)\right];

(b)

μy[g(x1,…,xn,y)≠h(x1,…,xn,y)]\mu y \left[g(x_{1}, \ldots , x_{n}, y) \neq h(x_{1}, \ldots , x_{n}, y)\right];

(c)

μy[g(x1,…,xn,y)≤h(x1,…,xn,y)]\mu y \left[g(x_{1}, \ldots , x_{n}, y) \leq h(x_{1}, \ldots , x_{n}, y)\right];

(d)

μy[g(x1,…,xn,y)<h(x1,…,xn,y)]\mu y \left[g(x_{1}, \ldots , x_{n}, y) < h(x_{1}, \ldots , x_{n}, y)\right];

(e)

μy[g(x1,…,xn,y)=0 and h(x1,…,xn,y)=0]\mu y \left[g(x_{1}, \ldots , x_{n}, y) = 0 \text{ and } h(x_{1}, \ldots , x_{n}, y) = 0\right];

(f)

μy[g(x1,…,xn,y)=0 or h(x1,…,xn,y)≤t(x1,…,xn,y)]\mu y \left[g(x_{1}, \ldots , x_{n}, y) = 0 \text{ or } h(x_{1}, \ldots , x_{n}, y) \leq t(x_{1}, \ldots , x_{n}, y)\right].

Problem III.1.28
?
(a)

Prove that the function fn+1f^{n+1}, arising from the partial functions gng^{n} and hn+2h^{n+2} by means of the primitive recursion operator, can be obtained by means of a special recursion of the form:

{F(x,0)=x,F(x,y+1)=G(F(x,y)) \begin{cases} F(x, 0) = x, \\ F(x, y+1) = G(F(x, y)) \end{cases}

and superpositions from the functions gn,hn+2,o,s,Imng^{n}, h^{n+2}, o, s, I_{m}^{n} and c,l,rc, l, r from problem III.1.13.

(b)

Prove that the function f(x)f(x), obtained from aa and h(x,y)h(x, y) by means of the primitive recursion operator, can be obtained by means of iteration and superpositions from the functions a,h,o,s,Imna, h, o, s, I_{m}^{n} and c,l,rc, l, r from problem III.1.13.

Problem III.1.29

Prove that the function fnf^{n}, obtained from the partial function gn+1g^{n+1} by means of the μ\mu-operator, can be obtained from the functions g,Imng, I_{m}^{n} and c,l,rc, l, r from problem III.1.13 by means of superpositions and a μ\mu-operator of the special form.

F(x)=μy[G(x,y)=0]. F(x) = \mu y \left[G(x, y) = 0\right].
?
Problem III.1.30

Prove that the function fn+1f^{n+1}, obtained by means of the primitive recursion operator from everywhere defined functions gng^{n} and hn+2h^{n+2}, can be obtained from these functions and the functions +,\symdiff,s,o,Imn+, \symdiff , s, o, I_{m}^{n} and c,l,r,βc, l, r, \beta from problems III.1.13, III.1.17, by means of superpositions and a μ\mu-operator of the special form from problem III.1.29.

?
Problem III.1.31
?
(a)

Let 2=a0,a1a2,…\sqrt{2} = a_{0}, a_{1}a_{2}, \ldots be the expansion of the number 2\sqrt{2} as an infinite decimal fraction. Prove that the function ana_{n} is general recursive.

(b)

Let e=a0,a1a2,…e = a_{0}, a_{1}a_{2}, \ldots be the expansion of the number ee as an infinite decimal fraction. Prove that the function ana_{n} is general recursive.

(c)

Let π=a0,a1a2,…\pi = a_{0}, a_{1}a_{2}, \ldots be the expansion of the number π\pi as an infinite decimal fraction. Prove that the function ana_{n} is general recursive.

Problem III.1.32

Let α=a0,a1a2,…\alpha = a_{0}, a_{1}a_{2}, \ldots be the expansion of the real number α\alpha as an infinite decimal fraction. Call the number α\alpha general recursive (constructive), if ana_{n} is a general recursive function of nn. Prove that algebraic numbers are general recursive.

?
Problem III.1.33

Prove that:

?
(a)

i(ax+b)=b⋅ax−1a−1\mathbf{i}(ax+b) = b \cdot \dfrac {a^{x} - 1}{a - 1} for a>1a > 1;

(b)

i(1+[x2])=sg⁡x\mathbf{i}\left(1 + \left[\dfrac {x}{2}\right]\right) = \operatorname {sg} x;

(c)

i(x+1+[x+12]−[x2])=2x\symdiff1\mathbf{i}\left(x + 1 + \left[\dfrac {x+1}{2}\right] - \left[\dfrac {x}{2}\right]\right) = 2x \symdiff 1;

(d)

i(sg⁡‾ x+2x)=2x−1\symdiffsg⁡‾ x\mathbf{i}(\overline{\operatorname {sg}}\, x + 2x) = 2^{x-1} \symdiff \overline{\operatorname {sg}}\, x;

(e)

i(x+1+4x+1)=x2+x\mathbf{i}(x + 1 + \sqrt{4x+1}) = x^{2} + x;

(f)

i(x+1+2[x])=x2\mathbf{i}\left(x + 1 + 2\left[\sqrt{x}\right]\right) = x^{2}.

Problem III.1.34
(a)
(b)
(c)
(d)
(e)
(f)
(g)
(h)
(i)
(j)
(k)
(l)
(m)
Problem III.1.35

Prove that every primitive recursive function can be obtained from the functions s(x)=x+1s(x) = x+1 and q(x)=x\symdiff[x]2q(x) = x \symdiff \left[\sqrt{x}\right]^{2} by means of the operations of substitution, iteration, and addition of two functions (R. Robinson's theorem).

?
Problem III.1.36

Prove that:

?
(a)

I11(f(x))=f(I11(x))=f(f−1(f(x)))=f(x)I_{1}^{1}(f(x)) = f(I_{1}^{1}(x)) = f(f^{-1}(f(x))) = f(x);

(b)

f−1(f(f−1(x)))=f−1(x)f^{-1}(f(f^{-1}(x))) = f^{-1}(x).

Problem III.1.37

Prove that:

?
(a)

if f−1(x)f^{-1}(x) is defined at some point aa, then

f(f−1(a))=a; f(f^{-1}(a)) = a;
(b)

if f−1(x)f^{-1}(x) is everywhere defined, then

f(f−1(x))=I11(x); f(f^{-1}(x)) = I_{1}^{1}(x);
(c)

there exists f(x)f(x) such that f−1(x)f^{-1}(x) is everywhere defined, but

f−1(f(x))≠I11(x). f^{-1}(f(x)) \neq I_{1}^{1}(x).
Problem III.1.38
(a)
(b)
(c)
(d)
(e)
(f)
(g)
(h)
(i)
(j)
Problem III.1.39
(a)
(b)
(c)
(d)
(e)
(f)
(g)
(h)
(i)
(j)
(k)
(l)
(m)
Problem III.1.40

Let f(x)=μy[h(x,y)=0]f(x) = \mu y \left[h(x, y) = 0\right]. Prove that f(x)f(x) can be obtained from h,s(x)=x+1h, s(x) = x+1, and q(x)=x\symdiff[x]2q(x) = x \symdiff \left[\sqrt{x}\right]^{2} by means of the operations of substitution, inversion, and addition of two functions.

?
Problem III.1.41

Prove that every partial recursive function can be obtained from s(x)=x+1s(x) = x+1, q(x)=x\symdiff[x]2q(x) = x \symdiff \left[\sqrt{x}\right]^{2} by means of the operations of substitution, inversion, and addition of two functions (Yu. Robinson's theorem).

?
Problem III.1.42

Consider the following Ackermann functions:

B(0,y)=2+y;B(x+1,0)=sg⁡x;B(x+1,y+1)=B(x,B(x+1,y));A(x)=B(x,x). B(0, y) = 2+y; \qquad B(x+1, 0) = \operatorname {sg} x; \qquad B(x+1, y+1) = B(x, B(x+1, y)); \qquad A(x) = B(x, x).

Call an everywhere defined function f(x1,…,xn)f(x_{1}, \ldots , x_{n}) BB-majorized, if there is a natural number mm such that

f(x1,…,xn)<B(m,max⁡(x1,…,xn)+3). f(x_{1}, \ldots , x_{n}) < B(m, \max (x_{1}, \ldots , x_{n}) + 3).

Prove that:

?
(a)

B(x,y)B(x, y) and A(x)A(x) are general recursive;

(b)

B(n+2,x+1)≥2x+1B(n+2, x+1) \geq 2^{x+1};

(c)

B(n+1,x+2)≥B(n+1,x+1)B(n+1, x+2) \geq B(n+1, x+1);

(d)

B(n+2,x+3)≥B(n+1,x+4)B(n+2, x+3) \geq B(n+1, x+4);

(e)

the simplest functions are BB-majorized;

(f)

a function obtained by means of superposition from BB-majorized functions is BB-majorized;

(g)

a function obtained by means of primitive recursion from BB-majorized functions is BB-majorized;

(h)

the function AA is not primitive recursive.

Problem III.1.43

Prove that there is no primitive recursive function universal for the family of all nn-ary primitive recursive functions.

?
Problem III.1.44

Prove that there is no partial recursive function universal for the family of all nn-ary general recursive functions.

?
Problem III.2.1

Which function f(x)f(x) is computed by the machine TT with the following program of commands:

q10→q20R,q11→q01,q20→q01,q21→q21R ? q_{1}0 \to q_{2}0R, \qquad q_{1}1 \to q_{0}1, \qquad q_{2}0 \to q_{0}1, \qquad q_{2}1 \to q_{2}1R \, ?
?
Problem III.2.2

Let the machine TT have the following program:

q10→q00. q_{1}0 \to q_{0}0.

Which functions f1(x),f2(x1,x2),…,fn(x1,…,xn),…f_{1}(x), f_{2}(x_{1}, x_{2}), \ldots , f_{n}(x_{1}, \ldots , x_{n}), \ldots does this machine compute?

?
Problem III.2.3

Construct a Turing machine that correctly computes the function f(x)=x+1f(x) = x+1.

?
Problem III.2.4

Construct a Turing machine that correctly computes the function o(x)=0o(x) = 0.

?
Problem III.2.5

Construct the following Turing machines:

  1. Zero transfer: q1001x0∣⇒Aq001x00q_{1}001^{x}0 \mid \Rightarrow_{A} q_{0}01^{x}00.

  2. Right shift: q1001x0∣⇒B+01xq00q_{1}001^{x}0 \mid \Rightarrow_{B^{+}} 01^{x}q_{0}0.

  3. Left shift: 01xq10∣⇒B−q001x001^{x}q_{1}0 \mid \Rightarrow_{B^{-}} q_{0}01^{x}0.

  4. Transposition: 01xq101y0∣⇒C01yq001x001^{x}q_{1}01^{y}0 \mid \Rightarrow_{C} 01^{y}q_{0}01^{x}0.

  5. Doubling: q101x0⇒Dq001x01x0q_{1}01^{x}0 \Rightarrow_{D} q_{0}01^{x}01^{x}0.

  6. Cyclic shift: q101x101x2…01xn0∣⇒Cynq001x2…01xn01x10q_{1}01^{x_{1}}01^{x_{2}}\ldots 01^{x_{n}}0 \mid \Rightarrow_{\text{Cy}_{n}} q_{0}01^{x_{2}}\ldots 01^{x_{n}}01^{x_{1}}0.

  7. Copying: q101x1…01xn0⇒Cpnq001x1…01xn01x1…01xn0q_{1}01^{x_{1}}\ldots 01^{x_{n}}0 \Rightarrow_{\text{Cp}_{n}} q_{0}01^{x_{1}}\ldots 01^{x_{n}}01^{x_{1}}\ldots 01^{x_{n}}0.

?
Problem III.2.6

Construct a Turing machine that correctly computes the function Imn(x1,…,xn)I_{m}^{n}(x_{1}, \ldots , x_{n}) (where 1≤m≤n1 \leq m \leq n).

?
Problem III.2.7
?
(a)

Let the functions f(x)f(x) and g(x)g(x) be correctly Turing computable. Show that the function h(x)=f(g(x))h(x) = f(g(x)) is correctly Turing computable.

(b)

Let the functions f(x1,…,xn)f(x_{1}, \ldots , x_{n}) and g1(x1,…,xm),…,gn(x1,…,xm)g_{1}(x_{1}, \ldots , x_{m}), \ldots , g_{n}(x_{1}, \ldots , x_{m}) be correctly Turing computable. Show that the function h(x1,…,xn)=f(g1(x1,…,xm),…,gn(x1,…,xm))h(x_{1}, \ldots , x_{n}) = f(g_{1}(x_{1}, \ldots , x_{m}), \ldots , g_{n}(x_{1}, \ldots , x_{m})) is correctly Turing computable.

Problem III.2.8

Construct a Turing machine for the correct computation of the functions:

?
(a)

x+yx+y;

(b)

x\symdiff1x \symdiff 1;

(c)

sg⁡(x)\operatorname {sg}(x);

(d)

sg⁡‾(x)\overline{\operatorname {sg}}(x);

(e)

x\symdiffyx \symdiff y;

(f)

x−yx - y;

(g)

x2\dfrac {x}{2};

(h)

[x2]\left[\dfrac {x}{2}\right].

Problem III.2.9

Prove that:

?
(a)

if the function fn+1f^{n+1} is obtained from correctly Turing computable functions gng^{n} and hn+2h^{n+2} by means of primitive recursion, then fn+1f^{n+1} is correctly Turing computable;

(b)

if the function fnf^{n} is obtained from a correctly Turing computable function gn+1g^{n+1} by means of the μ\mu-operator, then fnf^{n} is correctly Turing computable.

Problem III.2.10

Prove that every partial recursive function is correctly Turing computable.

?
Problem III.2.11

Prove that there exist primitive recursive functions α,β,γ\alpha , \beta , \gamma such that:

?
(a)

α(x,y)=λ(T1⋅T2)\alpha (x, y) = \lambda (T_{1} \cdot T_{2}), if λ(T1)=x\lambda (T_{1}) = x and λ(T2)=y\lambda (T_{2}) = y;

(b)

β(x)=λ(T)\beta (x) = \lambda (T) for some machine TT that transforms the word q10q_{1}0 into the word q101x0q_{1}01^{x}0;

(c)

γ(x,y,z)=λ(T1{qi=T2qj=T3)\gamma (x, y, z) = \lambda \left(T_{1}\begin{cases} q_{i} = T_{2} \\ q_{j} = T_{3} \end{cases}\right), if λ(T1)=x\lambda (T_{1}) = x, λ(T2)=y\lambda (T_{2}) = y, λ(T3)=z\lambda (T_{3}) = z.

Problem III.2.12

Construct primitive recursive functions γn(x1,…,xn)\gamma^{n}(x_{1}, \ldots , x_{n}) such that

ν(q101x1…01xn0)=γn(x1,…,xn). \nu (q_{1}01^{x_{1}}\ldots 01^{x_{n}}0) = \gamma ^{n}(x_{1}, \ldots , x_{n}).
?
Problem III.2.13

Construct a primitive recursive function ρ(s,k,l,u,ν)\rho (s, k, l, u, \nu ) satisfying the condition: if u=kl(A)u = k_{l}(A), ν=kr(B)\nu = k_{r}(B), 0≤s≤20 \leq s \leq 2, then ρ(s,k,l,u,ν)=ν((AqiajB)T′)\rho (s, k, l, u, \nu ) = \nu ((Aq_{i}a_{j}B)_{T}'), where T(i,j)T(i,j) is qiaj→qkalq_{i}a_{j} \to q_{k}a_{l} for s=0s=0, qiaj→qkalLq_{i}a_{j} \to q_{k}a_{l}L for s=1s=1, qiaj→qkalRq_{i}a_{j} \to q_{k}a_{l}R for s=2s=2.

?
Problem III.2.14

Construct a primitive recursive function σ(t,i,j,u,ν)\sigma (t, i, j, u, \nu ) satisfying the condition: if u=kl(A)u = k_{l}(A), ν=kr(B)\nu = k_{r}(B), t=λ(T)t = \lambda (T), qiq_{i} occurs in the alphabet of internal states, and aja_{j} in the external alphabet of the machine TT, then σ(t,i,j,u,ν)=ν((AqiajB)T′)\sigma (t, i, j, u, \nu ) = \nu ((Aq_{i}a_{j}B)_{T}').

?
Problem III.2.15

Construct a primitive recursive function τ(t,x)\tau (t, x) satisfying the condition: if t=λ(T)t = \lambda (T), x=ν(M)x = \nu (M), where M=AqiajBM = Aq_{i}a_{j}B is a machine word in the alphabet of the machine TT, then τ(t,x)=ν(MT′)\tau (t,x) = \nu (M_{T}').

?
Problem III.2.16

Construct a primitive recursive function w(t,x,y)w(t, x, y) satisfying the condition: if t=λ(T)t = \lambda (T), x=ν(M)x = \nu (M), where MM is a machine word in the alphabet of the machine TT, then w(t,x,y)=ν(MT(y))w(t, x, y) = \nu (M_{T}^{(y)}).

?
Problem III.2.17

Construct a primitive recursive function ε(x)\varepsilon (x) satisfying the condition: if x=ν(M)x = \nu (M), then ε(x)\varepsilon (x) is the number of occurrences of the symbol a1a_{1} in the word MM.

?
Problem III.2.18

Prove that if the machine TT computes f(x1,…,xn)f(x_{1}, \ldots , x_{n}) and t0=λ(T)t_{0} = \lambda (T), then:

?
(a)

⟨x1,…,xn⟩∈δf⇔ex⁡(1,w(t0,γn(x1,…,xn),y))=0\langle x_{1}, \ldots , x_{n} \rangle \in \delta_{f} \Leftrightarrow \operatorname {ex}(1, w(t_{0}, \gamma^{n}(x_{1}, \ldots , x_{n}), y)) = 0 for some yy;

(b)

f(x1,…,xn)=ε(w(t0,γn(x1,…,xn),hn+1(t0,x1,…,xn)))f(x_{1}, \ldots , x_{n}) = \varepsilon (w(t_{0}, \gamma^{n}(x_{1}, \ldots , x_{n}), h^{n+1}(t_{0}, x_{1}, \ldots , x_{n}))), where hn+1(t0,x1,…,xn)=μy[ex⁡(1,w(t0,γn(x1,…,xn),y))=0]h^{n+1}(t_{0}, x_{1}, \ldots , x_{n}) = \mu y \left[\operatorname {ex}(1, w(t_{0}, \gamma^{n}(x_{1}, \ldots , x_{n}), y)) = 0\right], and the functions γ,w\gamma , w, and ε\varepsilon are taken from problems III.2.12, III.2.16, and III.2.17.

Problem III.2.19

Prove that every Turing computable function is partial recursive.

?
Problem III.2.20

Prove that a function is Turing computable if and only if there is a Turing machine with external alphabet {0,1}\left\{ 0,1\right\} computing this function.

?
Problem III.2.21

Prove that there exists a two-place partial recursive function U(t,x)U(t, x) universal for the family of all one-place partial recursive functions.

?
Problem III.2.22

Prove that there exists an (n+1)(n+1)-place partial recursive function Un+1(t,x1,…,xn)U^{n+1}(t, x_{1}, \ldots , x_{n}) universal for the family of all nn-ary partial recursive functions.

?
Problem III.2.23

Prove that the following functions are not partial recursive:

?
(a)

h(x,y)={1,if x is the number of a machine T and the machine T halts, starting to work from the machine word q101y0,0otherwise;h(x, y) = \begin{cases} 1, & \text{if } x \text{ is the number of a machine } T \text{ and the machine } T \text{ halts, starting to work from the machine word } q_{1}01^{y}0, \\ 0 & \text{otherwise;} \end{cases}

(b)

g(x)=h(x,x)g(x) = h(x,x);

(c)

h0(x)={1,if x is the number of a machine T and the machine T halts, starting to work from the machine word q10,0otherwise.h_{0}(x) = \begin{cases} 1, & \text{if } x \text{ is the number of a machine } T \text{ and the machine } T \text{ halts, starting to work from the machine word } q_{1}0, \\ 0 & \text{otherwise.} \end{cases}

Problem III.2.24

Prove that there exists a primitive recursive function S(z,x,y,w)S(z, x, y, w) such that

S(z,x,y,w)={1,if z=λ(T) and the machine T transforms the word q101x0 into the word q001y0…0 in at most w steps,0otherwise. S(z, x, y, w) = \begin{cases} 1, & \text{if } z = \lambda (T) \text{ and the machine } T \text{ transforms the word } q_{1}01^{x}0 \text{ into the word } q_{0}01^{y}0\ldots 0 \text{ in at most } w \text{ steps,} \\ 0 & \text{otherwise.} \end{cases}
?
Problem III.2.25

Prove that there exist primitive recursive functions p,T1,T2,…p, T_{1}, T_{2}, \ldots such that:

?
(a)

U(m,x)=p(μy[T1(m,x,y)=0])U(m, x) = p(\mu y \left[T_{1}(m, x, y) = 0\right]);

(b)

Un+1(m,x1,…,xn)=p(μy[Tn(m,x1,…,xn,y)=0])U^{n+1}(m, x_{1}, \ldots , x_{n}) = p(\mu y \left[T_{n}(m, x_{1}, \ldots , x_{n}, y) = 0\right]).

Problem III.3.1

Prove that the following predicates are primitive recursive:

?
(a)

x=yx = y;

(b)

x+y=zx + y = z;

(c)

x⋅y=zx \cdot y = z;

(d)

xx divides yy;

(e)

xx is even;

(f)

xx and yy are relatively prime;

(g)

∃n(x=12+22+…+n2)\exists n(x = 1^{2} + 2^{2} + \ldots + n^{2});

(h)

∃n(x=1+2+…+n)\exists n(x = 1 + 2 + \ldots + n).

Problem III.3.2

Prove that if P(x1,…,xn)P(x_{1}, \ldots , x_{n}) and Q(x1,…,xn)Q(x_{1}, \ldots , x_{n}) are recursive (primitive recursive) predicates, then the following predicates are also recursive (primitive recursive):

?
(a)

(P(x1,…,xn) & Q(x1,…,xn))(P(x_{1}, \ldots , x_{n})\ \& \ Q(x_{1}, \ldots , x_{n}));

(b)

(P(x1,…,xn)∨Q(x1,…,xn))(P(x_{1}, \ldots , x_{n}) \lor Q(x_{1}, \ldots , x_{n}));

(c)

¬P(x1,…,xn)\neg P(x_{1}, \ldots , x_{n});

(d)

(P(x1,…,xn)⊃Q(x1,…,xn))(P(x_{1}, \ldots , x_{n}) \supset Q(x_{1}, \ldots , x_{n}));

(e)

P(x1,x1,x3,…,xn)P(x_{1}, x_{1}, x_{3}, \ldots , x_{n});

(f)

P(f(x1,…,xm),xm+1,…,xm+n−1)P(f(x_{1}, \ldots , x_{m}), x_{m+1}, \ldots , x_{m+n-1}), if f(x1,…,xm)f(x_{1}, \ldots , x_{m}) is g.r. (p.r.).

Problem III.3.3

Prove that if the predicate R(x1,…,xn,y)R(x_{1}, \ldots , x_{n}, y) is recursive (primitive recursive), then the predicates ∃y(y≤z & R(x1,…,xn,y))\exists y (y \leq z\ \& \ R(x_{1}, \ldots , x_{n}, y)) and ∀y(y≤z⊃R(x1,…,xn,y))\forall y (y \leq z \supset R(x_{1}, \ldots , x_{n}, y)) are also recursive (primitive recursive).

?
Problem III.3.4

Prove that if the predicate R(x1,…,xn,y,z)R(x_{1}, \ldots , x_{n}, y, z) is primitive recursive, then M={⟨x1,…,xn⟩∣∃y∃z R(x1,…,xn,y,z)}M = \left\{ \langle x_{1}, \ldots , x_{n} \rangle \mid \exists y \exists z\, R(x_{1}, \ldots , x_{n}, y, z)\right\} is a recursively enumerable set.

?
Problem III.3.5

Prove that there exists a set that is not recursively enumerable.

?
Problem III.3.6

Prove that any finite set of natural numbers is primitive recursive.

?
Problem III.3.7

Prove that a set of nn-tuples is recursive (primitive recursive) if and only if its characteristic function is general recursive (primitive recursive).

?
Problem III.3.8

Prove that if ff is a general recursive (primitive recursive) function and aa is a fixed number, then the set of solutions of the equation f(x1,…,xn)=af(x_{1}, \ldots , x_{n}) = a is recursive (primitive recursive).

?
Problem III.3.9

Let the function ff be partial recursive but not general recursive. Prove that the domain of definition of the function f−1f^{-1} is primitive recursive.

?
Problem III.3.10

Prove that if the sets AA and BB are recursive (primitive recursive), then the sets A∩BA \cap B, A∪BA \cup B, N∖A\mathbb {N} \setminus A are also recursive (primitive recursive).

?
Problem III.3.11

Prove that if the sets AA and BB are recursively enumerable, then the sets A∩BA \cap B and A∪BA \cup B are recursively enumerable.

?
Problem III.3.12

Prove that every primitive recursive set is recursively enumerable.

?
Problem III.3.13

Let the sets AA and BB differ by finitely many elements. Prove that:

?
(a)

if AA is recursive, then BB is recursive;

(b)

if AA is recursively enumerable, then BB is recursively enumerable.

Problem III.3.14

Prove that if a set AA and its complement N∖A\mathbb {N} \setminus A are recursively enumerable, then AA is recursive (Post's theorem).

?
Problem III.3.15

Let M⊆NnM \subseteq \mathbb {N}^{n}. Set

cn(M)={cn(x1,…,xn)∣⟨x1,…,xn⟩∈M}, c^{n}(M) = \left\{ c^{n}(x_{1}, \ldots , x_{n}) \mid \langle x_{1}, \ldots , x_{n} \rangle \in M\right\} ,

where cnc^{n} is defined in problem III.1.14. Prove that:

?
(a)

MM is primitive recursive if and only if cn(M)c^{n}(M) is primitive recursive;

(b)

MM is recursive if and only if cn(M)c^{n}(M) is recursive;

(c)

MM is recursively enumerable if and only if cn(M)c^{n}(M) is recursively enumerable.

Problem III.3.16

Let M⊆NM \subseteq \mathbb {N} be a nonempty set. Prove that MM is recursively enumerable if and only if there is a primitive recursive function α(x)\alpha (x) such that M={α(x)∣x∈N}M = \left\{ \alpha (x) \mid x \in \mathbb {N}\right\}.

?
Problem III.3.17

Let MM be a nonempty set of nn-tuples. Prove that the set MM is recursively enumerable if and only if there are one-place primitive recursive functions α1,…,αn\alpha_{1}, \ldots , \alpha_{n} such that

M={⟨α1(x),…,αn(x)⟩∣x∈N}. M = \left\{ \langle \alpha _{1}(x), \ldots , \alpha _{n}(x) \rangle \mid x \in \mathbb {N}\right\} .
?
Problem III.3.18

Let the general recursive function f(x)f(x) satisfy the condition: f(x)≥xf(x) \geq x for all x∈Nx \in \mathbb {N}. Prove that the range of values ρf\rho_{f} of the function ff is recursive.

?
Problem III.3.19

Prove that an infinite set AA is recursive if and only if AA is the range of values of a strictly increasing general recursive function.

?
Problem III.3.20

Prove that a nonempty set AA is recursive if and only if AA is the range of values of a monotonically (not necessarily strictly) increasing general recursive function.

?
Problem III.3.21

Prove that every infinite recursively enumerable set contains an infinite recursive subset.

?
Problem III.3.22

Prove that every infinite recursively enumerable set can be represented as A=ρfA = \rho_{f} for some 1--1 general recursive function ff.

?
Problem III.3.23

Prove that the graph of a general recursive function is recursive.

?
Problem III.3.24

Prove that if the graph Γf\Gamma_{f} of a function ff is recursively enumerable, then the function ff is partial recursive.

?
Problem III.3.25

Prove that the full preimage of a recursive set under a general recursive function is recursive.

?
Problem III.3.26

Let AA be a recursive set, ff a general recursive function with ρf=N\rho_{f} = \mathbb {N}, f(A)∩f(N∖A)=∅f(A) \cap f(\mathbb {N} \setminus A) = \emptyset. Prove that f(A)f(A) is recursive.

?
Problem III.3.27

Let A,BA, B be recursively enumerable sets, and CC a recursive set such that A∩B=∅A \cap B = \emptyset, A⊆C⊆A∪BA \subseteq C \subseteq A \cup B. Prove that AA is recursive.

?
Problem III.3.28

Let f,gf, g be general recursive functions, with gg a 1--1 function. Suppose also that f(x)≥g(x)f(x) \geq g(x) for all xx. Prove that if ρg\rho_{g} is recursive, then ρf\rho_{f} is recursive.

?
Problem III.3.29

Let A,BA, B be recursively enumerable sets. Prove that there exist recursively enumerable sets A1⊆AA_{1} \subseteq A, B1⊆BB_{1} \subseteq B such that A1∩B1=∅A_{1} \cap B_{1} = \emptyset, A1∪B1=A∪BA_{1} \cup B_{1} = A \cup B.

?
Problem III.3.30

Prove that:

?
(a)

a function obtained by means of superposition from functions with recursively enumerable graph has recursively enumerable graph;

(b)

a function obtained by means of the primitive recursion scheme from functions with recursively enumerable graph has recursively enumerable graph;

(c)

a function obtained by means of the μ\mu-operator from a function with recursively enumerable graph has recursively enumerable graph;

(d)

the graph of any partial recursive function is recursively enumerable.

Problem III.3.31

Prove that a function is partial recursive if and only if its graph is recursively enumerable (the graph theorem).

?
Problem III.3.32

Prove that the domain of definition of a partial recursive function is a recursively enumerable set.

?
Problem III.3.33

Prove that the range of values of a partial recursive function is recursively enumerable.

?
Problem III.3.34

Prove that any recursive set is recursively enumerable.

?
Problem III.3.35

Prove that a set of nn-tuples is recursively enumerable if and only if its partial characteristic function is partial recursive.

?
Problem III.3.36

Prove that:

?
(a)

the image of a recursively enumerable set under a partial recursive function is recursively enumerable;

(b)

the full preimage of a recursively enumerable set under a partial recursive function is recursively enumerable.

Problem III.3.37

Prove that the set AA of solutions of the equation

f(x1,…,xn)=a f(x_{1}, \ldots , x_{n}) = a

is recursively enumerable, if ff is a partial recursive nn-ary function.

?
Problem III.3.38

Prove that if fn+1f^{n+1} is a partial recursive function, then the set M={⟨x1,…,xn⟩∣∃y f(x1,…,xn,y)=0}M = \left\{ \langle x_{1}, \ldots , x_{n} \rangle \mid \exists y\, f(x_{1}, \ldots , x_{n}, y) = 0\right\} is recursively enumerable.

?
Problem III.3.39

Let M1,…,MkM_{1}, \ldots , M_{k} be pairwise disjoint recursively enumerable sets of nn-tuples, f1,…,fnf_{1}, \ldots , f_{n} partial recursive functions. Prove that g(x1,…,xn)g(x_{1}, \ldots , x_{n}), defined as follows:

g(x1,…,xn)={f1(x1,…,xn),if ⟨x1,…,xn⟩∈M1,\makebox[0pt][l]\dotfillfk(x1,…,xn),if ⟨x1,…,xn⟩∈Mk,undefined otherwise, g(x_{1}, \ldots , x_{n}) = \begin{cases} f_{1}(x_{1}, \ldots , x_{n}), & \text{if } \langle x_{1}, \ldots , x_{n} \rangle \in M_{1}, \\ \makebox[0pt][l]{\dotfill } \\ f_{k}(x_{1}, \ldots , x_{n}), & \text{if } \langle x_{1}, \ldots , x_{n} \rangle \in M_{k}, \\ \text{undefined otherwise,} \end{cases}

is partial recursive.

?
Problem III.3.40

Prove that any partial recursive function f(x1,…,xn)f(x_{1}, \ldots , x_{n}) is representable in Kleene normal form, i.e., in the form

f(x1,…,xn)=l(μt[g(x1,…,xn,t)=0]), f(x_{1}, \ldots , x_{n}) = l(\mu t \left[g(x_{1}, \ldots , x_{n}, t) = 0\right]),

where g(x1,…,xn,t)g(x_{1}, \ldots , x_{n}, t) is a suitable primitive recursive function, and ll is the function from problem III.1.13 (cf. problem III.2.25).

?
Problem III.3.41

Prove that a partial function f(x1,…,xn)f(x_{1}, \ldots , x_{n}) is representable in the form

f(x1,…,xn)=μt[g(x1,…,xn,t)=0] f(x_{1}, \ldots , x_{n}) = \mu t \left[g(x_{1}, \ldots , x_{n}, t) = 0\right]

for a suitable primitive recursive function g(x1,…,xn,t)g(x_{1}, \ldots , x_{n}, t) if and only if the graph of the function f(x1,…,xn)f(x_{1}, \ldots , x_{n}) is primitive recursive.

?
Problem III.3.42

Let F(x,y)F(x,y) be defined by means of recursion on two variables:

{F(0,y)=φ(y),F(x+1,0)=ψ(x,F(x,α(x)),F(x,F(x,γ(x)))),F(x+1,y+1)=τ(x,y,F(x,F(x+1,y))). \begin{cases} F(0,y) = \varphi (y), \\ F(x+1,0) = \psi (x, F(x, \alpha (x)), F(x, F(x, \gamma (x)))), \\ F(x+1,y+1) = \tau (x,y,F(x,F(x+1,y))). \end{cases}

Prove that if the functions φ,ψ,α,γ,τ\varphi , \psi , \alpha , \gamma , \tau are general recursive, then the function FF is general recursive.

?
Problem III.3.43

Prove that the set

H={x∣∃y T1(x,x,y)=0}, H = \left\{ x \mid \exists y\, T_{1}(x,x,y) = 0\right\} ,

where T1T_{1} is the function from problem III.2.25, is recursively enumerable but not recursive.

?
Problem III.3.44

Prove that if the domain of definition of a partial recursive function fnf^{n} is a recursive set, then fnf^{n} has a recursive extension.

?
Problem III.3.45

Prove that if V(n,x)V(n,x) is a partial recursive function universal for the class of all one-place partial recursive functions, then the set M={x∣V(x,x)=0}M = \left\{ x \mid V(x,x) = 0\right\} is recursively enumerable but not recursive.

?
Problem III.3.46

Find a partial recursive function f(x)f(x) that has no general recursive extension.

?
Problem III.3.47

Find a partial recursive function f(x)f(x) not representable in the form

f(x)=μy[g(x,y)=0] f(x) = \mu y \left[g(x,y) = 0\right]

for any general recursive function gg.

?
Problem III.3.48

Prove that if V(n,x)V(n,x) is a partial recursive function universal for the class of all one-place partial recursive functions, then the set

G={n∣V(n,x) is a general recursive function} G = \left\{ n \mid V(n,x) \text{ is a general recursive function}\right\}

is not recursively enumerable.

?
Problem III.4.1

Prove that:

?
(a)

[x,y][x,y] is a bijection between N2\mathbb {N}^{2} and N\mathbb {N};

(b)

[x1,…,xn][x_{1}, \ldots , x_{n}] is a bijection between Nn\mathbb {N}^{n} and N\mathbb {N};

(c)

[[x]12,[x]22]=x[[x]_{1}^{2}, [x]_{2}^{2}] = x, [[x,y]]12=x[[x,y]]_{1}^{2} = x, [[x,y]]22=y[[x,y]]_{2}^{2} = y;

(d)

[[x]1n,…,[x]nn]=x[[x]_{1}^{n}, \ldots , [x]_{n}^{n}] = x, [[x1,…,xn]]in=xi[[x_{1}, \ldots , x_{n}]]_{i}^{n} = x_{i};

(e)

[x1,…,xm,xm+1,…,xn]=[[x1,…,xm],xm+1,…,xn][x_{1}, \ldots , x_{m}, x_{m+1}, \ldots , x_{n}] = [[x_{1}, \ldots , x_{m}], x_{m+1}, \ldots , x_{n}];

(f)

c(x0,c(x1,x2))=[c(x0,x1),x2]c(x_{0}, c(x_{1}, x_{2})) = [c(x_{0}, x_{1}), x_{2}].

Problem III.4.2

Prove that:

?
(a)

Kn+m+1(x0,x1,…,xn,xn+1,…,xn+m)=Km+1([x0,x1,…,xn],xn+1,…,xn+m)K^{n+m+1}(x_{0}, x_{1}, \ldots , x_{n}, x_{n+1}, \ldots , x_{n+m}) = K^{m+1}([x_{0}, x_{1}, \ldots , x_{n}], x_{n+1}, \ldots , x_{n+m});

(b)

Kn(c(x0,x1),x2,…,xn)=Un+1(x0,x1,x2,…,xn)K^{n}(c(x_{0}, x_{1}), x_{2}, \ldots , x_{n}) = U^{n+1}(x_{0}, x_{1}, x_{2}, \ldots , x_{n}).

Problem III.4.3

Prove that:

?
(a)

Kn+1(x0,x1,…,xn)K^{n+1}(x_{0}, x_{1}, \ldots , x_{n}) is universal for all nn-ary partial recursive functions;

(b)

for any partial recursive function fn+mf^{n+m} there is a primitive recursive function gng^{n} such that

f(x1,…,xn,y1,…,ym)=Km+1(g(x1,…,xn),y1,…,ym). f(x_{1}, \ldots , x_{n}, y_{1}, \ldots , y_{m}) = K^{m+1}(g(x_{1}, \ldots , x_{n}), y_{1}, \ldots , y_{m}).
Problem III.4.4

Prove that every partial recursive function ff has infinitely many Kleene numbers.

?
Problem III.4.5

Construct primitive recursive functions that give, from the Kleene numbers of the original one-place functions, the Kleene numbers of the functions obtained from the originals:

?
(a)

by means of superposition;

(b)

by means of inversion;

(c)

by means of iteration;

(d)

by means of taking the sum of two functions.

Problem III.4.6

Prove that there is a recursively enumerable set PP satisfying the conditions:

?
(a)

if x∈Px \in P, then κx\kappa_{x} is a primitive recursive function;

(b)

for any primitive recursive function ff there is x∈Px \in P such that f=κxf = \kappa_{x}.

Problem III.4.7

Prove that there is a general recursive function universal for the family of all one-place primitive recursive functions.

?
Problem III.4.8

Construct primitive recursive functions that give, from the Kleene numbers of the original functions, the Kleene numbers of the functions obtained from the originals:

?
(a)

by means of superposition;

(b)

by means of primitive recursion;

(c)

by means of the μ\mu-operator.

Problem III.4.9

Prove that for any partial recursive function f(x1,…,xn)f(x_{1}, \ldots , x_{n}) there is a primitive recursive function g(x1,…,xn)g(x_{1}, \ldots , x_{n}) such that for any xx

κg(x1,…,xn)={κf(x1,…,xn),if f(x1,…,xn) is defined,ωotherwise. \kappa _{g(x_{1}, \ldots , x_{n})} = \begin{cases} \kappa _{f(x_{1}, \ldots , x_{n})}, & \text{if } f(x_{1}, \ldots , x_{n}) \text{ is defined,} \\ \omega & \text{otherwise.} \end{cases}
?
Problem III.4.10
?
(a)

Prove that for every partial recursive function f(x1,…,xn,y)f(x_{1}, \ldots , x_{n}, y) there is a primitive recursive function g(x1,…,xn)g(x_{1}, \ldots , x_{n}) such that

κg(x1,…,xn)={κf(x1,…,xn,g(x1,…,xn)),if f(x1,…,xn,g(x1,…,xn)) is defined,ωotherwise. \kappa _{g(x_{1}, \ldots , x_{n})} = \begin{cases} \kappa _{f(x_{1}, \ldots , x_{n}, g(x_{1}, \ldots , x_{n}))}, & \text{if } f(x_{1}, \ldots , x_{n}, g(x_{1}, \ldots , x_{n})) \text{ is defined,} \\ \omega & \text{otherwise.} \end{cases}
(b)

Prove that for every partial recursive function f(x)f(x) there is a natural number aa such that

κa={κf(a),if f(a) is defined,ωotherwise \kappa _{a} = \begin{cases} \kappa _{f(a)}, & \text{if } f(a) \text{ is defined,} \\ \omega & \text{otherwise} \end{cases}

(the fixed-point theorem).

Problem III.4.11

Prove that for any partial recursive function f(x,y)f(x,y) there is a number nn such that f(n,y)=κn(y)f(n,y) = \kappa_{n}(y) for all yy.

?
Problem III.4.12

Prove that there is a number nn such that:

?
(a)

κn(0)=n\kappa_{n}(0) = n;

(b)

κn(n)=n\kappa_{n}(n) = n.

Problem III.4.13

Prove that there is a primitive recursive function ff such that for any xx, if κx\kappa_{x} is a general recursive function, then

κκx(f(x))=κf(x). \kappa _{\kappa _{x}(f(x))} = \kappa _{f(x)}.
?
Problem III.4.14

Construct partial recursive functions κa\kappa_{a} such that:

?
(a)

κa=χ{a}\kappa_{a} = \chi_{\left\{ a\right\} };

(b)

κa=χ{a}∗\kappa_{a} = \chi_{\left\{ a\right\} }^{*};

(c)

κa=χN−{a}∗\kappa_{a} = \chi_{\mathbb {N} - \left\{ a\right\} }^{*}.

Problem III.4.15

Let F\mathcal{F} be the family of all one-place partial functions. We call a map F:F→FF: \mathcal{F} \to \mathcal{F} an effective operator, if the function g(n,x)=(F(κn))(x)g(n,x) = (F(\kappa_{n}))(x) is partial recursive. Prove that for any effective operator FF there is a partial recursive function ff such that f=F(f)f = F(f).

?
Problem III.4.16

Prove that for any partial recursive functions α,γ,δ\alpha , \gamma , \delta there is a partial recursive function ff satisfying the conditions:

?
(a)

if α(x)=0\alpha (x) = 0, then f(x)=0f(x) = 0;

(b)

if α(x)>0\alpha (x) > 0, then f(x)=γ(f(δ(x)))f(x) = \gamma (f(\delta (x))).

Problem III.4.17

Let A\mathcal{A} be a nonempty family of one-place partial recursive functions, distinct from the family of all such functions. Prove that the set

κ−1(A)={x∣κx∈A} \kappa ^{-1}(\mathcal{A}) = \left\{ x \mid \kappa _{x} \in \mathcal{A}\right\}

is not recursive (Rice's theorem).

?
Problem III.4.18

Prove that the following sets are not recursive:

?
(a)

A1={x∣κx is a constant}A_{1} = \left\{ x \mid \kappa_{x} \text{ is a constant}\right\};

(b)

A2={x∣κx(a)=b}A_{2} = \left\{ x \mid \kappa_{x}(a) = b\right\}, where a,ba, b are fixed numbers;

(c)

A3={c(x,y)∣y∈δκx}A_{3} = \left\{ c(x,y) \mid y \in \delta_{\kappa_{x}}\right\};

(d)

A4={c(x,y)∣y∈ρκx}A_{4} = \left\{ c(x,y) \mid y \in \rho_{\kappa_{x}}\right\};

(e)

A5={c(x,y)∣κx=κy}A_{5} = \left\{ c(x,y) \mid \kappa_{x} = \kappa_{y}\right\}.

Problem III.4.19

Prove the recursive enumerability of the sets of all Kleene numbers of the following families of one-place partial recursive functions:

?
(a)

functions defined at the point 00;

(b)

functions ff such that f(a)=bf(a) = b for given numbers aa and bb;

(c)

functions with nonempty domain of definition.

Problem III.4.20

Prove that every recursively enumerable set has infinitely many Post numbers.

?
Problem III.4.21

Let A\mathcal{A} be a nonempty family of recursively enumerable sets, distinct from the family of all recursively enumerable sets. Prove that the set

π−1(A)={x∣πx∈A} \pi ^{-1}(\mathcal{A}) = \left\{ x \mid \pi _{x} \in \mathcal{A}\right\}

is not recursive (Rice's theorem).

?
Problem III.4.22

Prove that the following sets are not recursive:

?
(a)

{x∣πx≠∅}\left\{ x \mid \pi_{x} \neq \emptyset \right\};

(b)

{x∣πx=N}\left\{ x \mid \pi_{x} = \mathbb {N}\right\};

(c)

{x∣a∈πx}\left\{ x \mid a \in \pi_{x}\right\}, where aa is a fixed number;

(d)

{x∣πx is finite}\left\{ x \mid \pi_{x} \text{ is finite}\right\};

(e)

{c(x,y)∣πx=πy}\left\{ c(x,y) \mid \pi_{x} = \pi_{y}\right\}.

Problem III.4.23

Prove that the sets of all Post numbers of the following families of recursively enumerable sets are recursively enumerable:

?
(a)

those containing a given number aa;

(b)

the nonempty ones.

Problem III.4.24

Prove that for any partial recursive function fnf^{n} there is a primitive recursive function gng^{n} such that

πg(x1,…,xn)={πf(x1,…,xn),if f(x1,…,xn) is defined,∅otherwise. \pi _{g(x_{1}, \ldots , x_{n})} = \begin{cases} \pi _{f(x_{1}, \ldots , x_{n})}, & \text{if } f(x_{1}, \ldots , x_{n}) \text{ is defined,} \\ \emptyset & \text{otherwise.} \end{cases}
?
Problem III.4.25

Prove that for every recursively enumerable set P⊆Nn+1P \subseteq \mathbb {N}^{n+1} (n>0n > 0) there is a primitive recursive function α(x1,…,xn)\alpha (x_{1}, \ldots , x_{n}) such that

⟨x0,x1,…,xn⟩∈P⇔x0∈πα(x1,…,xn). \langle x_{0}, x_{1}, \ldots , x_{n} \rangle \in P \Leftrightarrow x_{0} \in \pi _{\alpha (x_{1}, \ldots , x_{n})}.
?
Problem III.4.26

Prove that there exist primitive recursive functions f,g,h,u,v,wf, g, h, u, v, w such that:

?
(a)

πx∩πy=πf(x,y)\pi_{x} \cap \pi_{y} = \pi_{f(x,y)};

(b)

πx∪πy=πg(x,y)\pi_{x} \cup \pi_{y} = \pi_{g(x,y)};

(c)

{x}=πh(x)\left\{ x\right\} = \pi_{h(x)};

(d)

{c(s,t)∣s∈πx,t∈πy}=πu(x,y)\left\{ c(s,t) \mid s \in \pi_{x}, t \in \pi_{y}\right\} = \pi_{u(x,y)};

(e)

κy(πx)=πv(x,y)\kappa_{y}(\pi_{x}) = \pi_{v(x,y)};

(f)

κy−1(πx)=πw(x,y)\kappa_{y}^{-1}(\pi_{x}) = \pi_{w(x,y)}.

Problem III.4.27

Prove that there exist primitive recursive functions ff and gg such that:

?
(a)

δκx=ρκf(x)\delta_{\kappa_{x}} = \rho_{\kappa_{f(x)}};

(b)

ρκx=δκg(x)\rho_{\kappa_{x}} = \delta_{\kappa_{g(x)}}.

Problem III.4.28
?
(a)

Prove that for any partial recursive function fn+1f^{n+1} there is a primitive recursive function gng^{n} such that

πg(x1,…,xn)={πf(x1,…,xn,g(x1,…,xn)),if f(x1,…,xn,g(x1,…,xn)) is defined,∅otherwise. \pi _{g(x_{1}, \ldots , x_{n})} = \begin{cases} \pi _{f(x_{1}, \ldots , x_{n}, g(x_{1}, \ldots , x_{n}))}, & \text{if } f(x_{1}, \ldots , x_{n}, g(x_{1}, \ldots , x_{n})) \text{ is defined,} \\ \emptyset & \text{otherwise.} \end{cases}
(b)

Prove that for any partial recursive function ff there is a number aa such that

πa={πf(a),if f(a) is defined,∅otherwise \pi _{a} = \begin{cases} \pi _{f(a)}, & \text{if } f(a) \text{ is defined,} \\ \emptyset & \text{otherwise} \end{cases}

(the fixed-point theorem).

Problem III.4.29

Prove that for any recursively enumerable set M⊆Nn+2M \subseteq \mathbb {N}^{n+2} there is a primitive recursive function gng^{n} such that

⟨x0,x1,…,xn,g(x1,…,xn)⟩∈M⇔x0∈πg(x1,…,xn). \langle x_{0}, x_{1}, \ldots , x_{n}, g(x_{1}, \ldots , x_{n}) \rangle \in M \Leftrightarrow x_{0} \in \pi _{g(x_{1}, \ldots , x_{n})}.
?
Problem III.4.30

Prove that there is a number nn such that:

?
(a)

πn={n}\pi_{n} = \left\{ n\right\};

(b)

πn={n2}\pi_{n} = \left\{ n^{2}\right\};

(c)

πn=N∖{n}\pi_{n} = \mathbb {N} \setminus \left\{ n\right\}.

Problem III.4.31

Prove that the relation ≤m\leq_{m} is reflexive and transitive.

?
Problem III.4.32

Prove that every recursive set is mm-reducible to any nonempty set with nonempty complement.

?
Problem III.4.33

Prove that if AA is mm-reducible to a recursive (recursively enumerable) set, then AA is recursive (recursively enumerable).

?
Problem III.4.34

Prove that the set

K1={c(x,y)∣x∈πy} K_{1} = \left\{ c(x,y) \mid x \in \pi _{y}\right\}

is mm-universal.

?
Problem III.4.35

Prove that every mm-universal set is not recursive.

?
Problem III.4.36

Prove that the set

K={x∣x∈πx} K = \left\{ x \mid x \in \pi _{x}\right\}

is creative.

?
Problem III.4.37

Prove that every creative set is not recursive.

?
Problem III.4.38

Prove that if AA is a creative set, A≤mBA \leq_{m} B, and BB is recursively enumerable, then BB is creative.

?
Problem III.4.39

Prove that every creative set is mm-universal.

?
Problem III.4.40

Prove that a set is mm-universal if and only if it is creative.

?
Problem III.4.41

Prove that the set

K2={x∣πx≠∅} K_{2} = \left\{ x \mid \pi _{x} \neq \emptyset \right\}

is creative.

?
Problem III.4.42

Prove that there is a primitive recursive function σ(x)\sigma (x) such that the Turing machine with number σ(x)\sigma (x) computes the function κx\kappa_{x}.

?
Problem III.4.43

Prove that the set HH from problem III.3.43 of 3 is creative.

?