Professional Documents
Culture Documents
Contents
1 Introduction
14-15-1
2 Definitions
14-15-2
14-15-3
14-15-4
14-15-6
14-15-9
Introduction
How does the landscape outside the set of semi-decidable languages look like? This
lecture is devoted to discuss this question. But mind-block upfront : how do even
address these languages? They dont have Turing machines accepting them.
Here is a line of thought: assume for a moment that Halting problem(HP) was decidable. This means, that entire semi-decidable languages (and their complements)
are now decidable. Are there still undecidable languages? Yes, diagonalisation is
applicable even in this setting (now enumerate all oracle Turing machines). It will
give a language HP HP which is semi-decidable (with an oracle access to HP) and is
undecidable (even with oracle access to HP). The above imagination leads us to the
notion of relative computation. To take it further, what are the languages which will
be semi-decidable now? A natural answer to this question is : the set of languages
14-15-1
which are accepted by an oracle TM with queries to HP. Let us call this set 1 . But
are there languages outside 1 ? Yes, HP HP . Suppose HP HP was decidable, are there
still undecidable and semi-decidable languages. Yes, this argument can be applied
any number of times.
These can be formalized to get a hierarchy of classes of languages outside the class of
semi-decidable languages.
0 =
1 =
Definitions
We will first define the oracle Turing machines in a slightly different way from what we
did in class. Formally, an oracle Turing machine can be represented by 10 components
(Q, , , , s, q? , qY , qN , t, r). There is an extra tape called the Query Tape the
contents of which is supposed to be the questions that the oracle TM asks.
Informally, the ideas is as follows. When the Turing machine wants to ask a query to
the oracel, it will write the query string (say w to the query tape and move to the
query state q? indicating the same. According to the answer (of whether the string
w is in the oracle language or not) the oracle teleports the machine to either qY or
qN . We leave it as an exercise to formalize this and also show that it is equvialent to
the oracle tape model that we described in class. For convenience we work with this
new model in this writeup.
Definition 1 (i ). For i 0, A language L i if and only if there is an oracle
Turing machine M with access to a language L0 i1 as oracle, such that L = L(M ).
Let us define:
L i L i
We prove the following quantifier characterization for the above classes of languages,
which is the main purpose of this note.
14-15-2
14-15-3
We prove this by induction on k. The base case, the case when k = 0, will be the
following lemma.
Lemma 5. A language A is semi-decidable if and only if there exist a decidable
language B such that for every x ,
x A y : (x, y) B
Proof. () Language A is semi-decidable via a Turing machine M . The set B is
defined as:
B = {(x, y) : y is a finite string that encodes the computation history of M on input x}
It is easy to see that x L y : (x, y) B. Now we need to argue that B
is decidable. We design a total Turing machine N which, given x and y, accepts if
and only if the string y encodes the computation history of M on input x. Without
loss of generality, y can be viewed as a sequence of configurations (corresponding
to the computation history), y0 , y1 , . . . yk . Each configuration contains, a tape-head
position, the current contents of the tape (upto the leftmost blank symbol), and the
current state. N on input x and y (and knows M ) checks the following:
1. Check if y0 is the initial configuration. That is the tape contents are of the form
xB where B is the blank symbol, the head position is in the left-most position
and whether the state is the start-state of M . Note that N needs x in this step.
2. Check if yk is a halting configuration. That is if the state encoded there is the
final state.
3. Check if for all 0 i k 1, yi+1 follows from the configuration yi according
to M s transition function.
Given y, checking (1) and (2) are straightforward. To check condition (3) for each
0 i k 1, extract yi and yi+1 from y, and then check the head position at
configuration yi . If this is j, then we know that the contents of the tape can change
only at position j between yi and yi+1 . Let yi,j denote the alphabet written as position
j in the configuration yi . In yi , let qi and hi be the state and head-position respectively.
With this in mind, we rewrite (3) and write the full algorithm (algorithm 1) now.
We leave it to the reader to argue that N is a total Turing machine which accepts
(x, y) such that y corresponds to an accepting computation of M on x. This proves
that the set B is decidable.
14-15-4
14-15-5
For understanding the difficulties in the induction step. Let us do the proof for 2 .
() Let there be B 1 (that is B is semi-decidable) such that x A y :
(x, y) B. We use it to prove that A 2 . We give the following Turing machine
for A, with query access to B which is in 1 . Refer algorithm 2.
Algorithm 2 TM for A given B as the oracle
Input : x
Output : Accept if x A.
Oracle : B.
1: for each y do
2:
Ask the query is (x, y) B?.
3:
Accept if answer is no, try next y otherwise.
4: end for
if there is a y such that (x, y) B, then the above algorithm will find it, and otherwise it will keep searching for the y and hence loop for ever. By the characterization
x A (x, y) B N 0 accepts x L(N ). Hence A is semi-decidable
in B 1 . Thus A 2 .
() Let A be in 2 . By definition, there is a A0 1 such that A is semi-decidable
in A0 . That is, there is an oracle TM, M which on input x makes queries to A0 and
0
accepts if and only if x A. That is, L(M A ) = A.
Attempt #1: A natural generalization of what we did in the base case (previous
section).
0
14-15-6
to determine from M itself, the triplet (q, b, m) when if qi happens to be the query
state. To understand whether q is qY or qN (the query answer states), we need to
check whether the query tape contents in the configuration yi (let us call it i ) is in
A0 or not). Since A0 is in 1 , it is too ambitious to expect B to be decidable.
Our aim is to prove that B 1 . Can we design an oracle TM N with oracle access
to in B 0 0 (that is, decidable) such that (x, y) B N accepts (x, y). First
let us do something slightly weaker than that.
Remark 7. What can we put B in? We can put B in 1 . That is we can decide
B (using a total Oracle Turing machine N ) which has access to A0 (which is in
1 ). Indeed, if we have to design a machine for B and are given an oracle access
to A0 1 the above mind-block will be settled - and we result in a total Turing
machine N which, with oracle access to a language in 1 accepting B. Thus B 1 .
Indeed, this also means that B is decidable by a total Turing machine given oracle
access to a language in 1 . But does this mean B 1 ? And are we done? No1 !.
We need to do this with a less powerful oracle (namely a language in 0 ), but with
the relaxation that our machine now need not be total.
Attempt #2: It looks like we are not working with the right B. Remember, we have
the freedom to design B such that B 1 and that x A y, (x, y) B. Let
us add more information to B so that we can verify information about the compuation
history encoded by the string y. Whenever x A, in addition to the fact that there
0
is an accepting computation path for M A on x, we know that this path also has a
set of query answers which helps it to proceed in the computation path.
With this in mind, let us modify our set B:
y encodes the computation history of M A0 on input x
B1 = (x, y, a)
when the correct answers to the query asked during y are a.
Again it is easy to check (left as an exercise): x A (y, a) : (x, y, a) B1 .
Did it help? Can B1 be decided in 1 ? We can definitely check given the answers to
the queries, whether y encodes a valid computation history or not, but then how do
we check if the answers themselves are correct or not?
1
14-15-7
To handle the verification of the query answers, let us label the queries first. For a
configuration yi for which the state is the query state, q? , let i be the contents of
the query tape, that is, the query string that is being asked to A0 .
The set of queries could be of two kinds, the ones which gets yes answers and the
ones which gets no answers. Let us them.
P OS = {i : i A0 }
N EG = {i : i
/ A0 }
Our task now is to check membership in P OS and N EG (because if we could, then
we essentially have the query answers in hand). Given an i , checking membership
in N EG is is in 1 because i
/ A0 i A0 and A0 is in 1 . Thus i
0
N EG i A . Hence whenever, we see a NO answer to a query, there is a
machine in 1 that you can run and figure out this answer.
Checking membership in Y may not be doable directly in 1 , because A0 1 . But
here is where we apply the base case: A0 1 if and only there is a B 0 0 (that
is, decidable) such that i A0 zi : (i , zi ) B 0 . Hence i Y zi :
(i , zi ) B 0 .
Thus the vector z = z1 , z2 . . . zn (some of the zi s may be unused) form the certificates
for the i Y and these certificates along with their correpsonding zi (as the pair
(i , zi ) can be verified in 0 (that is, they can be verified by a Total Turing Machine).
Final Solution : Let us modify our B1 to include these zi s too. Thus, the new
language B2 that we work with is:
14-15-8
the no answers in a to the queries are correct.
2 = (x, y, a, z)
That is, 1 i k : (qi = q? ai = 0) i
/ A0
3 =
the yes answers in a to the queries are correct.
(x, y, a, z)
That is, 1 i k : (qi = q? ai = 1) (i , zi ) B 0 .
Notice that B2 = 1 2 3 . We have argued that the sets 1 , 2 and 3 are all
in 1 .2 . Since this implies that their intersection is also in 1 (argue this !), we have
that B2 1 .
As inductive hypothesis, let us assume that the statement of Theorem2 is true for k
and we prove it for k + 1 for which we need to prove two implications.
() Let there be B k such that x A y : (x, y) B. We use it to prove
that A k+1 . We give the following Turing machine for A, with query access to
B which is in k . Refer to the algorithm 1 again. Similar to the 2 case, if there
is a y such that (x, y) B, then the above algorithm will find it, and otherwise
it will keep searching for the y and hence loop for ever. By the characterization
x A (x, y) B N 0 accepts x L(N ). Hence A is semi-decidable
in B k . Thus A k+1 .
() Let A be in k+1 . By definition, there is a A0 k such that A is semi-decidable
in A0 . That is there is an oracle TM, M which on input x makes queries to A0 and
0
accepts if and only if x A. That is, L(M A ) = A.
We will apply the thought process developed in the previous sections and directly
jump to the definition of the B.
B = (x, y, a, z)
14-15-9
the yes answers in a to the queries are correct.
3 = (x, y, a, z) That is, 1 i k : (qi = q? ai = 1) i A0
Notice that B2 = 1 2 3 . We have argued that the sets 1 , 2 and 3 are all
in k .3 . Since this implies that their intersection is also in k (argue this !), we have
that B2 k .
QED(Quod Erat Demonstrandum.)
14-15-10