Docsity

Theorem 9.4 to 9.8: Recursive Functions and Turing Machines, Study notes of Computer Science

Toggle sidebar
bg1
CMPSCI 601: Recall From Last Time Lecture 7
Theorem 9.4: The busy beaver function,

, is even-
tually larger than any total, recursive function.
Theorem 9.5: There is a Universal Turing Machine
such that,
   
Theorem 9.6: (Unsolvability of Halting Problem) Let,
HALT
 
TM

eventually halts
Then, HALT is r.e. but not recursive.
Listing of all r.e. sets:
 
!
" 
!
# $
Corollary 9.8: Let,
%
" & '() $
*
+ &,(# $
" # -
Then,
%
-
r.e.
.
Recursive
/
1
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12

Partial preview of the text

Download Theorem 9.4 to 9.8: Recursive Functions and Turing Machines and more Study notes Computer Science in PDF only on Docsity!

CMPSCI 601: Recall From Last Time Lecture 7

Theorem 9.4: The busy beaver function,

, is even-

tually larger than any total, recursive function.

Theorem 9.5: There is a Universal Turing Machine 

such that,

Theorem 9.6: (Unsolvability of Halting Problem) Let,

HALT

TM

eventually halts

Then, HALT is r.e. but not recursive.

Listing of all r.e. sets:      

Corollary 9.8: Let,

Then,

%

  • r.e.. Recursive /

Notation:

means that TM

converges on in-

put

, i.e.,

N

    

Fundamental Theorem of r.e. Sets: Let N.

T.F.A.E.

  1. is the domain of a partial, recursive function, i.e.,

dom

N

 or is the range of a total, recursive function,

i.e.,

 or = range(

) =

N

, for some

total, recursive function

.

  1. is the range of a partial, recursive function, i.e.,

N

for some

N /

  1. is r.e., i.e.,

, for some

N

: Assume (2). If

 then

N

where

  is a Turing machine that halts on no inputs.

Otherwise,

N

, i.e., is the range of the partial,

recursive function

.

Note: Even though

is total, it is still considered a

“partial, recursive function”. However, of course,

is not “strictly partial”.

: Assume (3),

N

.

From

we construct

 , which on input

does the

following:

  1. for 

  $ to 

  1. run



for  steps each.

  1. if any of these output

, then return (1)

The above construction is called dove-tailing.

Claim:

    #     .

If

, then

range(

).

So for some and ,

and the computation

takes steps.

Thus, at round 

,



will halt and output

“1”.

If



, then



will never halt.

Thus,

    &     $  .

This theorem lets us put the “enumerable” in r.e..

A nonempty language is said to be Turing enumer-

able if there exists a TM that, when started on blank tape,

lists the elements of . The TM will take forever to do

so if is infinite, and it might repeat elements.

It should be pretty clear that for nonempty sets “Turing

enumerable” means exactly “the range of a total recursive

function”. So except for

 , “Turing enumerable” means

exactly “ r.e. .”

An infinite set of numbers is Turing enumerable in in-

creasing order if it is Turing enumerable by a machine

that lists  before whenever .

It’s pretty easy to see that an infinite set is Turing enu-

merable in increasing order iff it is recursive:

 : Keep running the TM until you hit the target or

pass it.

  : Run through all numbers in increasing order and

test each one, listing the ones that are in the language.

An Example:



Claim:

 .

Proof: Define 

as follows:

    erase input;

write

if 1 then write 17

else loop

     $   ^  # $ 



  





If

 really means “

is no harder than  

 ” or

equivalently “ ^ 

 (^) is no easier than

”, then we should

be able to conclude that  

 is not recursive because

is not recursive. The next theorem will let us do this in

general.

Fundamental Theorem of Reductions:

If  are languages then:

  1. If is r.e. , then is r.e..
  2. If is co- r.e. , then is co- r.e..
  3. If is Recursive , then is Recursive.

Moral: Suppose  . Then,

 If is easy, then so is.

 If is hard, then so is .

Another way to phrase this is that r.e. , co- r.e. , and Recursive

are each downward closed under reductions.

Recall our hypothesis for this proof:



  i.e.,



The last two parts of the theorem follow directly from

the first:

  1. Observation: 

  .

co- r.e.



r.e.

r.e.



co- r.e.

Recursive



r.e.

co- r.e.

r.e.

co- r.e.

Recursive



Definition 7.2 Let N. is r.e.- complete iff

r.e. , and



r.e.



Intuition: is a “hardest” r.e. set. In the “  ” ordering,

in that it is above all other r.e. sets.



If you have seen a definition of “ NP -complete”, this def-

inition should look familiar. NP -completeness was ex-

plicitly modeled on this historically earlier concept.

It is perhaps odd that there are any r.e. -complete sets at

all – the definition doesn’t suggest why there should be.

But in fact we’ve already seen one.

Proposition 7.4 Suppose that is r.e.-complete and the

following hold:

1.

r.e. , and

2. 

then is r.e.-complete.

Proof: Show:



r.e.



Know:



r.e.



Follows by transitivity of  :  .



Corollary 7.5  

 is r.e.-complete.

Every r.e.-complete set is r.e. and not recursive.

HALT

TM

eventually halts

Proposition 7.6 HALT is r.e.-complete.

Proof: We have already seen that HALT is r.e. It thus

suffices to show that

 HALT.

We want to build a total, recursive  such that for all

 - N ,

 

HALT



halts

That is, we want,

halts, where 

  )   '

Given

 , let,

  

Erase input Write

  if 1 then halt

else diverge

Letting 

, we have that

halts

 

HALT