Professional Documents
Culture Documents
i, 2» +++, since for any particular m,
the function g given by
giy ,. Now,
using g and (Au we can write fas follows:
uls)1 itgte)=1
fo iets2 Two applications of the universal program 91
Now suppose that g is computable; sinedois computable, then, by
Church's thesis, so is /, which is a contradiction. Hence g is not
computable,
‘Our second application here fulfils the promise made in chapter 3 § 3.
22, Theorem
There is a total computable function that is not primitive recursive.
Proof. We give an informal proof Recall that the primitive recursive
functions are those functions that can be built up fiom the basic functions
by a sequence of applications of the operations of substitution and
recursion. Thus cach primitive recursive function can be specified by a
pplan that indicates the basic functions used and the exact sequence of
‘operations performed in its construction, To describe such a plan it is
convenient to adopt some notation such as the following:
Sub('; gi, e2on gm) denotes the function obtained by substituting
Bivon gm into f (assuming that f is In-ary, and ginny Bq are Mary for
some n);
Reo(/, g) denotes the function obtained from f and g by recursion
(assuming that fis M-ary and g is (M1 +2)-ary for some
If we write S for the function x-+ 1, then we have, for example, the
following plan for the function (x) = x2, We use letters giv. B10
denote intermediate functions.
Plan Explanation of the steps
Step 1. ,.=Sub(S:U,). * Bi, y, 2) = Uses, 2) D2 HL
ad ‘as 82(x, 0) P(x) =x,
Step 2. g,= Rec({, gi). lee y +1) = gilx, y, g,(%, y))
2(0,y) +1
Soy y)=Xty.
Step 3.85 Sub(@,iU2U).” gifs ¥,2)~ ay(&,2)-x+z
Repasgie 84(8, 0) =,
tp 4. gy = Reo (iiesy se ateseede.y
x + au).
So ag¢t,y) =.
Stop 5. = Sub(gy; U}, UD). (0) = Balt, x)=.
‘Thus a plan is somewhat akin to a program, in that it isa finite and explicit
specification of a function,
‘We now restrict our attention to plans for unary primitive recursive
functions. As with programs, we can number these plans in an effective5 Universal programs 92
\way, so that we may then define
),= the unary primitive recursive function
defined by plan number
Then 0p, #i, 02) + © + is an effective enumeration of all unary primitive
recursive functions.
From chapter 2. we know that every primitive recursive function is
computable. Hence there is a total function p such that for each n, p(n) is
the number ofa program that computes 6,) i.
n= p(n)-
Now the crucial point is that we can find such a fimetion p that is
computable, We argue informally using Church's thesis,
Recall the proofs of theorems 2-3.1 and 2-4.4, There we showed
explicitly how to obtain a program for the function
Sabi)
given programs for J, gij.ngqi and also, how © obtain a program for
the funtion
Ree(/,g)
sven programs for fand g. (In the next section (example 3.1(5)) we use
the sn-n theorem to show in detail that for cach m there is @ computable
futon such that for any «je, an index for Reo( =f") "is given by
(ci, 2); we can do a similar thing for substitution (see exercise 3.2(5a)).)
We also have explicit programs for the basic functions. Hence, given &
plan for a primitive reeusive function f involving intermediate functions
Bisse Be S4Y, we can effectively find programs for g, gy g*. and
finally f ‘Thus there is an effectively computable function p such that
On=$ 0
‘By Church's thesis, p is computable.
‘Now for the payoff! From p and the universal function (Au we can define
a total computable function g that differs from every primitive recursive
function 0,, We use a diagonal construction as follows:
£04) = 0,0) +1
, = >/ is undecidable
Proof. We can casily sec that this is a harder problem than the problem
sk 0"
Let c be a number such that <£, = 0; if /(x, y) is the characteristic
function of the problem <), = , i total} is notre2 Recursively enumerable sets 127
Proof, (Cf. the suggested proof of this result given in exercise 6-
6.14(76).)
Suppose to the contrary that fis @ total unary compu-
lable function that enumerates this set; Le, &Ai(iD> <£/Q),.. is a list of
all unary computable functions. Then we can easily make a diagonal
construction of a total computable function g that differs from every
function in this list. The diagonal motto says ‘make g differ fom) at
nso we put
0) = 3y7%(xy)
(theorem 2.4),
(@) For some partially decidable predate AM, yi»
oy
6A <> By. WAI Vines Yo) theorem 2.5),
(5) If 4/0, A is the range of a fotal unary computable function
(laeorem 2.7),
(6) Aisthe range ofa computable function (theorem 2.7),
(1) Ais diophantin (theorem 2.11),
(8) 4 is the sct of non-negative values taken by a polynomial
with integer coefficients (theorem 2.12)2 Recurisvely e nume rabie sets 129
Naturally, when working with re. sets one chooses the characterisation
that is most convenient for the purpose in hand, We illustrate this in the
proof of the next theorem,
213. Theorem
IA and Bare re. then so are Ar>B and AuB.
Proof For A n B use characterisation (2). Suppose that A = Dor(/)
and B = Dom(g) with fg computable. Then A n B = Doma), and /g
is computable.
For uB use characterisation (5). If A = 0 or B = 0 there is nothing
to prove. So suppose that A = Ran/) and B = Ran(g) where!, gare total
computable. Define h by
AGNI),
AQx+D= 260.
‘Then fis computable and clearly Ran(i) = AB.
(itis instructive to find proofs for ths theorem using each ofthe other
‘characterisations ofr. sets)
(Our next theorem gives another link between re. sets and recursive
sets,
2.14. Theorem
An inginite set is recursive if and only if it isthe range of a total
increasing computable function, ie. if ican be recursively enumerated in
increasing order.
Proof Suppose that 4 is recursive and infinite; then 4 is enumerated
by the increasing function fgiven by
1O)= we),
Nzi +1) =pyly GA and y >ffn).
Moreover, f is computable by minimalisation, recursion and the recur
siveness of A
Conversely, suppose that 4 is the range of the computable total
increasing funetion /; i.e. (O)S(Dsi2)<... I is clear that if y = ffm)
then n ysHence we have
ved <=> yGRan()
320 ,2). (Formally we have (x) =* /0(,) = 0, ie, we used the
function k to transform or reduce each instance of the general problem
“x € W,"to an instance of the genetal problem *<£, = 0' In this chapter we
consider two ways of making the idea of redueibility precise, and for each
we discuss the associated notion of degree (of difficulty) that arises
It is more convenient to deal with reducibility between sets rather than
between problems, remembering, that any problem is represented by @ set
‘of numbers. The informal idea of a set 4 being reducible to a set B can be
expressed in various ways: for instance
(@) ‘Given a decision procedure for the problem *xGB’, we can
construct one for °x e4’"
(b) ‘For someone who knows all about B, there is a mechanical
procedure (that uses his knowledge of B) for deciding questions
about A.”
(©) ‘Questions about A are no harder than questions about B.”
(@) “The degree of difficulty of the problem ‘x G 4’ is no greater
than that of the problem x GB."
It turns out that there are several non-equivalent ways of making this
idea precise, The differences between these consist in the manner and
extent to which information about B is allowed to be used to settle
questions about A. In §§ 1-3 we shall investigate one of the simplest
notions of reducibility, called many-one reducibility, which includes all of
‘our earlier uses of the informal idea. Inthe final sections we shall discuss a
‘more general notion known as Turing reduetbility9 Reducibility and degrees 158
1. Many-one reducibility
1. Definition
‘The set d is many-one reducible (abbreviated m-reducible) to
the set B if there is @ total computable function fsuch that for all x
HA MT ffeeB.
We shall write this A-<,B1 and we shall write f: 4<,B to indicate that f
is a total computable function demonstrating that 4 <,, B.
Note. The phrase many-one is used to distinguish this kind of reducibility
from a related notion called one-one reducibility, for which the function f
is required to be injective.
We have used m-reduciblity implicitly on many occasions in earlier
chapters. The s-m-n theorem is often needed to establish many-one
bility, as we see in the following examples.
12. Examples
1. Im chapter VI we showed that Kis m-reducible to each of the
following sets
(a) (X:<£, =O} (theorem 6-1.4, quoted above),
() (x ceW,} (theorem 6-1.6).
2. If we examine the function k given in the proof of theorem 6-1.6
We se thatx K <=> > i total. Hence
IK , is total} fx: , = 0).
Proof. Using the s-mn theorem obtain a total computable
function k such that <£,,.,~ 0%", for allx. Then
ke { , isnot total} is m-reducible
0K
Proof. Feom corollary 7-2.17 neither ofthese sets is re; apply
theorem 1.30).9 Reduciblity and degrees 160
‘The exceptional behaviour of the sets 0, N as given in theorem 1.3(@),
(Oe (@) is PF Ihe Pike yew bE Pl Pr simplicity of the
notion of m-reducibilty. Another rather unsatisfactory feature is that the
sots 4 and 4 are not necessarily inter-reducible (contrary to the intuition
that the problems ‘xed’ and 'x£4" should be equally difficult), as we
15. Corollary
If A is an re. set that is not recursive, then AA and.AY A.
Proof. By theorem 1.3(@) if 4 <, 4, then 4 is re., a contradiction, For
A wse.tleorem 1.36)
‘The next result shows again the key role played by the re, set K.
16. Theorem
Aset isre. ifand only fA %(K.
Proof. If A=théi theorem 1.3(¢) ‘ells us that A is re, Conversely
let d be any 1. set. Define a computable function /(x, y) by
“il ifxca,
») undefined ifkéA.
‘The smn theorem gives a total computable function 5(s) such that
fbs, y) = ()(x) is deter
mined (if at all) by a finite amount of positive information about This
smeans information asserting that f is defined at certain points and takes
certain values there, as opposed to negative information that would
indicate points where fis not defined. Using ths idea the term continuous
can be rigorously justified as follows.
The positive information topologs' onvis defined by taking as base of
‘open neighbourhoods sets ofthe form
U, “69 (We By it)
Thus fbelongs to U, iff 0 is comect postive information about fis then
an easy exercise to see that an operator is continuous with respect tothe
positive information topology precisely when it possesses property
13@)
The following characterisation of recursive operators using, continuity
will make it easy to establish recursiveness of various operators.
15. Theorem
Let ( x) is undefined for al others,
ts compuable
Proof. Suppose that (Oay’y <=> 30 £0 and 010,%) —y);
the relation on the right is parially decidable, o 0 is computable by
theorem 66.13,
Conversely, suppose that conditions (a) and (4) ofthe theorem hold:
then
Hijet) =" y 3040 gland (0)x) —y) by (a))
<=> 30(0 g/ and 0(0, x) = y) (by (5),
whence 0 is @ recursive operator.
‘This theorem enables us o show quit easily thatthe following
‘operators are all recursive:
16, Examples
(a) (Tre diagonalisation operator) OUI, 0) UO),
> is obviously continuous, and 0(0, x) —0(x, x) is computable.
0) By (x + LOX,
O()x4-1, y ADV, Mx 1, yD).
To see that )
includes the function that is defined nowhere includes the “undefined
constant, which is denoted by w. Thus > NU(e}, and an operator
(pdm Fa a recursive functional if there is a computable function <£0)
such that fr any fe andy.
00) =y iff 20(0 and= f o(8)~y).
We write <>() = w if <£>() is undefined; this emphasises that <2> is stil
thought of as being a total operator.
‘We should point out that in some texts the term partial recursive
{factional 3%, -> &, i used to describe recursive operators, including the
case n= O. In such contexts the word partial describes the kind of object
being operated on rather than the domain of definition ofthe operation
‘We shall not discuss here the extension of the ideas of this section to
partially defined operators and the corresponding partial recursive opera-
tors 0: FF. Te reader is referred to Rogers [1967] for a fll
discussion of these and related mates
Exercises
1. Show thatthe following operators are recursive.
@) O/=P (feFs
@) a”(N) are called enumeration
‘operators and are discussed in full in Rogers (1967}.)2 Effective opera tions on computable functions 189
2. Effective operations on computable functions
In chapter 5 § 3 we considered that certain operations on
computable functions should be called effective because they can be given
by total computable functions acting on indices. For instance, in example
5-3.1(2) we saw that there is a total computable function g such that for
all ecfod, (d> J? = us<.
We shall “see in this section that any recursive operator 0, wher
restricted 1o computable functions, yields an effective operation of this
kkind on indices. This is the first part of a theorem of Myhill and
Shepherdson. They proved, moreover, that all such operations on indices
of computable functions arise in this way.
We shall prove the two parts of the Myhill-Shepherdson result
separately, taking the easier part first.
2.1. Theorem (Myhill-Shepherdson, part I)
Suppose that VF,» F, is a recursive operator. Then there is a
total computable function h such that
vie! (ay,
Proof. Let be a computable function showing that V7 is a recursive
‘operator according to definition 1.1. Then for any e we have
AERA) = y 300!" andt(Xi) is
defined and equals y,, then
(3) compute i, x) and if defined check whether it equals y
IFR (z,€, x,y) holds, this is a mechanical procedure that will tll us so in
finite time, as required.10 Effective operations on partial functions 190
Since R/€ X, y) is partially decidable, so is the relation
3 R(z, x, y) by theorem 6-6.5): but
BA Rfa,€, % y) <=> NYMR) —y (Krom the definition of R)
<> gle, x) = (fiom the definition of g)
‘Thus g/e, x) — y is partially decidable, so by theorem 6-6.13 g is comput-
able,
Now the s-m-n theorem provides a total computable function jt such
that oy
KLE)
YR)
from which we have 2, = Wid!”
Notice that the function # given by this theorem for a recursive
‘operator VF) >; is extensional in te following sense.
22. Definition
A total function
then (g) = g, then fipQe.
Hence, iff is total, its the only fed point of #>
Proof We use the continuity and monotonicity of (p to construct the
least fixed point /it as follows. Define a sequence of functions {f,) (m 6 M)
by
fo =o (the function with empty domain),
Mi= <0),
Then fo = JOV5; and if feu by monotonicity we have that f+ =
isthe least fixed point of 0, suppose that Og) ~ a; then
clearly fo fog, and by induction we see that. fr all n. Hence
i<*> ( g, as required. Moreover, if / (x + 1) = undefined.
{f0=1,
Vaet)=a,
‘Then the least fixed point is
Other fixed points of 0 take the form10 Effective operations on partial functions 194
2 Recall the definition of the Ackermann function’ in example
255
Oy=yel,
+ 1.0) 0,
(43) fle)
(We are assuming that in Z we can formulate conditional expressions such
as this) Using the equation (4.3) we ean formally evaluate the value /2),
for instance, a follows
i(3) —2x/(2) —2x2x/(1) = 2x2x2x/(0) —8;
ete we have made successive substitions and simplifications using the
formal equation (43). Hene iff, s the fanetion deemed to be given by
the program (4.3) we would have (3) 8
‘With more complicated recursive programs there may be more than
one way to use the formal equation f(x) = T(/, x) in such an evaluation
procedure. Consider, for instance, th reeursive program
itx=0
GD TOD Feces, y) i600
Suppose that we try formally to evaluat 0). We have
45) M40+H0,00).
But now there is a choice of occurences of f for which to subsite10 Effective operations on partial functions 198
14/,)- Choosing the leftmast one and simplifying we have
(0,0) (0, (1, 0))=1 (singe x= 0),
If, on the other hand, we substitute forthe rightmost occurrence of ‘each
time, we obtain from (4)
Ml, ©0411, 09 10410,1, 09)
“HOONOLO.O)>
and in this case no “value for (0) emerges
‘A compuration rule is a rule R that specifies how to proceed when
confionted with such a choice of possible substitutions during any formal
evaluation procedure. Tae computational rules we considered for the
recursive program (4.4) were ‘leftmost’ (LM) and ‘rightmost’ (RM).
There are many other possible rules. For any computation rule R, and
recursive program ix) = 1(, X) we define the Function fog bY: y(t) is
the value obtained when f(a) is formally evaluated using the rule R. If no
value is thus obtained, fy4/a) is undefined. (Thus for the recursive
program (4.4) we have /,§M(1, 0) = 1, and /.RM(1, 0) s undefined.)
So we see that each computation rule gives ® meening to any recursive
program (and, at the same time, a method of implementing i)
‘The above example demonstrates that different computation rules may
tive different meanings fo any particular recursive program, The problem
row for the computer scientist who chooses this computational approach
is to devide which computation rule to choose. Moreover, for any rule R,
there is the question of determining in what sens, if any, the Function fg
satisies the equation
1a) =* 1,3).
‘The fixed point approach, using the first Recursion theorem, avoids
these problems, and infact sheds light on both of them, as we shall sec
The fixed point approach An expression #/, x) of L gives vise to an
operator d>: 3>, > & by seting
<@)O)"TBA)
for any g 6 &. Moreover, in most programming languages the finite and
explicit nature of the expression 1(/, x) ensures that 0 is @ recursive
‘operator. The first Recursion theorem now tells us that 1 The second Recursion thearem 201
(If <>x(x) is undefined, we mean the expression on the Iefl of (*) to be
‘undefined; altematively, we can take the left of (*) to denote
/(x}é A.forallx.
(On the other hand, by theorem 1.1, there is a mumber 7 such that
n (n>
whence, by (6)
bym% bq (n=K)
On the other hand, if f is computable, then by corollary 1.3 there is a
number n>k such that yq) = yq a contradiction
Applications of the second Recursion theorem such as the following
‘can be interpreted in anthropomorphic terms.
Let P be a program. We can regard the code number y(P) as a
description of P. We could regard the program P as capable of self
reproduction if for all inpuls x the computation Pfs) gave as output its
‘own description, y(P). At first glance, it would seem difficult to construct,
‘a selfreproducing program P, since to construct P we would need to
know y(P), and hence P itself, in advance. Nevertheless, the second
Recursion theorem shows that there are such programs.
L8, Theorem
There is a program P such that for allx, POxIy(P); Le. Pis
selfreproducing.
Proof. If we write n for y(P), the theorem says that there is a number m
such that
(n(x) =n (forall x),
‘To establish ths, simply apply corollary 1.4 to the function ffm, x) =
We tum now to psychology! Recall the notation and terminology of
chapter 5. There we defined a total computable function afe, x, 1) thatI The second Recursion theorem 205
codes the state of the computation Pfs} afler ¢ steps; afe, x, 1) contains
information about the contents of the registers and the number of the
next instruction to be obeyed at stage & It is clear, then, that complete
details of the first # steps of the computation Pfs) are encoded by the
umber
atexzapTiel
Let us call the number a*(e, x, 1) the code of the computation P,(s) to
steps, Cleatiy a* is computable.
Suppose now that we are given a total computable function jp and a
program P. By the ij-analysis of the computation P(s) we mean the code
of the computation P(x) t &(x) steps. We call a program P &intro-
spective at x if P(x) converges and gives as output its own (E-analysis;
‘we call P totally icinirospective if iis (A-introspective at all x.
19. Theorem
There is a program P that is totaly i-introspective.
Proof. Simply apply corollary 1.4 to the computable funetion /fe, x) =
er*(e, x, (Mx)), obtaining a number m such that
, with the following properties:
(a) Domi.) = Dom), for ali;
(6) The predicate (pfs) —y’is decidable
1.7. Lemma
The functions given in examples 1.5 above are computational
complexity measures,
Proof. We give sketch proofs for the examples 1.5(1) and 1.5(2),
Jeaving 1.5(3) as an exercise (1.8(3) below), In each case it is only part (8)
‘of definition 1.6 that requires any thought
(1) To decide “0, (x) — ywhere ,(s) = number of jumps made
during P (x). Suppose that P, has 5 instructions; then at most S
"We mean here thai jump instruction Jf, mp) is encountered then a jump (0
2,) is made ifr, = ry; but not otherwise1 Complexity measures 217
consecutive steps of P,(s) ean be performed without making a
jump. So run Pf) for up to 1 4- (y 4 Ds steps. If Ps) stops in
fewer than this mimber of steps, then count the number of jumps
made to see if it is y. Otherwise (ie. if P,(x) has not stopped after
1+ (y+ 1)S steps) P,(x) will have performed at least y 4-1 jumps,
so we conchude that 0,(8)# y.
(2) To decide “0(x) =) where ,(4) = maximum number bold
in any register during P(x). Let u-p(P), and consider all
possible nomhalting states under the program P, with
Fivcoss MySy. There are s(p 4-1)" such states that are distinct,
Run P,(s) for up to 1 4-s(y 4-1)" steps. If P(x) stops after this
number of steps or fewer, then find the maximum number that
‘has occurred in any of the registers and see if ti y. Otherwise (i
Ps) bas not stopped) one of two possibilities will have occurred
) the computation has been in the seme state on two separate
‘occasions, 80 P(x) is in a loop and 2x 4 3, then the restriction to almost all
‘nin theorem 1.4 cannot be improved,
Lot, be the complexity measure given in example 1.5(2). Show
that whenever RO Ops Ri
(8) 1EZ, = S(o let be the statement
Vin Vii RR Kans Kon > RRs Lyne Xn)
(©) 1E2Z,=Tee,n) let, be the statement
Vises Vist RO es Rane Non DO ROT 2X,
(4) WI,= Wasim, g let 7, be the statement
Viki. Vig: ROXjvon Xo i) 2 (ky Xn > Rode
A GHX PRIMI Ny DD.
Now for any ae M let a, be the statement
(TAMIA... AUARO, 0, 0,0)
Fri IK, Ron aye SED,
Where the statement VaVy((e ) Ax 0). (This ensures
that in any interpretation, ifm, ne N and m =n thea m =m)
The statement R(, 0.» 0,1) comesponds oa stating state
[alo]o next instruction A,
and any statement R(xiun Xy s+1) corresponds to a halting state
(ince there is no instruction A+i). Thus we shall see that
(9 Pal <=> er, isvalid,
Suppose first that P\a){, and that we have a structure in whieh Fyn, 7,
and R(@, Ov. 0,1) hold, Using the statements Ty, .., T, we find that
cach of the statements R(t, fy K) corresponding to the successive
states in the computation also holds. Eventually we find that & halting
statement R(bn .., by 8 + 1) holds, for some bu.., 6, B.and hence
Bi. 3, RO, os Xy 8 1) holds. Thus a, is valid.6 Decidability, undecidability and partial decidability m2
Conversely, if a, is valid, it holds in particular in the structure N- with
the predicete symbol R interpreted by the predicate R, where
Ry(ai... a, 8) = Atsome stage in the computation P(a) the
registers contain a, fly in, O,.. and
the next instruction is /,
‘Then To...» f and R(@, Oy. 0, 1) all hold in this structure, hence so
does 3x. 3, ROxjvos X41). Therefore Pra).
If we take P to be a program that computes the function kay = hence dU.
For ifz 6 K, there is ¢ such that P(2) in # steps, Then g(z, #9 —od>(°(1) is
undefined for "> 1. Hence <> is finite, On the other hand, if zé K, then
(2, M0) forall, $0 <9 :
Now (*) means that zeK <=> s(Jed, which implies that Kis rey a
contradiction, Hence there must bea finite OOF with esi
For the reverse implication, suppose that fis a computable function,
such that there is @ finite fumetion esd. with 0%, bul fésd. Define
computable fumetion 2, 0 by
(no ifrG Dom) or20K,
Tundefined otherwise.
gz.)
8
‘The s-m-n theorem provides a total computable s(2) such that g(2,
00), From the definition of g and the fact that 0 / we see that
UGK > dyo)= Mbence 1. The instruction
O(n) is called an oracle instruction
To be able to obey oracle instructions the URMO must be linked to an
oracle, which supplies values of some given function x on demand. We say
then that the URMO has the function x in its oracle, The fumetion x is not
‘thought of as part of the URMO itself,
The response of the URMO to an oracle instruction O(n) is as follows:
ifx is in the oracle, then replace r, (the contents of register R,) by x(«)-9 Reducibitity and degrees 168
‘This is denoted in flow diagrams by
'=x¢rn) oF 2(7,)">Rn
‘The URMO, with x in * oracle and obeying the instruction O(n) may
bbe envisaged as shown in fig. 9
‘A program is, as before, a finite sequence of instructions. The URMO
‘operates under a URMO program P in the same way as the URM, with
the following additional stipulation: after obeying an oracle instruction /&
in P the next instruction is J,+1
We emphasise that in a URMO program P no particular function x is
‘mentioned. Thus the meaning of P varies according to the function
supplied in the oracle. However, @ computation under P can be carried
cout only when a particular function x is supplied, so we write P* to denote
the program P when used with the function x in the oracle. Thus we write
Pain. 5 a)
for the computation by P, with x in the oracle, and with initial configura-
tioM ai, dap dy 0, 0,5 and we write
oe
to mean that the computation P*(a) stops with the number b in register
Ri
We can now make the following definitions (parallel with definition
13.1).
Fig. 9.
® RR, R
‘With sling configuration
TO fel4 Relative computability 169
42. Definition
Let.x be a unaty total function, and suppose that fis a partial
function from ti,
(@) Let P be a URMO program. Then P URMO-computes f
relative tox (or fis x-“°"pud by P) if, for every ae and N
beIMy
Pe(ajlb itt fla) — 6,
@®) The function f is URMO-computable relative to x (or just
X-computable) if there is a URMO program that URMO-
‘computes it relative to x-
We write tédenote the class ofall x-computable functions.
‘We are now in a position where we could define Turing,reducibility.
However, to aid a better understanding of this concept when we come to
it, we shall first outline a little ofthe development ofthe theory of relative
computability
Most methods and results from unrelativised computability have
‘counterparts in relative computability. Thus in many of the theorems that
follow we supply only a sketch proof or a reference to the unrelativised
version of the same result. Throughout this section x stands for a total
unary function.
43. Theorem
@ xee
® se
(©) fXis computable, then % = %6\
(@) © is closed under substitution, recursion and minimalisation,
(©) ifs a total unary function that is x-computable, then
et gc
Proof.
(a) Use the URMO program 0(1).
(b) Any URM program is a URMO program.
(©) In view of (B), we need only showéthat® Suppose that/
is x-computable and that x is computable, Proceeding
informally, we can compute any value of / as follows: use the
X-algorithm for /, and whenever a value of x is requested simply
compute it using the algorithm for x- This is an effective pro-
cedure, so by Church’s thesis / is computable. (We leave the
reader to provide @ formal proof of this result; see exercise
4.10(3).)9 Redweibility and degrees 170
(@) The proofs are identical to those of theorems 2-3.1, 2-4.4
and 2-5.2
(©) The proof is similar to that for (c) (which is really a special
cease of ()).
Other approaches to relativised computability Any alternative
approach to computability can be modified to provide a corresponding
notion of relative computability. A relativised version of the Fundamen-
tal result (theorem 3-1.1) can then be proved, and this leads to the
formulation of Church’s thesis for relativised computability
We mention here only the relativised notion of partial recursive
function:
44. Definition
The class 3! of x-partial recursive functions is the smallest class
(@) the basic fumetions arein 2"
) xR
(©) 1%" is closed under substitution, recursion and minimalisa-
tion.
‘The phrases partial recwrsive in x or partial recursive relative to x are
also used with the same meaning as x-partial recursive.
‘The notions x-recursive (or recursive in, or relative fo,x) and y-primitive
recursive (ot primitive recursive in, ot relative (x) are defined in the
obvious way.
Corresponding to theorem 3-2.2 (and proved in the same way) we have
43. Theorem
For any x, < = <2
Numbering programs and functions URMO programs can be
effectively numbered or coded by an casy adaptation of the method used
in chapter 4 for URM programs. Let us assume that this has been done, s0
that we have a fixed effective enumeration (without repetitions)
00, Qin, 445
of all URMO programs.’ Then we write
(12m for the n-ary function *-computed by Qy
ach URM program P appears inthis Hist; in most cases, however, is umber
here wll be diffrent fon that estigned to it in chapter 44 Relative computability m
m for <2.
Ws, for Dom(,,),
2, for Rants)
‘The s-men theorem (4-4.3) has a reltivised counterpart with identical
proof
48.
Foreach m, n>1 there is a total computable (m ~ \)-ary function
six) such that for any x
OP =O enly
Note. The function s,here differs, of course, from the function given the
same name in theorem 4-4.3, Note, however, that s™ here is. still
‘computable (not merely x-computable) and does not depend on x-
Universal programs for relative computability Relativisation of the
proof of theorem 5-1.2 gives immediately
41. Theorem
For each nthe universal functde"for mary x-computable
functions given by
Wex)mderts)
is x-computable.
Remark. A careful examination of the full formal proof of theorem 5-1.2
would show that there is a URMO program Qi\ independent of x, that
X-computes (Ati for any x-
Xrecursive and x-re. sets The relativised notions of recursive and re.
sets are given by:
48. Definition
Let d bea set
(a) Aisx-recursive (or recursive in) if e, is ;w-computable,
(6) Aisx~ (ore. inx) if the partial characteristic function
Moat ikea,
undefined ifxEA,
is x-computable.9 Reducibilty and degrees Im
‘The following selection of basic results about *-recursive and ;l-re. sets
is proved by the addition of the prefix x~ * Ihe appropriate places in the
proofs ofthe corresponding unrelativised results in chapter 7;
49. Theorem
(@) Forany set A,A isx-recursve fA and d are ="
() For any set A, the folowing are equivalent
(i) Aisx,
(i) A= Whyfor some m,
Gi) A= B% for some m,
(iv) A= 0 or isthe range ofa total computable function,
(9) for some xdecidable predicate R (x3).
ayRisy)
(Ris x-decidabe fits characteristic function is x-computable).
(c) Let K*= {x:x © W?}; then K* is X""-e. but not x-recursive.
xed
Computability relative to a set For any set 4, we define computability
relative to A (or just A-computability) to mean computsbility relative to
q the characteristic function of 4, Thus we write
P* for Po* (if Pisa URMO programm),
x for all x (or else show that by adding
some redundant instructions to the end of Py, an equally
suitable computable function s'fx) can be found, with s(x)>x).
Now observe that given any mumiber k we can effectively find an
index. m for s(x) with m=>k Then, following the proof of
theorem 1.1, we have that n = s(m) is a fixed point for /, and
n= sim) m> k It is now a simple matter to construct a
function n/t) as required.)
9. Prove that the second Recursion theorem does not depend on
the particular effective numbering of programs that is chosen,
(Hint, Let 8 be another effective numbering of programs; let
©, ~program given code number m by 5; let ify ~ the unary
function computed by Qy. We have to prove that for any total
computable fumetion f there is a number m such that iff) = Wn2 Discussion 207
For this, show that there is a computable bijection r such that
P, = Qr(x)I then show that itis sufficient to establish that there is a
rnumber m such that yim) = On
10, Suppose that in the tale just before these exercises, our special
agents find that the enemy's computer operators have become
extremely sophisticated - they have only one program, a uni-
versal program, Can our men now completely accomplish their
task?
11, Could a chimpanzee succeed where the special agents failed? (A
philosophical problem.)
2 Discussion
The second Recursion theorem and its proof may seem a litle
mysterious at frst, We shall see, however, that it is essentially a simple
diagonal argument applied to effective enumerations of computable
functions.
‘Suppose that iis @ computable function. If is total, then the
‘enumeration £ given by
Exeonion, Snir eager
is an effective enumeration of computable functions. If is not total, we
‘can still regard A as enumerating a sequence of computable functions &
bby adopting the convention that for any x the expression denotes. the
function given by
OFiex\(y) = OulFCa), y)
{oix)(y) fh (x) is defined,
(undefined if h(x) i undefined.
‘Thus if h(x) is undefined, Oy) is the function that is nowhere define.
‘The following lemma shows thatthe sequence F thus enumerated by
is an effective enumeration even when h is not total
21, Lemma
Suppose that h is a computable function. There is a total compu-
table function hf such that h and h’ enumerate the same sequence of
‘computable functions
Proof. The s-m-n theorem gives @ foal h such that
(RAy"AUMY), 9).
‘We can now explain the idea underlying the proof of the Recursion
theorem. For any &; let us denote by B, the sequence of computable11 The second Recursion theorem 208
functions effectively enumerated by
You might also like