Pairing and tupling functions are primitive recursive

[6/83%]
Show
LaTeX

Show that the function F(x)F(x) from Problem 547 on p. 168 is a g.r.f.

Hint. First show that the function g(x)=⟨F(x),F(x+1)⟩g(x)=\langle F(x), F(x+1)\rangle is a g.r.f. ⊛\circledast

?

Let τ1:⋃k=1∞Nk→N\tau_{1}: \bigcup_{k=1}^{\infty } \mathbf{N}^{k} \rightarrow \mathbf{N} be defined by f(n1,…,nk)=2n13n2⋯pknkf\left(n_{1}, \ldots , n_{k}\right)=2^{n_{1}} 3^{n_{2}} \cdots p_{k}^{n_{k}}, where pkp_{k} is the kk th prime.

?
(a)

Show that the τ1\tau_{1} is onto, primitive recursive and monotone. Also show that τ1\tau_{1} is almost one-to-one in the sense that if τ1(n1,…,nk)=τ1(m1,…,mℓ)\tau_{1}\left(n_{1}, \ldots , n_{k}\right)=\tau_{1}\left(m_{1}, \ldots , m_{\ell }\right), and if k≤ℓk \leq \ell, then ni=min_{i}=m_{i} for all i,1≤i≤ki, 1 \leq i \leq k, and mj=0m_{j}=0 for all j,k<j≤ℓj, k<j \leq \ell.

(b)

Verify that if we use τ1\tau_{1} as a Gödel numbering, then the functions size, item and the functions of Example 4.35 all remain primitive recursive. (Here, size⁡(n)\operatorname {size}(n) is the number of items in the sequence nn, excluding the trailing zeros.)

Show that the function

τ(n1,…,nk−1,nk)=⟨k−1,⟨n1,⟨⋯⟨nk−1,nk⟩⋯ ⟩⟩⟩ \tau \left(n_{1}, \ldots , n_{k-1}, n_{k}\right)=\left\langle k-1,\left\langle n_{1},\left\langle \cdots \left\langle n_{k-1}, n_{k}\right\rangle \cdots \right\rangle \right\rangle \right\rangle

is a Gödel numbering.

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

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

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

References

[ДДК+21] Дехтярь М.И., Дудаков С.М., Карлов М.И., Карлов Б.Н. Задачник по дискретной математике. 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.