CS5371 Theory of Computation: Q "On Input HM, Wi, M
CS5371 Theory of Computation: Q "On Input HM, Wi, M
1. Ans. Suppose on the contrary that T is decidable. Let R be its decider. Then, the
following TM Q is a decider for AT M :
It is easy to check that Q runs in finite steps. Also, in Step 1, M 0 has the property that:
(i) If M accepts w, L(M 0 ) = Σ∗ , so that hM 0 i ∈ T .
(ii) Else, L(M 0 ) = Σ∗ − {011}, so that hM 0 i ∈
/ T.
So, if Q accepts hM, wi, it must mean that R accepts hM 0 i, which implies that hM 0 i ∈ T ,
which implies M accepts w. On the other hand, if Q rejects hM, wi, R rejects hM 0 i, which
in turn implies that M does not accept w.
Thus, Q is a decider for AT M , and a contradiction occurs. So, we conclude that T is
undecidable.
2. In the silly Post Correspondence Problem, we see that if a set of dominoes S is in SPCP if
and only if S contains a piece whose top string matches exactly the bottom string. Thus,
we can easily design a TM that uses finite steps to check such a piece exists. So, SPCP is
decidable.
3. (⇒) If A ≤m AT M , then A is Turing-recognizable because AT M is Turing recognizable.
(⇐) If A is Turing-recognizable, then there exists some TM R that recognizes A. That
is, R would receive an input w and accept if w is in A (otherwise R does not accept). To
show that A ≤m AT M , we design a TM that does the following: On input w, writes hR, wi
on the tape and halts. It is easy to check that hR, wi is in AT M if and only if w is in A.
Thus, we get a mapping reduction of A to AT M .
4. (⇒) If A ≤m 0∗ 1∗ , then A is decidable because 0∗ 1∗ is a decidable language.
(⇐) If A is decidable, then there exists some TM R that decides A. That is, R would
receive an input w and accept if w is in A, reject if w is not in A. To show A ≤m 0∗ 1∗ , we
design a TM Q that does the following: On input w, runs R on w. If R accepts, outputs
01; otherwise, outputs 10. It is easy to check that:
w ∈ A ⇔ output of Q ∈ 0∗ 1∗ .
Thus, we obtain a mapping reduction of A to 0∗ 1∗ .
1
5. Let J = {w | either w = 0x for some x ∈ AT M , or w = 1y for some y ∈
/ AT M }.
hM, wi ∈ AT M ⇔ output of Q ∈ J.
hM, wi ∈ AT M ⇔ output of R ∈ J.
Equivalently, we have:
¯
hM, wi ∈ AT M ⇔ output of R ∈ J.
¯
Thus, we obtain a mapping reduction of AT M to J.
• Since AT M ≤m J, we have AT M ≤m J.¯ This shows that J¯ is non-Turing-recognizable
because AT¯M is non-Turing-recognizable.
¯ we have AT M ≤m J. So, this shows that J is non-Turing-
Similarly, since AT M ≤m J,
recognizable.