definition: A set, S, of strings from some symbol alphabet is decidable ( or recursively decidable or
recursive) if
there is Turing machine , M. which ,
given any string in the alphabet, always halts in some special state,H,after printing Y (for yes) if the string is in S and N (for no) if the string is not in S.
M is called the decision machine for S. So, one says that a set if decidable iff it
has a decision machine.
Church's Thesis: Any intuitively computable
process can be simulated by some Turing machine( or any of several models of
computation that have been shown to be equivalent to Turing machines. This
statement is a thesis ( not a theorem) because it can never be proved. It is a statement of belief about what it means to be intuitively computable.
However, there is strong evidence that it is true. The evidence is that all
known models of computation either compute the same functions and accept the
same languages as do Turing machines or else a subset thereof., being less powerful than Turing machines. No one
has every conceived of any computable process that can not be done on a Turing
machine, subject to suitable encoding.
The intuitive notion of decidable appeared
before the notion of Turing machines. In fact, Turing introduced the notion of
Turing machine in order to give a precise mathematical characterization of decidability,
definition: A set, S, of strings from
some symbol alphabet is (intuitively) decidable ( ( or recursively decidable or recursive) if there is some
computable process, or program,. which ,
given any string in the alphabet, always halts , after returning Y if the string is in s and halts after
returning N , if not.
If one believes Church's Thesis, the two definitions
of decidable are equivalent.
Because of the wide acceptance of Church's Thesis,
one can prove something is computable merely by exhibiting a program or
intuitively computable process for it,
instead of producing an actual Turing
machine.
Church's Thesis also provides a
new intuitive definition of Turing machine
language: A set L is a Turing
machine language iff
there is some program p which given input
x, halts if x Î L and which loops forever if x Ï L.
Turing machine machine language might well be called
semi-decidable, because there is a
program that
halts when the answer is "yes", but unlike
a decision program, fails to halt when the answer is "no".
The famous
halting problem is: Is the set K, just defined, decidable?
Or to put it another way: Is there a computable
process for determining whether a Turing machine will halt , given itself as
input?
The answer is no, and the result follows from what
we already know about K together
with the following: theorem.
Theorem: A set S is decidable iff both S and ~S are Turing languages.
Proof
( if) Assume S is decidable. Prove that both S and ~S are Turing machine languages.
Let M be the decision
machine for S. We first modify M to build a TM that accepts S.
To do this, add code to M so that instead on halting
after it prints N, it jumps into an
infinite loop.
To find a machine that
accepts ~M, modify it so that after
printing Y , it goes into an infinite loop ,
instead of halting, and also change
it so that it prints Y when it used to print N.
Part 2 (if) This part is hard to do on a Turing machine ,so let us give an
intuitive approach first.
Assume S and ~S are both
TM languages. ( We must prove that S is decidable.)
Therefore, there are Turing machines, say M and ~M that accept S
and ~S respectively.
Given some string , w, the
idea is to run M and ~M concurrently on
w. Since w has to be in either S or ~S,
one of the 2 machines must halt. If M halts, output
Y; if ~M halts, output N. This is a decision process.
To carry this process out on a Turing machine, one must
combine the two machines M and ~M into on machine that alternates moves between
the 2 machines. They both work on the same tape, but a marker can separate the
parts of the tape used by the same machines, so that they do not interfere with
each other.
The read head can
alternately move between the two areas. The current states and the current
positions of the read-head can be written on the tapes in the same way
that this is done with the universal
machine. The location of a special encoding of the current state is placed on
each tape at the left of the symbol the
original machine would be
on.
The undecidability of K now follows from our theorem since ~K is not a Turing machine language.
The
result on the previous page can also be stated as : A set S is decidable
iff both S and ~S are r.e.
Consequently,
all decidable sets are r.e.
But
K is an example of an r.e. set that is
not decidable.
All
of the sets that you are likely to think of, are decidable:
Try
to find decision processes for these sets of natural numbers:
(evens}
{odds}
(
multiples of any given m}
{primes}
{squares}
{cubes}
{all
p powers for any fixed p}
{perfect
numbers} ( A perfect number is one that
is equal to the sum of its proper divisors, such as 6 = 1+2+3 and 28 = 1 + 2 +
4 + 7 + 14 = 28.
{abundant
numbers} sum of the proper divisors exceed the number.
{deficient
numbers}
{numbers
that can be expressed as the sum of two primes}
Goldbach's
famous unproven conjecture is that the
set above is the set of even numbers.
{x
| x is the (code number) of a person who will die today}.
About Godel
numberings
The listing W0 ,W1, W2, ..... is
a called a Godel numbering , this time
of the the r.e. sets.
j is called the index of Wj .
Earlier,
we defined the subscripts to be (encoded) Turing machine and made a special
definition:
in
the case that v is not the number for any Turing machine , namely , Wv
= { 0,1,2,3,...} ( one can think of the numbers are being codes for string.).
To avoid this, one can remove the invalid Turing machine coded
from
the list and renumber. Thus Wj now means the language of
the jth Turing machine code, in
numerical
order. Most importantly, since a Turing machine can determine whether a number
is a valid TM code, a program can still find the actual TM from the renumbered
index. Further, since one can uniformly
(computably)
find , given any Turing machine, an enumeration machine, for the language of
the Turing machine, one can consider j to be a program for enumerating the member of Wj . There are many
ways
to
number the r.e. sets: the idea of a Godel numbering is that the index is a
program for enumerating the set Wj
. Further this program can
be translated uniformly into an executable program: there is a computable
function, U(j,x) which returns the output of program j, running on input x,
if there is output .
Also worth mentioning: we can define a
Godel numbering of function by letting, fj º the function computed by Turing machine ,
number j. The listing f0, f2, f3, ... is thus a Godel numbering of all the
computable functions. The index,
j, is
a program for the function fj .
Until
otherwise stated, we will think of
strings as being natural numbers and think about r.e. and decidable sets
of natural numbers.`
Prop:
All finite sets are decidable.
Proof:
?
Prop:
If D is decidable, ~D is decidable.
Prop: If C and D are both decidable, then C È D is decidable
Prop If C and D are both decidable, then C.Ç D is decidable.
Prop.
The union and interesection of r.e. sets is r.e. but the complement need not
be.
K
is r.e., but ~K is not r.e.
Prop:
An infinite set S, is decidable iff it
can be enumerated in natural order.
proof
(if) A decision process for S is:
given x, enumerate S in order until
either x is found or something bigger
than x is found.
Output
"yes" in the first case and "no" in the second case.
Q:
why must the enumeration be in order for this to work?
(only
if) given a decision process for S, test the numbers 0,1,2,3,... in order.
Whenever the process returns "yes", output the number. The result is
an enumeration in order.
Corollary:
Every infinite r.e. set contains an infinite decidable subset.
Corollay:
Every infinitie decidable set can be split into 2 disjoint infinitie decidable
subsets.
Cor.:
Every infinitie decidable set can be split into any given number of infinite,
pairwise disjoint decidable subsets.
The
next result shows that there are infinitely many r.e. sets that are not
decidable.
Prop:
Every infinite r,e, set ,S, contains a subset which is r.e. but not decidable.
Choose an enumeratiion method for S and let
a0, a1, a2, a3, ...
be
this enumeration.
Define
B = { aj | j Î K } where K is any undecidable, r.e. set.
B is
r.e. since K and S are both r.e.
Enumeration method for B.
Loop
Enumerate next member of K, say j
Enumerate S until aj appears, the print aj
End
Loop
B
is not decidable.
proof :
suppose
we did have a decision procedure, d(x) for B,
We
could then use it to create a decision procedure, k(x) for K as follows:
Given
x, to compute k(x),
enumerate S to find ax .
call d(ax )
If "yes" is returned then
output "yes"
If "no" is returned then
output "no"
Therefore,
since no decision procedure for K can exist, we conclude that d(x) can not
exist.