A pairing function is a function which establishes a one-to-one correspondence between and . Such functions are useful in the theory of recursive functions because they allow one to express recursive functions of variables in terms of recursive functions of variables with .
Two examples of pairing functions are the following;
where is the -th triangular number to show that is recursive. Likewise, one could use the recursions
to show that is recursive.
An easy way to see that effects a one-to-one correspondence between and is as follows: Define the “successor” of a pair to be the pair when ; otherwise, when , the successor is . It is easy to see that every pair has a successor and that every pair except is the successor of exactly one other pair. With this definition of successor, the set of pairs of positive integers satisfies the Peano axioms and, hence, is isomorphic to the integers. From the definition of it follows that, if is the successor of , then and that . This means that is the isomorphism described two sentences ago.
That effects a one-to-one correspondence between positive integers and pairs of positive integers follows readily from uniqueness of factorization of integers. On the one hand, for any number , one can find numbers and such that by factoring and letting be the power of which appears in the factorization. On the other hand, this is the only solution of because prime factorization is unique.
Since a pairing function sets up a 1-1 correspondence between and , there exist uniquely defined unpairing functions and such that
It is not hard to show that, if is recursive, and will also be recursive.
Once one has a pairing function , one can use it to set up 1-1 correspondences between and for any . For instance, one could define
(This manner of encoding a list one pair at a time will be familiar to anyone who has programmed a computer in LISP. In fact, LISP was designed to be serve as a mathematical definition of computability equivalent to Turing machines or recursive functions. A fun exercise is to write a compiler which translates LISP programs into recursive functions using the representation of lists by single integers defined above.)
An important consequence of the fact noted above is that there is a 1-1 correspondence between recursive functions of variables and recursive functions of a single variable. If we have a function , we can associate to it the function by the formula
Doing this can often save work by allowing one to draw conclusions about recursive functions of several variables from the special case of functions of one variable.
|Date of creation||2013-03-22 14:34:46|
|Last modified on||2013-03-22 14:34:46|
|Last modified by||rspuzio (6075)|