Exercises — Reducibility — many-one reductions
Reminder of the one definition everything hinges on:
Level 1 — Recognition
Exercise 1.1
State, in one sentence each, the two directions hidden inside the biconditional .
Recall Solution
Forward (YES YES): every string that is in must map to a string that is in . Backward (NO NO): every string that is not in must map to a string that is not in . Equivalently the backward direction is the contrapositive: if then . Checking only the first line is the classic broken "reduction".
Exercise 1.2
Which of these functions can serve as the in a reduction? For each, answer YES / NO and why. (a) that loops forever on some inputs. (b) (identity). (c) that maps two different strings to the same output.
Recall Solution
(a) NO — must be total (halt on every input). A looping breaks the decidability transfer. (b) YES — identity is computable and total; it witnesses (reflexivity). (c) YES — reductions are literally called many-one: may collapse many inputs to one output. It need not be injective or onto.
Exercise 1.3
True or false: " means is harder than ."
Recall Solution
False. Read literally as "": says is no harder than — i.e. is at least as hard as . Hardness flows along the arrow, from into .
Level 2 — Application
Exercise 2.1
Let and . Give a computable proving and verify both directions.
Recall Solution
Define . This is computable (scan once, then append one bit) and total.
- (has a 1) ends in . ✓
- (all zeros / empty) ends in . ✓ Both directions hold, so . (Sanity: appending the marker bit forces the target predicate "ends in 1" to mirror the source predicate "has a 1".)
Exercise 2.2
Using if is even else , and , name the language this reduces, and evaluate , , . ( = empty string.)
Recall Solution
.
- (even) , which ends in 0 . ✓ (and ).
- (even) , ends in 0 . ✓
- (odd) , ends in 1 . ✓ (and ).
Exercise 2.3
and is decidable. Write the 3-step decider and justify why it always halts.
Recall Solution
Let decide . Define on input :
- Compute . (Halts: is total & computable.)
- Run on . (Halts: is a decider.)
- Accept if accepts ; reject if rejects . Both steps always halt always halts. Correctness: accepts accepts . So decides .
Level 3 — Analysis
Exercise 3.1
Prove Theorem 2: if and is undecidable, then is undecidable. State exactly which earlier theorem you use.
Recall Solution
This is the contrapositive of Theorem 1 (" and decidable decidable"). Suppose for contradiction were decidable. Since , Theorem 1 gives decidable. But we are given undecidable — contradiction. Hence is undecidable. The reduction arrow points from the known-hard into the target .
Exercise 3.2
Show using the same . ( = complement of .)
Recall Solution
Start from the reduction property: for all , Negate both sides of the biconditional (a biconditional is preserved under negating both sides): Rewrite membership in complements: That is exactly the statement via the same total computable . The reverse direction is identical by symmetry (). (See Closure properties of language classes for why this is the go-to move in non-recognizability proofs.)
Exercise 3.3
A student claims: ", and is undecidable, therefore is undecidable." Find the error.
Recall Solution
The claim reduces into the known-hard problem, i.e. it shows is no harder than — which is almost every recognizable language, telling us nothing about 's hardness. To prove undecidable you need (arrow from the hard problem into ). Direction reversed conclusion unjustified. In fact could be trivially decidable and still satisfy .
Level 4 — Synthesis
Exercise 4.1
Build a mapping reduction and verify both directions. , .
Recall Solution
Reduction : on input , output where is edited so that: run on ; if accepts, accepts (halts); if rejects, enters an infinite loop. (Purely mechanical editing of 's description — no simulation performed by itself, so is total & computable.)
- ( accepts) halts . ✓
- ( rejects or loops) loops . ✓ Both directions hold, so ; since is undecidable, so is .
Exercise 4.2
Design a reduction showing and explain what it buys you.
Recall Solution
By Exercise 4.1 we have via some total computable . By the complement lemma (Exercise 3.2) the same gives . What it buys you: is a known not-Turing-recognizable language. By the recognizability transfer (Theorem 4: not recognizable and not recognizable), is not Turing-recognizable either.
Exercise 4.3
Prove is transitive: from (via ) and (via ), build the witness for .
Recall Solution
Use the composition .
- Computable & total: running halts (total) and produces ; then running on halts (total). Sequencing two always-halting machines always halts, so is total computable.
- Correctness chain: Hence via .
Level 5 — Mastery
Exercise 5.1
Given a fixed alphabet , exhibit a reduction where is decidable but is also decidable, then explain why this is not a contradiction with "reductions prove hardness."
Recall Solution
Take , , if even else (from the parent note). Both directions verified there; both languages are decidable. No contradiction: a reduction is neutral machinery. only says " is no harder than ." When both are easy, that statement is simply true and unhelpful for hardness. Reductions prove hardness only when you plug a known-hard into the arrow (Theorem 2). Here neither side is hard, so it is merely a consistency check.
Exercise 5.2
Is the following a valid reduction? (palindromes), (everything), . Determine validity of both directions.
Recall Solution
- Forward: . ✓ (everything is in ).
- Backward: need . But , so always, including for non-palindromes. So a NO-instance of maps to a YES-instance of . ✗ Verdict: NOT a valid reduction. You cannot reduce anything nontrivial to the trivial language (or to ), because a constant-truth target cannot mirror a source that has both YES and NO instances. This is the biconditional biting back.
Exercise 5.3
Rice-flavoured mastery: argue that (the empty-language problem) is undecidable, by citing which known-hard problem you'd reduce from and the direction, without doing the full gadget. Cross-check against Rice's Theorem.
Recall Solution
Which known-hard ? (or its complement). Direction: (map to a machine whose language is nonempty exactly when accepts ). By Theorem 2, undecidable undecidable (decidability is closed under complement). Cross-check: is a nontrivial semantic property of the recognized language (some machines have it, some don't; it depends only on ). Rice's Theorem then instantly gives undecidability — the reduction above is exactly the engine behind Rice's Theorem.
Recall Master summary card
Direction for hardness proofs ::: reduce known-hard into target : . Both directions of a reduction ::: and . Requirement on ::: total + computable (always halts, no simulation-loop). Complement lemma ::: via the same . Why you can't reduce to or ::: a constant-truth/false target can't mirror the NO/YES direction.

The figure above is the mental picture for every exercise: hardness flows along the arrow, from the known-hard source into the target.