Handout 10
Handout 10
Handout 10
10.1 Robustness. Many variations of the Turing machine model are equally powerful. This can be
shown by simulating the variation on the model by a standard TM. For example, a DTM M with two
tapes can be simulated by a standard DTM M 0 (with one tape):
A configuration (q, u1 , a1 , v1 , u2 , a2 , v2 ) of the two-tape machine corresponds to the configu-
ration (q, ε, #, u1 $a1 v1 #u2 $a2 v2 ) of the one-tape machine (the $ symbols mark the positions
of the two r/w heads). The two machines start in corresponding configurations. For every
transition t of the two-tape machine M , the one-tape machine M 0 performs a finite sequence
t1 , . . . , tn of transitions such that the two machines are again in corresponding configurations.
Note that this simulation preserves acceptance, rejection, and looping. Since the simulation preserves
acceptance, it follows that the two-tape TMs accept no more than the r.e. languages. Since the simulation
preserves also looping, it follows that the two-tape Turing deciders accept no more than the recursive
languages.
10.3 Positive boolean operations. Given two DTMs M1 and M2 , we can construct a single DTM
M that encodes the two tapes of M1 and M2 similar to the construction of Section 10.1, and alternates
between simulating a transition of M1 and simulating a transition of M2 .
Union As soon as one of M1 or M2 accepts, let M accept. Once both M1 and M2 have rejected, let M
reject. Consequently, if neither M1 nor M2 accepts, and M1 or M2 loops, then M will loop.
Intersection As soon as one of M1 or M2 rejects, let M reject. Once both M1 and M2 have accepted,
let M accept. Consequently, if M1 or M2 loops, and neither M1 nor M2 rejects, then M will loop.
It follows that the recursive languages are closed under union and intersection, and that the r.e. languages
are closed under union and intersection.
10.4 Complementation. Given a DTM M , let M be the DTM that results from M by swapping qa
and qr . If M is a Turing decider, then L(M ) = Σ∗ \L(M ). It follows that the recursive languages are
closed under complementation. However, if M loops on some inputs, then L(M ) ⊂ Σ∗ \L(M ). So, the
r.e. languages may not be closed under complementation. A language L is co-r.e. if there is a DTM M
such that L(M ) = Σ∗ \L; that is, M accepts the complement of M . For r.e. languages L, there is a DTM
that is guaranteed to accept all inputs that are in L, but it may not halt on inputs that are not in L.
For co-r.e. languages L, there is a DTM that is guaranteed to reject all inputs that are not in L, but it
may not halt on inputs that are in L.
Theorem. A language L is recursive iff L is both r.e. and co-r.e.
We will soon see a language that is r.e. but not recursive, namely, the membership problem for DTMs.
It follows that r.e. and co-r.e. are different language classes.
1
c T.A. Henzinger, G. Théoduloz