Closure properties of general and partial recursive functions

[29/79%]
Show
LaTeX

Prove that if the function f(x1,…,xn)f\left(x_{1}, \ldots , x_{n}\right) is partial recursive, then the function g(x1,…,xn)=f(xi1,…,xin)g\left(x_{1}, \ldots , x_{n}\right)=f\left(x_{i_{1}}, \ldots , x_{i_{n}}\right) is also partial recursive for every permutation (i1,…,in)\left(i_{1}, \ldots , i_{n}\right) of the numbers 1,2,…,n1,2, \ldots , n.

?

Let g(x1,…,xn−1,xn)g\left(x_{1}, \ldots , x_{n-1}, x_{n}\right) be a partial recursive function, and let aa and b>0b>0 be natural numbers. Prove that the function

f(x1,…,xn−1,xn)={a, if xn<b,g(x1,…,xn−1,xn−b), if xn⩾b f\left(x_{1}, \ldots , x_{n-1}, x_{n}\right)= \begin{cases} a, & \text{ if } x_{n}<b, \\ g\left(x_{1}, \ldots , x_{n-1}, x_{n}-b\right), & \text{ if } x_{n} \geqslant b \end{cases}

is also partial recursive.

?

Show that the following functions are partial recursive:

?
(a)

rt⁡(n,x)=⌊xn⌋\operatorname {rt}(n, x)=\lfloor \sqrt[n]{x}\rfloor — the integer part of the nn-th root of xx;

(b)

log⁡(i,x)=⌊log⁡ix⌋\log (i, x)=\left\lfloor \log_{i} x\right\rfloor;

(c)

τ(x)\tau (x) — the number of distinct divisors of xx, τ(0)=0\tau (0)=0;

(d)

p(x)=1p(x)=1, if xx is a prime number, and p(x)=0p(x)=0 otherwise;

(e)

pn⁡(k)\operatorname {pn}(k) — the kk-th prime number in increasing order, pn⁡(0)=2\operatorname {pn}(0)=2;

(f)

σ(x)\sigma (x) — the sum of the divisors of xx; take σ(0)=0\sigma (0)=0;

(g)

digit⁡(n,m,i)\operatorname {digit}(n, m, i) — the ii-th digit in the base-mm representation of nn: that is, if n=∑i=0∞aimin=\sum_{i=0}^{\infty } a_{i} m^{i}, where 0⩽ai<m0 \leqslant a_{i}<m, then digit⁡(n,m,i)=ai;\operatorname {digit}(n, m, i)=a_{i} ;

(h)

gcd⁡(x,y)\gcd (x, y) — the greatest common divisor of xx and yy.

Prove that if the values of a general recursive function f(x)f(x) are changed on a finite set, then the resulting function f′(x)f^{\prime }(x) is also general recursive.

?

Let ff be a general recursive function that is one-to-one on ω\omega. Prove that the inverse function f−1f^{-1} is also general recursive, by explicitly constructing it.

?

Let g(x1,…,xn,y)g\left(x_{1}, \ldots , x_{n}, y\right) be a general recursive function. Prove that the function

f(x1,…,xn,y,z)={∑i=0zg(x1,…,xn,y+i), if y⩽z,0, if y>z f\left(x_{1}, \ldots , x_{n}, y, z\right)= \begin{cases} \sum _{i=0}^{z} g\left(x_{1}, \ldots , x_{n}, y+i\right), & \text{ if } y \leqslant z, \\ 0, & \text{ if } y>z \end{cases}

is general recursive.

?

Prove that if the functions f(x1,…,xn,y),g(x1,…,xn,y)f\left(x_{1}, \ldots , x_{n}, y\right), g\left(x_{1}, \ldots , x_{n}, y\right) and h(x1,…,xn,y)h\left(x_{1}, \ldots , x_{n}, y\right) are general recursive, then the function F(x1,…,xn)=min⁡{y:f(x1,…,xn,y)=0 or g(x1,…,xn,y)>h(x1,…,xn,y)}F\left(x_{1}, \ldots , x_{n}\right)=\min \left\{ y: f\left(x_{1}, \ldots , x_{n}, y\right)=0 \text{ or } g\left(x_{1}, \ldots , x_{n}, y\right)>h\left(x_{1}, \ldots , x_{n}, y\right)\right\} is partial recursive.

?

Prove that if the function f(x1,…,xn)f\left(x_{1}, \ldots , x_{n}\right) is a p.r.f., then the function g(x1,…,xn)=f(xi1,…,xin)g\left(x_{1}, \ldots , x_{n}\right)=f\left(x_{i_{1}}, \ldots , x_{i_{n}}\right) is also a p.r.f. for every permutation (i1,…,in)(i_{1}, \ldots , i_{n}) of the numbers 1,2,…,n1,2, \ldots , n. ⊛\circledast

?

Let g(x1,…,xn−1,xn)g\left(x_{1}, \ldots , x_{n-1}, x_{n}\right) be a p.r.f., and let aa and b>0b>0 be natural numbers. Prove that the function

f(x1,…,xn−1,xn)={a, if xn<bg(x1,…,xn−1,xn−b), if xn⩾b f\left(x_{1}, \ldots , x_{n-1}, x_{n}\right)= \begin{cases} a, & \text{ if } x_{n}<b \\ g\left(x_{1}, \ldots , x_{n-1}, x_{n}-b\right), & \text{ if } x_{n} \geqslant b\end{cases}

is also a p.r.f. ⊛\circledast

?

Find the value F(9)F(9) and F(17)F(17) for F=μfF=\mu f and the following functions f(2)f^{(2)}. Determine for which of them F(x)=⌊x⌋F(x)=\lfloor \sqrt{x}\rfloor holds:

?
(a)

f(x,y)=y2÷xf(x, y)=y^{2} \div x;

(b)

f(x,y)=x÷y2f(x, y)=x \div y^{2};

(c)

f(x,y)=(x+1)÷y2f(x, y)=(x+1) \div y^{2};

(d)

f(x,y)=(x+1)÷(y+1)2f(x, y)=(x+1) \div (y+1)^{2};

(e)

f(x,y)=x÷(y+1)2f(x, y)=x \div (y+1)^{2}. ⊛\circledast

Determine for which of the following functions f(3)f^{(3)} we have F(x)=⌊y/x⌋F(x)=\lfloor y / x\rfloor, where F=μfF=\mu f and x≠0x \neq 0:

?
(a)

f(x,y,i)=y÷ixf(x, y, i)=y \div i x;

(b)

f(x,y,i)=y÷(i+1)xf(x, y, i)=y \div (i+1) x;

(c)

f(x,y,i)=(y+1)÷ixf(x, y, i)=(y+1) \div i x;

(d)

f(x,y,i)=(y+1)÷i(x+1)f(x, y, i)=(y+1) \div i(x+1);

(e)

f(x,y,i)=(y+1)÷(i+1)xf(x, y, i)=(y+1) \div (i+1) x. ⊛\circledast

Determine the p.r.f. l(1)l^{(1)} whose value equals log⁡2x\log_{2} x when xx is a power of two, and is undefined otherwise. ⊛\circledast

?

On the Euclidean coordinate plane, a disk CC is given, centered at the point (100,100)(100,100) with radius 50. Prove that the following function r(2)r^{(2)} is partially recursive: r(x,y)r(x, y) is defined if and only if the point (x,y)(x, y) lies outside the disk CC, and its value equals the integer part of the distance from (x,y)(x, y) to the disk (that is, to the point of the disk CC closest to (x,y)(x, y)). ⊛\circledast

?

Prove that if the values of a g.r.f. f(x)f(x) are changed on a finite set, then the resulting function f′(x)f^{\prime }(x) is also a g.r.f. ⊛\circledast

?

Let ff be a g.r.f. that is one-to-one on ω\omega. Prove that the inverse function f−1f^{-1} is also a g.r.f., by explicitly constructing it. ⊛\circledast

?

Let g(x1,…,xn,y)g\left(x_{1}, \ldots , x_{n}, y\right) be a g.r.f. Prove that the function

f(x1,…,xn,y,z)={∑i=0zg(x1,…,xn,y+i), for y⩽z,0, for y>z f\left(x_{1}, \ldots , x_{n}, y, z\right)= \begin{cases} \sum _{i=0}^{z} g\left(x_{1}, \ldots , x_{n}, y+i\right), & \text{ for } y \leqslant z, \\ 0, & \text{ for } y>z\end{cases}

is general recursive. ⊛\circledast

?

Prove that if the functions f(x1,…,xn,y),g(x1,…,xn,y)f\left(x_{1}, \ldots , x_{n}, y\right), g\left(x_{1}, \ldots , x_{n}, y\right), and h(x1,…,xn,y)h\left(x_{1}, \ldots , x_{n}, y\right) are general recursive, then the function

\begin{aligned} & F\left(x_{1}, \ldots , x_{n}\right)=\min \left\{ y: f\left(x_{1}, \ldots , x_{n}, y\right)=0 \text{ or } \\ & \quad g\left(x_{1}, \ldots , x_{n}, y\right)>h\left(x_{1}, \ldots , x_{n}, y\right)\right\} \end{aligned}

is a p.r.f. ⊛\circledast

?

Design a multi-tape Turing machine that "adds" two strings over Σ={1,2,…,X}\Sigma = \left\{ 1,2, \ldots , X\right\}; that is, on inputs x,y∈Σ∗x, y \in \Sigma^{*}, compute z∈Σ∗z \in \Sigma^{*} such that ιΣ−1(z)=ιΣ−1(x)+ιΣ−1(y)\iota_{\Sigma }^{-1}(z)=\iota_{\Sigma }^{-1}(x)+\iota_{\Sigma }^{-1}(y).

?

Complete the proof of the primitive recursion part of Theorem 4.47. That is, given multi-tape DTM's MgM_{g} and MhM_{h} computing functions gg and hh, design a multi-tape DTM MM that computes the function ff which is defined from functions gg and hh by primitive recursion.

?

Prove that every partial recursive function can be obtained from initial functions with a finite number of applications of composition and primitive recursion operations and a single application of unbounded minimization operation.

?

Let f(k,0)=⌊ek⌋f(k, 0)=\left\lfloor e^{k}\right\rfloor, and f(k,n)=f(k, n)= the nnth digit to the right of the decimal point of the decimal expansion of eke^{k}, where e=∑n=0∞1/n!e=\sum_{n=0}^{\infty } 1 / n!. Show that ff is a recursive function. Is ff a primitive recursive function?

?

For any partial recursive function f:{0,1}∗→{0,1}∗f: \left\{ 0,1\right\}^{*} \rightarrow \left\{ 0,1\right\}^{*}, we write DfD_{f} to denote its domain {x∣f(x)↓}\left\{ x \mid f(x) \downarrow \right\}. Let f,g,h:{0,1}∗→{0,1}∗f, g, h: \left\{ 0,1\right\}^{*} \rightarrow \left\{ 0,1\right\}^{*} be three partial recursive functions.

?
(a)

Show that there exists a partial recursive function p:{0,1}∗→{0,1}∗p: \left\{ 0,1\right\}^{*} \rightarrow \left\{ 0,1\right\}^{*} such that Dp=Df∪Dg∪DhD_{p}=D_{f} \cup D_{g} \cup D_{h}, and for each x∈Dpx \in D_{p}, p(x)=f(x)p(x)=f(x) or p(x)=g(x)p(x)=g(x) or p(x)=h(x)p(x)=h(x).

(b)

Show that there does not always exist a partial recursive function q:{0,1}∗→{0,1}∗q: \left\{ 0,1\right\}^{*} \rightarrow \left\{ 0,1\right\}^{*} such that Dq=Df∪Dg∪DhD_{q}=D_{f} \cup D_{g} \cup D_{h}, and for each x∈Dq,q(x)=f(x)x \in D_{q}, q(x)=f(x) or q(x)=g(x)q(x)=g(x) or q(x)=h(x)q(x)=h(x), and for each x∈Df∩Dg∩Dh,q(x)=min⁡{f(x),g(x),h(x)}x \in D_{f} \cap D_{g} \cap D_{h}, q(x)=\min \left\{ f(x), g(x), h(x)\right\}.

Define

f(n)={min⁡{Wn} if Wn≠∅,↑ otherwise . f(n)= \begin{cases} \min \left\{ W_{n}\right\} & \text{ if } W_{n} \neq \emptyset , \\ \uparrow & \text{ otherwise }.\end{cases}

Is ff a partial recursive function? Prove your answer.

?
?
(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.

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).

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.

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].

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.

?

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.

?

References

[ДДК+21a] Дехтярь М.И., Дудаков С.М., Карлов М.И., Карлов Б.Н. Лекции по дискретной математике. 3-е изд., Тверской государственный университет, 2021.
[ДДК+21b] Дехтярь М.И., Дудаков С.М., Карлов М.И., Карлов Б.Н. Задачник по дискретной математике. 2-е изд., Тверской государственный университет, 2021.
[DuKo01] Du D., Ko K. Problem Solving in Automata, Languages, and Complexity. John Wiley & Sons, 2001.
[LaMa02] Lavrov I.A., Maksimova L.L. Задачи по теории множеств, математической логике и теории алгоритмов. 5-е изд., Физматлит, 2002.