Reducibility (I) CS 301. Languages and Automata © 2025 by Gonzalo A. Bello 11/14/2025 CS 301 - Lecture 24: Reducibility (I) 1 Reducibility Introduction (I) • A reduction is a way of converting a problem π΄ into a problem π΅ such that a solution to problem π΅ can be used to solve problem π΄. Reduces to π¨ π© Solves • Example: • Let π΄ be the problem of finding your way around a city. • Let π΅ be the problem of obtaining a map of the city. • If I can obtain a map of the city (i.e., if I can solve problem π©), then I can use this map to find my way around the city (i.e., then I can solve problem π¨). • Therefore, π΄ reduces to π΅ or π΄ is reducible to π΅. 11/14/2025 CS 301 - Lecture 24: Reducibility (I) 2 Reducibility Introduction (II) • Another example: Suppose Mary wants a pet dragon If Mary finds a dragon shop, she can get a pet dragon Therefore, the problem of getting a pet dragon reduces to the problem of finding a dragon shop Source: Undecidable Problems (2020) 11/14/2025 CS 301 - Lecture 24: Reducibility (I) 3 Reducibility Introduction (III) • Suppose π΄ is reducible to π΅. • If π΅ is decidable, then π΄ is also decidable. • Example: • If I can obtain a map of the city (π΅ is decidable), then I can find my way around the city (π΄ is decidable). • How can we prove that a problem is decidable? • Show that it reduces to a problem already known to be decidable. To prove that π·πππ is decidable, show that π·πππ reduces to π·πππππ where π·πππππ is decidable • Example: We proved that π΄ππΉπ΄ is decidable by showing that it reduces to π΄π·πΉπ΄ , which was already known to be decidable. 11/14/2025 CS 301 - Lecture 24: Reducibility (I) 4 Reducibility Introduction (IV) • Suppose π΄ is reducible to π΅. • If π΄ is undecidable, then π΅ is also undecidable. • Example: • If I cannot find my way around the city (π΄ is undecidable), then I cannot obtain a map of the city (π΅ is undecidable). • How can we prove that a problem is undecidable? • Show that a problem already known to be undecidable reduces to it. To prove that π·πππ is undecidable, show that π·πππππ reduces to π·πππ where π·πππππ is undecidable Which problem is known to be undecidable? 11/14/2025 CS 301 - Lecture 24: Reducibility (I) 5 Reducibility Introduction (V) • Another example: If Mary finds a dragon shop, she can get a pet dragon Dragons do not exist (i.e., the problem of getting a pet dragon is undecidable). Therefore, dragon shops can also not exist (i.e., the problem of finding a dragon shop is also undecidable). Source: Undecidable Problems (2020) 11/14/2025 CS 301 - Lecture 24: Reducibility (I) 6 Reducibility Exercise 24.1 If π¨ is reducible to π© and π¨ is undecidable, we can conclude that π© is also undecidable. A. B. True False If π¨ is reducible to π© and π¨ is decidable, we can conclude that π© is also decidable. A. 11/14/2025 B. True CS 301 - Lecture 24: Reducibility (I) False 7 Reducibility Example: π―π¨π³π»π»π΄ (I) • Example: π»π΄πΏπππ = π, π€ π is a TM that halts on input π€}. • The halting problem is the problem of determining whether a TM halts (by accepting or rejecting) on a given input. How can we prove that π―π¨π³π»π»π΄ is undecidable? • Proof by contradiction: • Assume that π»π΄πΏπππ is decidable. • Show that π΄ ππ is reducible to π»π΄πΏπππ . • Since π»π΄πΏπππ is decidable and π΄ ππ is reducible to π»π΄πΏπππ , then π΄ ππ is also decidable. • But π΄ ππ is undecidable. This is a contradiction. • Therefore, π»π΄πΏπππ must be undecidable. How can we reduce π¨π»π΄ to π―π¨π³π»π»π΄ ? • Assume that we have a TM π that decides π»π΄πΏπππ . • Use π to construct a TM π that decides π΄ ππ . 11/14/2025 CS 301 - Lecture 24: Reducibility (I) 8 Reducibility Example: π―π¨π³π»π»π΄ (II) • Example: π»π΄πΏπππ = π, π€ π is a TM that halts on input π€}. How can we reduce π¨π»π΄ to π―π¨π³π»π»π΄ ? • Use π to construct a TM π that decides π΄ ππ . πΊ = “On input π΄, π : Is πΊ a decider? 1. Run TM πΉ that decides π―π¨π³π»π»π΄ on input π΄, π . 2. If πΉ rejects, _____________________ 3. If πΉ accepts, run π΄ on input π. 4. If π΄ accepts, ____________________ 5. If π΄ rejects, _____________________” π π π€ 11/14/2025 π Accept π Reject CS 301 - Lecture 24: Reducibility (I) Accept Reject 9 Reducibility Example: π―π¨π³π»π»π΄ (III) • Example: π»π΄πΏπππ = π, π€ π is a TM that halts on input π€}. How can we prove that π―π¨π³π»π»π΄ is undecidable? • Proof (by contradiction): • Assume that π»π΄πΏπππ is decidable. Let π be a TM that decides π»π΄πΏπππ . • Construct a TM π that decides π΄ ππ as follows. πΊ = “On input π΄, π : 1. Run TM πΉ that decides π―π¨π³π»π»π΄ on input π΄, π . 2. If πΉ rejects (π΄ does not halt on π), reject. 3. If πΉ accepts (π΄ halts on π), run π΄ on input π. 4. If π΄ accepts, accept. If π΄ rejects, reject.” • If π΄ accepts π, then π halts on π€, so π and π accept and πΊ accepts. • If π΄ does not accept π, then either π does not halt on π€ or π rejects π€, so either π or π rejects and πΊ rejects. • π always halts because π always halts and we only run π if it halts. • Then, π΄ ππ is decidable. But π΄ ππ is undecidable. This is a contradiction. • Therefore, π»π΄πΏπππ must be undecidable. 11/14/2025 CS 301 - Lecture 24: Reducibility (I) 10 Reducibility References • Michael Sipser. Introduction to the Theory of Computation. 11/14/2025 CS 301 - Lecture 24: Reducibility (I) 11