Recall warm-up
- Is HALT_TM decidable? RE?
Stuck? Peek at 5.2 The diagonal language and the halting problem
- L_d = {wᵢ : wᵢ ∉ L(Mᵢ)}: not RE (co-RE).
- A_TM = {⟨M,w⟩ : M accepts w}: RE, not recursive; complement not RE.
- HALT_TM: RE, undecidable; complement not RE.
- REC = RE ∩ co-RE.
- Which closure property fails for RE?
Stuck? Peek at 4.3.3 Closure of REC and RE; L and L̅ both RE ⇒ L recursive
- REC closed: ∪ ∩ complement − concat * reversal h⁻¹; not h.
- RE closed: ∪ ∩ concat * reversal h h⁻¹; not complement, not difference.
- L, L̅ ∈ RE ⇒ L ∈ REC. L ∈ RE − REC ⇒ L̅ ∉ RE.
- What is the contrapositive of P ⇒ Q?
Stuck? Peek at 0.2.3 Proof techniques
- P ⇒ Q false only when P true, Q false. Contrapositive ¬Q ⇒ ¬P ≡ original. Converse/inverse are NOT.
- Contradiction: assume ¬S, derive the impossible. Used for “no machine can…” proofs.
- Induction: base S(n₀) + step S(k) ⇒ S(k+1). Strong induction assumes all S(≤k).
- One counterexample kills a “for all”. Examples never prove it.
The Hook
To show a new problem is unsolvable, you don’t redo the diagonal argument. You show that a solver for the new problem would solve an old unsolvable one. That transfer is a reduction. The single most common GATE error in this topic is reducing in the wrong direction — this lesson drills the direction until it is automatic.
Predict First
You can convert any instance of problem A into an instance of problem B with the same answer. If B is easy, what about A? If A is impossible, what about B?
Core Concept
Prediction check
If B is easy, A is easy (convert, then solve B). If A is impossible, B is impossible (otherwise A would be easy). Hardness flows from A to B, along the arrow A ≤ B.
Mapping reductions
- B decidable ⇒ A decidable. Equivalently, A undecidable ⇒ B undecidable.
- B RE ⇒ A RE. Equivalently, A not RE ⇒ B not RE.
- A ≤ B ⇔ A̅ ≤ B̅ (same f).
- ≤ is transitive.
The direction trap
To prove your problem P is undecidable, reduce a known undecidable problem to P: A_TM ≤ P. Reducing P to A_TM only shows P is no harder than A_TM — useless for hardness.
Worked reductions
- A_TM ≤ HALT_TM: f(⟨M, w⟩) = ⟨M′, w⟩ where M′ runs M on w, and loops forever if M rejects. M′ halts ⇔ M accepts.
- A_TM ≤ complement of E_TM (E_TM = {⟨M⟩ : L(M) = ∅}): f(⟨M, w⟩) = ⟨M_w⟩ where M_w ignores its input x and runs M on w. L(M_w) = Σ* if M accepts w, else ∅. So E_TM is undecidable; its complement is RE, so E_TM is not RE.
- EQ_TM = {⟨M₁, M₂⟩ : L(M₁) = L(M₂)}: E_TM reduces to it (compare with a machine accepting nothing), and its complement is also not RE — EQ_TM is neither RE nor co-RE.
A standard results table
Every row below follows from A_TM by a reduction (or from Rice, next lesson).
| language | RE? | co-RE? | decidable? |
|---|---|---|---|
| A_TM, HALT_TM | yes | no | no |
| E_TM = {⟨M⟩ : L(M) = ∅} | no | yes | no |
| NE_TM = {⟨M⟩ : L(M) ≠ ∅} | yes | no | no |
| EQ_TM | no | no | no |
| TOTAL = {⟨M⟩ : M halts on all inputs} | no | no | no |
| {⟨M⟩ : L(M) is finite} | no | no | no |
| {⟨M⟩ : M has ≤ 10 states} | yes | yes | yes |
Putting it together
- A ≤ B transfers decidability backwards and hardness forwards.
- Always reduce from a known hard problem to the new one.
- Standard results: E_TM co-RE, NE_TM RE, EQ_TM and TOTAL neither.
Visual
A ≤ B : "B is at least as hard as A"
hardness travels → (A undecidable ⇒ B undecidable)
easiness travels ← (B decidable ⇒ A decidable)
to prove P hard: A_TM ≤ P (never P ≤ A_TM)Worked Examples
A ≤ₘ B and B is decidable. What about A?
Show the full solution
A is decidable.
A ≤ₘ B and A is not RE. What about B?
Show the full solution
B is not RE (if it were, A would be RE by composing f with B’s recognizer).
P₁ is undecidable and P₁ ≤ P₂; P₃ is decidable and P₃ ≤ P₄. Which are true? (i) P₂ undecidable (ii) P₄ decidable (iii) P₂ could be decidable (iv) nothing follows about P₄
Show the full solution
(i) true. (ii) not implied. (iii) false. (iv) true. Answer: (i) and (iv).
GATE Traps
- Direction: reduce the KNOWN hard problem TO the new one.
- A ≤ B with A decidable tells you nothing about B.
- E_TM is not RE (its complement is RE); NE_TM is RE.
- EQ_TM and TOTAL are neither RE nor co-RE.
Memory Hook
Reductions are pipes: hardness flows downstream from the known-hard source into your problem — so connect the source to your problem, never the other way.
Connect the Dots
Proving each property undecidable one reduction at a time is tedious. Rice’s theorem does them all at once: every non-trivial question about the language of a TM is undecidable.
Self-Test
- MCQ
To prove P undecidable, you show:
- P ≤ A_TM
- A_TM ≤ P
- P ≤ a regular language
- P is RE
- MSQ
A ≤ₘ B. Which follow?
- B decidable ⇒ A decidable
- A undecidable ⇒ B undecidable
- B RE ⇒ A RE
- A decidable ⇒ B decidable
- MCQ
E_TM = {⟨M⟩ : L(M) = ∅} is:
- decidable
- RE but not decidable
- co-RE but not RE
- neither RE nor co-RE
- MCQ
EQ_TM is:
- decidable
- RE
- co-RE
- neither RE nor co-RE
Rule Card
- A ≤ₘ B: computable f, x ∈ A ⇔ f(x) ∈ B. A ≤ B ⇔ A̅ ≤ B̅. Transitive.
- B dec ⇒ A dec; A undec ⇒ B undec; B RE ⇒ A RE; A not RE ⇒ B not RE.
- Prove P hard: A_TM ≤ P. E_TM co-RE not RE; NE_TM RE; EQ_TM, TOTAL, FINITE neither.
Concept Ledger
- mapping reduction A ≤ₘ B
- computable function
- direction of a reduction
- E_TM, NE_TM, EQ_TM, TOTAL_TM
Answer Vault
Reveal answers when you’re ready
Warm-up answers
- Undecidable; RE.
- Complement.
- ¬Q ⇒ ¬P.
Self-test answers
- B — Hardness flows from A_TM to P.
- A: Wrong direction.
- C: That would make P easy.
- D: Irrelevant.
- ABC — Standard properties.
- D: Wrong direction.
- C — Its complement is RE; it is undecidable.
- A: No.
- B: Its complement is the RE one.
- D: It is co-RE.
- D — Both it and its complement are not RE.
- A: No.
- B: No.
- C: No.
Flashcards
- To prove P undecidable, which reduction?
Reveal answer
A_TM ≤ P (known hard → new). - A ≤ B and B decidable ⇒ ?
Reveal answer
A decidable. - Is E_TM RE?
Reveal answer
No (it is co-RE). - Is EQ_TM RE or co-RE?
Reveal answer
Neither.