course-of-values recursion
In defining a function by primitive recursion, the value of the next argument depends only on the value of the current argument . Definition of functions by course-of-values recursion, depends on value(s) of some or all of the preceding arguments . Two very basic examples of definition by course-of-values recursion are
-
1.
(Fibonacci numbers). , and .
-
2.
, and .
In the first example, we may write , where is the familiar addition function, a function of two arguments. In other words, value of the current argument of depends on the values of a fixed number of preceding arguments (in this case, ). In the second example, value of the current argument of depends on the values of all of the values of the preceding arguments. Suppose we write , where is the -ary addition function. This is different from in the sense that has a fixed arity, whereas the arity of depends on the argument of . In other words, as varies, a “different” is required! Is it possible to define via a fixed function as in the first example? Moreover, what is the relation between course-of-values recursion and primitive recursion?
The answer to the first question is yes. To get around the difficulty of “varying arity”, we employ the technique of encoding the entire sequence of values of the preceding arguments of by a “code number”, and come up with a function that depends on the this code number. then can be used to define .
Pick an encoding of finite sequences of non-negative integers, preferably a primitive recursive encoding. As usual, we set
as the code, or sequence number of the sequence , and if , we set if , and otherwise.
For this entry, we choose the multiplicative encoding of Gödel (see this entry (http://planetmath.org/ExamplesOfPrimitiveRecursiveEncoding) for more detail) because of its convenience. Then
where is the -th prime number, and .
Definition. For any function , define the course-of-values function of as follows: has the same arity as , and for any ,
-
1.
, and
-
2.
.
For example, if is the -th Fibonacci number, then , , and , etc… It is evident that grows very rapidly.
Definition. A function is said to be defined by course-of-values recursion via function if, for any :
The two examples above are defined by course-of-values recursion:
-
•
, where .
-
•
, where .
The second question posed at the beginning can now be answered:
Proposition 1.
is primitive recursive iff is.
Proof.
By definition, and using multiplicative encoding, we have , and
Thus, if is primitive recursive, so is by primitive recursion. Conversely, if is primitive recursive, so is . ∎
Proposition 2.
If is primitive recursive, so is defined by course-of-values recursion via .
Proof.
From the proof of the proposition above, we see that
Thus, as is primitive recursive, so is by primitive recursion, and hence is primitive recursive by the previous proposition. ∎
Remark. If the value of the next argument of depends on values of a fixed set of prior arguments, then the primitive recursiveness of can be proved via mutual recursion. For example, suppose . By setting for , we see that
Furthermore,
So the are defined by mutual recursion, and if is primitive recursive, so is each .
Title | course-of-values recursion |
---|---|
Canonical name | CourseofvaluesRecursion |
Date of creation | 2013-03-22 19:06:13 |
Last modified on | 2013-03-22 19:06:13 |
Owner | CWoo (3771) |
Last modified by | CWoo (3771) |
Numerical id | 11 |
Author | CWoo (3771) |
Entry type | Definition |
Classification | msc 03D20 |
Synonym | course-of-value |
Synonym | course-of-values |