% LaTex2e
\documentclass[12pt]{article}
\usepackage{amssymb,latexsym}

\def\res{{\upharpoonright}}
\def\qed{{$\Box$}}

\def\proof{{\par\noindent Proof\par}}
\def\dex#1{{\it #1}}
\newcommand{\dotminus}{\dot{-}}
\newcommand{\blank}{\;\tilde{ }\;}

\newcount\probno
\probno=0
\def\prob{\advance\probno by 1  \par\bigskip\noindent\the\probno .  }

\begin{document}
\begin{flushleft}
  M773 Computability Theory   Fall 2001\\
  A.Miller\\
  403 Van Vleck \\
  officer hours: M W 3:30-5:00\\
  miller@math.wisc.edu \\
  www.math.wisc.edu/$\sim$miller/m773/index.html \\
  Prerequisite:   None\\
  Textbook:  Robert I. Soare, Recursively enumerable sets and degrees,
               Springer-Verlag (1987) out of print\\
  Grading: One homework exercise assigned daily and due one week latter
in class.\\

\end{flushleft}


Recursively enumerable sets are those which can be listed by
an effective procedure. Two sets have the same (Turing) degree if there
are effective procedures reducing each to the other.

Topics:

 Unsolvable problems - a universal Turing machine

 Kleene's recursion theorem - Blum's speed up theorem

 The arithmetic hierarchy, classifying definable sets

 Post's simple sets, hypersimple sets, and hyperhypersimple sets

 Spector's minimal Turing degree

 Friedberg-Muchnik Theorem and finite injury priority arguments

 Friedberg's maximal set construction, enumeration without repetition

 Lachlan-Yates Minimal pairs, Sacks density - infinite injury priority

 Recursive ordinals, hyperarithmetic hierarchy, and Kleene's O.

\bigskip

A few years ago Soare decided that the terminology ``recursive function,
recursive set, recursively enumerable set, recursion theory'' should be
changed to ``computable function, computable set, computably enumerable set,
computability theory'' etc.

I think most everyone in this field now uses the new terminology.  Maybe
this is why his book is out of print.  We have received permission by
Springer-Verlag to copy his book for a small fee.

\bigskip
The following pages are taken from my book:

http://www.math.wisc.edu/$\sim$miller/res/index.html

see

Introduction to Mathematical Logic - Moore style

logintro.abs ... logintro.tex ... logintro.ps ...



\newpage

\begin{center}
{\bf Turing Machines and Computable Functions}
 \end{center}

A \dex{Turing machine} is a function $m$ such that for some
finite sets $A$ and
$S$ the   domain of $m$ is a subset of $S \times A$ and range of $m$
is a subset  of $S \times A \times \{l,r\}$.  We call $A$ the
alphabet and $S$ the states.

For example, suppose  $S$ is the set of letters $\{a,b,c,\ldots,z\}$
and $A$ is the set of all integers less than seventeen, then
$m(a,4)=(b,6,l)$ would mean that when the machine $m$ is in state $a$
reading the
symbol $4$ it will go into state $b$, erase the symbol $4$ and
write the symbol $6$ on the tape square
where $4$ was, and then move left one square.

\bigskip
\noindent
\input turing3.pic
\input turing4.pic

\bigskip
If $(a,4)$ is not in the domain of $m$, then the machine halts.
This is the only
way of stopping a calculation.  Let $A^{<\omega}$ be the set of
all finite strings
from the alphabet A.

The Turing machine $m$ gives rise to a partial function
$M$ from $A^{<\omega}$ to $A^{<\omega}$ as follows.  We suppose
that $A$ always contains
the blank
space symbol  $\blank$;  and $S$ contains the starting state $a$.
Given any word $w$
from $A^{<\omega}$ we
imagine a tape with $w$ written on it and blank symbols everywhere else.  We
start the machine in state $a$ and reading the leftmost symbol of $w$.
A configuration consists of what is written on the tape, which square of
tape is being read, and the state the machine is in.
 Successive
configurations are obtained according to rules determined by $m$, namely
if the machine is in state $q$ reading symbol $s$ and
 $m(q,s)=(q^\prime,s^\prime,d)$ then
the next configuration has the same tape except the square we were reading
now has the symbol $s^\prime$ on it, the new state is $q^\prime$,
and the square being
read is one to the left if $d=l$ and one to the right if $d=r$.
If $(q,s)$ is not in the domain of $m$, then the computation halts and
$M(w)=v$ where $v$ is what is written on the tape when the machine halts.


Suppose $B$ is a finite alphabet that does not contain the blank
space symbol $\blank $ then
a function $f:B^{<\omega}\to B^{<\omega}$
is a \dex{partial recursive function}
 iff there
is a Turing machine $m$ with an alphabet $A\supseteq B$
 such that $f = M\res B^{<\omega}$.  A partial recursive function
is \dex{recursive} iff it is total.  A function $f:\omega \to \omega$
is recursive if it is recursive when considered as a map
from $B^{<\omega}$ to $B^{<\omega}$
where
$B=\{1\}$.  Words in $B$ can be regarded as numbers written
in base one, hence we identify the number $x$ with $x$ ones written
on the tape.


For example, the identity function is recursive, since it is computed by the
empty machine. The successor function is recursive since it is computed
by the machine:

\input turing1.pic

In the diagram on the left, states  are represented by
little circles.  The arrows represent the \dex{state transition function} $m$.
For example, the horizontal arrow represents the fact that when
$m$ is in state $a$ and reads  $\blank$ then it
writes  $1$, moves right, and goes into state $b$.

The set of strings of zeros and ones with
an even number of ones is recursive.
Its characteristic function (parity checker) can be computed
by the following machine:

\input turing2.pic

 The following problems are concerned with recursive functions and
predicates on $\omega$.

\bigskip

\prob Show that any constant function is recursive.

\prob  A binary function $f:\omega\times\omega\to\omega$ is recursive
iff there is a machine such that for any $x,y\in\omega$ inputing
$x$ ones and $y$ ones separated by ``,'' the machine eventually halts
with $f(x,y)$ ones on the tape.
Show that $f(x,y) = x+y$ is recursive.

\prob Show that $g(x,y) = x y$ is recursive.


\prob Let $ x \dotminus y = max\{ 0,x-y \}.$ Show that $p(x)= x \dotminus 1$
is recursive.  Show that $ q(x,y)= x\dotminus y $ is recursive.

\prob Suppose $f(x)$ and $g(x)$ are recursive.  Show that $f(g(x))$
 is recursive.

\prob Formalize a notion of multitape Turing machine. Show that we get
the same set of recursive functions.

\prob Show that we get the same set of recursive functions even if we
restrict our notion of computation to allow only tapes that are infinite
in one direction.

\prob Show that the family of recursive functions is closed under arbitrary
compositions, for example $f(g(x,y),h(x,z),z)$.  More generally,
if $f(y_1,\ldots,y_m)$, $g_1(x_1,\ldots,x_n),\ldots$, and $g_m(x_1,\ldots,x_n)$
are all recursive, then so is
$$f(g_1(x_1,\ldots,x_n),\ldots,g_m(x_1,\ldots,x_n)).$$


\prob  A set is recursive iff its characteristic function is.
Show that the binary relation $x=y$ is recursive.  Show that the
binary relation $ x\leq y $ is recursive.

\prob Define
$$ sgn(n) = \left\{
\begin{array}{ll}
 0 & \mbox{ if } n=0 \\
 1 & \mbox{ otherwise}
\end{array}
\right.$$
Show it is recursive.

\prob Show that if $A \subseteq \omega$ is recursive then so is
$ \omega \setminus A.$ Show that if $A$ and $B$ are recursive so is
$ A \cap B$ and $ A \cup B$.

\prob Suppose g(x) and h(x) are recursive and A is a recursive set. Show
that f is recursive where:
$$ f(x) =
\left\{
\begin{array}{ll}
 g(x) & \mbox{ if } x \in A \\
 h(x) & \mbox{ if } x \notin A
\end{array}
\right.$$


\prob Show that the set of even numbers is recursive.  Show that the
set of primes is recursive.

\prob Show that $e(x,y)=x^y$ is recursive.  Show that $f(x)=x!$ is recursive.

\prob Suppose that $h(z)$ and $g(x,y,z)$ are recursive. Define $f$
by recursion,
$f(0,z)=h(z)$ and $f(n+1,z) = g( n,z, f(n,z) )$.  Show that $f$ is recursive.

\prob We say that a set $ A \subseteq \omega$ is
\dex{recursively enumerable}
 (re) iff
it is the range of a total recursive function or the empty set.
Show that a set is re
iff it is the domain of a partial recursive function.

\prob  Show that every recursive set is re  Show that a set is recursive
iff it and its compliment are re.

\prob  Show that if $f$ is an increasing total recursive function then the
range of $f$ is recursive.

\prob Suppose that $f:\omega\to\omega$ and $g:\omega\to\omega$ are
recursive functions such that $f(m)<g(n)$ whenever $m<n$.
Prove that either the range of $f$ or the range of $g$ (or both)
is recursive.

\prob Let $f(n)$ be the $n^{th}$ digit after the ``.'' in the decimal
expansion of $e$. ($f(1)=7$, $f(2)=1$, $f(3)=8$).  Prove that the function
$f$ is computable.

\prob Show that there does not exist a total recursive function $f(n,m)$
 such
that for every total recursive function $g(m)$ there is an $n$ such that
$f(n,m)=g(m)$ for every $m$.


\medskip
\newpage

\begin{center}
 {\bf  Church's Thesis}
\end{center}

  One day in the 1930's Alonzo Church said ``Say fellas I
think that every function that is effectively computable is recursive.
I think we have captured this intuitive notion by this formal definition.
From now on why don't we just assume if we describe an effective
procedure it is possible to write done a Turing machine that does
it.  This will save a lot of time verifying silly details.''
Actually these were probably not his exact words, in particular he
was interested in some bizarre notion known as the lambda calculus.
This philosophical position is known as  \dex{Church's Thesis}.

Here is an excerpt in support of Church's Thesis from
Alan M. Turing\footnote{
``On computable numbers, with an application to the Entscheidungsproblem'',
Proceedings of the London Mathematical Society,
2-32(1936), 230-265.}.  Note that Turing uses the word computer
for the person that is performing some effective procedure.


``   Computing is normally done writing certain symbols on paper. We
   may suppose this is divided into squares like a child's arithmetic
   book.  In elementary arithmetic the two-dimensional character of the
   paper is sometimes used.  But such a use is always avoidable, and I
   think that it will be agreed that the two-dimensional character
   of paper is no essential of computation.  I assume then that the
   computation is carried out on one-dimensional paper, ie. on a tape divided
   into squares.  I shall also suppose that the number of symbols which may be
   printed is finite.  If we were to allow an infinity of symbols, then
   there would be symbols differing to an arbitrarily small extent.
   The effect of this restriction of the number of symbols is not very
   serious. It is always possible to use sequences of symbols in the place
   of single symbols.  Thus an Arabic numeral 17 or 9999999999999999999
   is normally treated as a single symbol.  Similarly in any European language
   words are treated as single symbols (Chinese, however, attempts to have
   an infinity of symbols).   The differences from our point of view between
   the single and compound symbols is that the compound symbols, if they
   are too lengthy, cannot be observed at one glance.  This is in accordance
   with experience.  We cannot tell at one glance whether
   9999999999999999999999999 and 99999999999999999999999999 are the same.

``   The behavior of the computer at any moment is determined by the symbols
   which he is observing, and his `state of mine' at that moment.  We
   may suppose that there is a bound $B$ to the number of symbols or
   squares which the computer can observe at one moment.  If  he wishes
   to observe more, he must use successive observations.  We will also
   suppose that the number of states of mind which need be taken into
   account is finite.  The reasons for this are of the same character as
   those which restrict the number of symbols.  If we admitted an infinity
   of states of mind, some of them will be `arbitrarily close' and will
   be confused.   Again, the restriction is not one which seriously affects
   computation, since the use of more complicated states of mind can be
   avoided by writing more symbols on the tape.

``   Let us imagine the operations performed by the computer to be split
   up into `simple operations' which are so elementary that it is not
   easy to imagine them further divided.   Every such operation consists
   of some change of the physical system consisting of the computer and
   his tape.  We know the state of the system if we know the sequence
   of symbols on the tape, which of these are observed by the computer
   (possibly with a special order), and the state of mind of the computer.
   We may suppose that in a simple operation not more than one symbol
   is altered.  Any other changes can be split up into simple changes of
   this kind.  The situation in regard to squares whose symbols may be
   altered in this way is the same as in regard to the observed squares.
   We may, therefore, without loss of generality, assume
   that the squares whose symbols are changed are always `observed'
   squares.

``   Besides these changes of symbols, the simple operations must include
   changes of distribution of observed squares.  The new observed squares
   must be immediately recognizable by the computer.  I think it is
   reasonable to suppose that they can only be squares whose distance
   from the closest of the immediately previously observed squares
   does not exceed a certain fixed amount....

``   The operation actually performed is determined, as has been suggested
   above, by the state of mind of the computer and the observed symbols.
   In particular, they determine the state of mind of the computer after
   the operation. ''

\newpage
Other evidence for Church's thesis is the fact that all
other ways people have come up with to formalize the notion of effectively
computable function
(eg RAM machines, register machines, generalized recursive functions,
neural nets, etc)
can be shown to define the same set of functions.

In his paper Turing also proved the following remarkable theorem.

\begin{center}
{\bf Universal Turing Machine Theorem}
\end{center}


There is a partial  recursive function
$f(n,m)$ such that for every partial recursive function $g(m)$
there is an $n$ such that for every $m$,  $f(n,m)=g(m)$.
Equality here means either both sides are
defined and equal or both sides are undefined.

\proof
Given the integer $n$ we first decode it as a sequence of integers
by taking its prime factorization,
$n=2^{k_1}3^{k_2}\cdots p_m^{k_m}$ ($p_m$ is the $m^{th}$ prime number).
Then we regard each integer $k_j$ as some character on the
typewriter (if $k_j$ too big we ignore it).
If the message coded by $n$ is a straight forward
description of a Turing machine, then we carry out the computation
this machine would do when presented with input $m$. If this
simulated computation halts with output $k$, then we halt with output $k$.
If it doesn't halt, then neither does our simulation.  If $n$ does not
in a straight forward way code the description of a Turing machine,
then we pretend its coding the empty function, ie we just never halt.
\qed

\medskip

\prob Let $f$ be the universal function above and let
$K=\{ n : \langle n,n \rangle \in  dom(f)\}$. Show that $K$
 is re
but not recursive.

\prob The family of re sets can be uniformly enumerated by
$\langle W_e:e\in\omega\rangle$ where $W_e=\{n:(e,n)\in dom(f)\}$.
Show there exists a recursive function $d:\omega\to\omega$
such that for any $e\in\omega$ if $K\cap W_e=\emptyset$, then
$d(e)\notin K\cup W_e$.  This $d$ effectively witnesses that the
compliment of $K$ is not re.



\end{document}


