Closure properties of primitive recursive functions

[20/65%]
Show
LaTeX

A general recursive function that can be constructed without using minimization is called primitive recursive. Let the functions gg and ff be primitive recursive, h=μgh=\mu g, hh — a general recursive function, and let hh be majorized by the function f:h(xˉ)<f(xˉ)f: h(\bar{x})<f(\bar{x}) for all xˉ\bar{x}. Prove that hh is also primitive recursive.

?

We say that the function h(n+1)h^{(n+1)} is obtained by bounded minimization of the function f(n+1)f^{(n+1)} (denoted h=μlim⁡fh=\mu_{\lim } f), if h(xˉ,y)=yh(\bar{x}, y)=y, when f(xˉ,y)≠0f(\bar{x}, y) \neq 0 for all z<yz<y, and otherwise h(xˉ,y)h(\bar{x}, y) equals the smallest z<yz<y for which f(xˉ,z)=0f(\bar{x}, z)=0. Prove that the function μlim⁡f\mu_{\lim } f can be constructed from ff and the basis functions by means of superposition and primitive recursion. ⊛\circledast

?

A g.r.f. that can be constructed without using minimization is called primitively recursive. Let the functions gg and ff be primitively recursive, h=μgh=\mu g, hh a g.r.f., and let hh be majorized by the function f:h(xˉ)<f(xˉ)f: h(\bar{x})<f(\bar{x}) for all xˉ\bar{x}. Prove that hh is also primitively recursive. ⊛\circledast

?

Assume that R:Nk+1→NR: \mathbf{N}^{k+1} \rightarrow \mathbf{N} is a primitive recursive predicate. Show that the following function f:Nk+1→Nf: \mathbf{N}^{k+1} \rightarrow \mathbf{N} is also primitive recursive:

f(n1,…,nk,m)={(max⁡i)i≤mR(n1,…,nk,i) if (∃i)i≤mR(n1,…,nk,i)0 otherwise.  f\left(n_{1}, \ldots , n_{k}, m\right)= \begin{cases} (\max i)_{i \leq m} R\left(n_{1}, \ldots , n_{k}, i\right) \\ & \text{ if }(\exists i)_{i \leq m} R\left(n_{1}, \ldots , n_{k}, i\right) \\ 0 & \text{ otherwise. }\end{cases}
?

Assume that f:Nk+1→Nf: \mathbf{N}^{k+1} \rightarrow \mathbf{N} is primitive recursive. Show that the following functions are also primitive recursive:

?
(a)

g(n1,…,nk,m)=∑i=0mf(n1,…,nk,i)g\left(n_{1}, \ldots , n_{k}, m\right)=\sum_{i=0}^{m} f\left(n_{1}, \ldots , n_{k}, i\right).

(b)

h(n1,…,nk,m)=∏i=0mf(n1,…,nk,i)h\left(n_{1}, \ldots , n_{k}, m\right)=\prod_{i=0}^{m} f\left(n_{1}, \ldots , n_{k}, i\right).

Assume that both f:N→Nf: \mathbf{N} \rightarrow \mathbf{N} and g:N→Ng: \mathbf{N} \rightarrow \mathbf{N} are primitive recursive. Show that the following function h:N2→Nh: \mathbf{N}^{2} \rightarrow \mathbf{N} is also primitive recursive:

h(n,0)=f(n)h(n,m+1)=g(h(n,⌊m+12⌋)). \begin{aligned} h(n, 0) & =f(n) \\ h(n, m+1) & =g\left(h\left(n,\left\lfloor \frac{m+1}{2}\right\rfloor \right)\right). \end{aligned}
?

Assume that f:N→Nf: \mathbf{N} \rightarrow \mathbf{N} is primitive recursive. Show that the following function g:N2→Ng: \mathbf{N}^{2} \rightarrow \mathbf{N} is also primitive recursive:

g(n,0)=f(n)g(n,m+1)=g(g(n,m),m) \begin{aligned} g(n, 0) & =f(n) \\ g(n, m+1) & =g(g(n, m), m) \end{aligned}
?

Show that every context-free language is primitive recursive.

?

Assume that f:N→Nf: \mathbf{N} \rightarrow \mathbf{N} is primitive recursive. Then, the function g:N2→Ng: \mathbf{N}^{2} \rightarrow \mathbf{N}, defined by

g(m,n)=f(n)(m)= def f(f(⋯(f(m))⋯ )),⏟n g(m, n)=f^{(n)}(m) \stackrel{\text{ def }}{=} \underbrace{f(f(\cdots (f(m)) \cdots )),}_{n}

is also primitive recursive.

?

Prove that every primitive recursive function is everywhere defined.

?

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

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

?

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.

?

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}

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.

?

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.

?

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.

?

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.

?

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.

?

Prove that every primitive recursive function 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.