The exam always gives a language L over TM encodings. Three fixed sub-parts, same structure every time:
| Part | Task | Pts | What you do |
|---|---|---|---|
| (a) | Prove L is TR or co-TR | 2 | Build a recognizer (for L or for L̄) |
| (b) | Prove L is undecidable | 4 | Mapping reduction from ATM, ETM, or EQTM |
| (c) | Prove L is not TR / not co-TR | 1 | Combine (a) + (b) via complement logic — free point |
24-25 endterm Q7: L = {〈M〉 | M is a DTM with an unreachable reject state}. (a) co-TR (2pts) (b) undecidable (4pts) (c) not TR (1pt)
24-25 resit Q7: L = {〈M,k〉 | M accepts at least k words of length ≥ k}. (a) TR (2pts) (b) undecidable (4pts) (c) not co-TR (1pt)
23-24 endterm Q9: L = {〈M1,M2〉 | {〈M1〉,〈M2〉} ∩ (L(M1) ∪ L(M2)) = ∅}. (a) co-TR (2pts) (b) undecidable (5pts) (c) not TR (1pt)
| Problem | Definition | TR? | co-TR? | Decidable? |
|---|---|---|---|---|
| ATM | {〈M,w〉 : M accepts w} | Yes | No | No |
| ETM | {〈M〉 : L(M) = ∅} | No | Yes | No |
| EQTM | {〈M1,M2〉 : L(M1) = L(M2)} | No | No | No |
Key theorem: L is decidable if and only if L is both TR and co-TR.
Decision tree: which side can you detect?
If L is Turing-recognizable (TR): Build a TM that accepts when input is in L. May loop on non-members.
If L is co-Turing-recognizable (co-TR): Build a TM that accepts the COMPLEMENT L̄. Equivalently: build a TM that accepts when input is NOT in L.
Rule of thumb: "finite/bounded properties" → often co-TR (check finitely many cases to refute). "Infinite/unbounded properties" → often TR (enumerate to confirm).
This is a mapping reduction. You prove: "if L were decidable, then ATM would be decidable too — contradiction." Three steps:
Step 1 — Setup: Assume R decides L.
Step 2 — Build the reduction: Construct a decider S for ATM:
S = "On input 〈M, w〉:
1. Construct M' = "On input x:
Run M on w.
If M accepts → [behave so L(M') SATISFIES L's condition]
If M rejects/loops → [behave so L(M') VIOLATES L's condition]"
2. Run R on 〈M'〉 (or 〈M', k〉 etc.)
3. Output R's answer (or flip it, if the mapping is inverted)."
Step 3 — Argue both directions:
Therefore S decides ATM. Contradiction.
Almost always: M' ignores its own input x, runs M on w, then either accepts everything (Σ*) or nothing (∅). This swings L(M') between satisfying and violating L's condition.
M accepts w → L(M') = Σ*. M doesn't accept w → L(M') = ∅.
You never RUN M'. You just BUILD its description and hand it to R. M' is a specification, not an execution.
How to choose the source problem:
The logic: TR + co-TR = decidable. So if one side holds and decidability fails, the other side must fail.
| If (a) proved | And (b) proved undecidable | Then (c) concludes |
|---|---|---|
| L is co-TR | L is undecidable | L is not TR |
| L is TR | L is undecidable | L is not co-TR |
Exam sentence: "From (a), L is [TR/co-TR]. From (b), L is undecidable. If L were also [co-TR/TR], then L would be decidable (TR + co-TR = decidable). Contradiction. Hence L is not [co-TR/TR]."
L = {〈M,k〉 | M is a TM that accepts at least k words of length ≥ k}
Build a recognizer for L
"On input 〈M,k〉:
This is a recognizer: if M really does accept ≥ k long words, dovetailing will eventually find them. If not, we loop forever. That's fine — TR only requires halting on yes-instances.
Step 1 — Setup
Assume R decides L. We build a decider S for ATM.
Step 2 — Construct the reduction
S = "On input 〈M, w〉:
Step 3 — Argue both directions
From (a), L is TR. From (b), L is undecidable.
If L were also co-TR, then L would be decidable (since TR + co-TR = decidable). But L is undecidable. Contradiction.
L = {〈M〉 | M is a DTM with an unreachable reject state}
Build a recognizer for L̄ (complement: "M has a REACHABLE reject state")
"On input 〈M〉:
If M has a reachable reject state, some input will reach it, and dovetailing finds it. If not, we loop. This recognizes L̄, so L is co-TR.
Step 1 — Setup
Assume R decides L. We build a decider S for ATM.
Step 2 — Construct the reduction
S = "On input 〈M, w〉:
Step 3 — Argue both directions
From (a), L is co-TR. From (b), L is undecidable.
If L were also TR, then L would be decidable (since TR + co-TR = decidable). But L is undecidable. Contradiction.
L = {〈M1,M2〉 | {〈M1〉, 〈M2〉} ∩ (L(M1) ∪ L(M2)) = ∅}
(a) Prove L is co-TR (2 pts). (b) Prove L is undecidable (5 pts). (c) Prove L is not TR (1 pt).
(a) co-TR: Build a recognizer for L̄ (complement: {〈M1〉, 〈M2〉} ∩ (L(M1) ∪ L(M2)) ≠ ∅).
"On input 〈M1,M2〉: Dovetail — run M1 and M2 on both 〈M1〉 and 〈M2〉. If any machine accepts either encoding, accept."
Only 4 simulations to interleave. If the intersection is non-empty, at least one will halt and accept.
(b) Undecidable: Reduce from ATM.
Step 1: Assume R decides L.
Step 2: Build decider S for ATM:
S = "On input 〈M, w〉:
Step 3: Both directions:
Note the flip: R's answer is inverted because ATM membership maps to L non-membership here.
(c) Not TR: co-TR (from a) + undecidable (from b) → not TR. ∎
L = {〈M〉 | M accepts at least one palindrome}
(a) Prove L is TR or co-TR. (b) Prove L is undecidable. (c) Prove L is not TR/co-TR.
(a) TR: Enumerate all palindromes p1, p2, … Dovetail: run M on p1, …, pi for i steps. If M accepts any palindrome, accept.
If M accepts a palindrome, dovetailing eventually finds it. If not, we loop forever. TR. ✓
(b) Undecidable: Reduce from ATM.
Step 1: Assume R decides L.
Step 2: Build decider S for ATM:
S = "On input 〈M, w〉:
Step 3: Both directions:
(c) Not co-TR: TR (from a) + undecidable (from b) → not co-TR. ∎
L = {〈M〉 | ε ∈ L(M)} (M accepts the empty string)
(a) Prove L is TR or co-TR. (b) Prove L is undecidable. (c) Prove L is not TR/co-TR.
(a) TR: Run M on ε. If it accepts, accept.
If M accepts ε, we halt and accept. If M loops on ε, we loop. TR. ✓
(b) Undecidable: Reduce from ATM.
Step 1: Assume R decides L.
Step 2: Build decider S for ATM:
S = "On input 〈M, w〉:
Step 3: Both directions:
(c) Not co-TR: TR (from a) + undecidable (from b) → not co-TR. ∎