Partial Recursive Functions
[26/100%]Let three functions be given: , . Determine the function defined as follows: ?
Determine the value of the following p.r.f.'s (partial recursive functions):
;
;
.
The g.r.f. (general recursive function) is given as follows:
Prove that .
Find the value for the following functions:
, where ;
, where ;
, where .
Show that the following functions are g.r.f.'s:
— exponentiation;
— factorial;
— the conditional operation,
— the smallest of the arguments, ;
— the largest of the arguments, ;
— the absolute difference;
— the remainder of dividing by ;
— integer quotient.
Prove that if the function is a p.r.f., then the function is also a p.r.f. for every permutation of the numbers .
We say that the function is obtained by bounded minimization of the function (denoted ), if , when for all , and otherwise equals the smallest for which . Prove that the function can be constructed from and the basis functions by means of superposition and primitive recursion.
Let be a p.r.f., and let and be natural numbers. Prove that the function
is also a p.r.f.
Find the value and for and the following functions . Determine for which of them holds:
;
;
;
;
.
Determine for which of the following functions we have , where and :
;
;
;
;
.
Which of the following expressions define the number of distinct divisors of ?
;
;
;
.
Show that the following functions are p.r.f.'s:
— the integer part of the -th root of ;
;
, if is a prime number, and otherwise;
— the -th prime number in increasing order, ;
— the sum of the divisors of , taking ;
— the -th digit in the base- representation of : that is, if , where , then ;
— the greatest common divisor of and .
Determine the p.r.f. whose value equals when is a power of two, and is undefined otherwise.
On the Euclidean coordinate plane, a disk is given, centered at the point with radius 50. Prove that the following function is partially recursive: is defined if and only if the point lies outside the disk , and its value equals the integer part of the distance from to the disk (that is, to the point of the disk closest to ).
A g.r.f. that can be constructed without using minimization is called primitively recursive. Let the functions and be primitively recursive, , a g.r.f., and let be majorized by the function for all . Prove that is also primitively recursive.
Prove that if the values of a g.r.f. are changed on a finite set, then the resulting function is also a g.r.f.
Prove that from the constant 0 and the functions , by means of superposition and primitive recursion, one cannot obtain the function or the function . Hint. By induction on the construction of the function, prove that for all functions constructed in this way, the inequality holds for arbitrary .
Let be a g.r.f. that is one-to-one on . Prove that the inverse function is also a g.r.f., by explicitly constructing it.
Let be a g.r.f. Prove that the function
is general recursive.
Prove that if the functions , and 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.
Suppose that all pairs of natural numbers are ordered by increasing sum , and pairs with the same sum — by increasing coordinate . This order looks like this:
Let be the number of the pair in this order (we take the pair (0,0) to have number 0). Then the function numbers all pairs of natural numbers in a one-to-one fashion.
Prove that .
Find the inverse functions and such that the equalities hold, and consequently .
Show that all these functions are general recursive.
Show that the function from Problem 547 on p. 168 is a g.r.f.
Hint. First show that the function is a g.r.f.
Another function that allows one to number pairs of natural numbers looks like this: . Prove that itself and the inverse functions and to it (that is, and ) are general recursive.
Given a one-to-one numbering of pairs (for example, from Problems 578 or 580), one can inductively number ordered -tuples of arbitrary length:
Prove that the function is one-to-one.
Prove that the functions are general recursive.
Prove that the inverse function to is also general recursive:
Yet another way of coding finite sequences of natural numbers uses binary notation: the sequence is coded by the binary number (sequences that arise from one another by adding or removing trailing zeros are not distinguished).
Find the codes of the sequences and .
Determine of which sequences the numbers 169 and 19783 are codes.
Prove that the function is general recursive. Here is the code of a sequence, is the index of an element, and the value of the function equals that element.
The Ackermann function is defined as follows:
Find and for all natural .
Prove that .
Prove that the Ackermann function is general recursive. Hint. Using the functions and (Problem 581 on the facing page), construct sequences such that