4.6.19Theory of Computation

Reducibility — many-one reductions

2,137 words10 min readdifficulty · medium

What exactly is a many-one reduction?

The name "many-one" is because ff may be many-to-one (several ww's can map to the same image) but it is an ordinary function — it need not be onto and need not be invertible. (Contrast: "one-one" reductions force ff injective.)


HOW to actually build / use one (the mechanics)

Derivation from first principles (Theorem 1)

We are given: a computable total ff with wA    f(w)Bw\in A \iff f(w)\in B, and a decider MBM_B for BB. We must construct a decider for AA.

Define machine MAM_A on input ww:

  1. Compute x=f(w)x = f(w). (Why? ff is computable & total, so this step always halts.)
  2. Run MBM_B on xx. (Why? MBM_B is a decider, so it always halts with accept/reject.)
  3. Accept if MBM_B accepts; reject if MBM_B rejects.

Why is MAM_A a decider for AA? Both steps always halt, so MAM_A always halts. And: MA accepts w    MB accepts f(w)    f(w)B    wA.M_A \text{ accepts } w \iff M_B \text{ accepts } f(w) \iff f(w)\in B \iff w\in A. The last step is exactly the reduction property. \blacksquare

For recognizers (Thm 3): same MAM_A, but now MBM_B may loop on rejects. MAM_A still accepts exactly when wAw\in A, and may loop otherwise — that's exactly a recognizer (not a decider). Theorem 4 is its contrapositive.


Worked examples


Common mistakes (Steel-manned)


Properties worth memorising


Define AmBA\le_m B.
There is a computable total function ff with wA    f(w)Bw\in A \iff f(w)\in B for all ww.
Why is the reduction function required to be total/halting?
So the constructed decider for AA always halts; a looping ff would break decidability transfer.
AmBA\le_m B and BB decidable \Rightarrow ?
AA is decidable (run ff then BB's decider).
AmBA\le_m B and AA undecidable \Rightarrow ?
BB is undecidable (contrapositive of the decidable transfer).
To prove BB undecidable, which direction do you reduce?
Reduce a known-undecidable AA TO BB: AundecmBA_{undec}\le_m B.
Does AmBA\le_m B imply AmB\overline A \le_m \overline B?
Yes, via the same function ff.
Is m\le_m reflexive and transitive?
Yes; identity gives reflexivity, composition gfg\circ f gives transitivity.
What's the recognizability version?
If AmBA\le_m B and BB is recognizable then AA is recognizable; contrapositive: AA not recognizable \Rightarrow BB not recognizable.
Why "many-one"?
ff may map many strings to one image; it need not be injective, onto, or invertible.
Common direction error fix (mnemonic)?
"Hardness flows along the arrow" — BB is at least as hard as AA.
Recall Feynman: explain it to a 12-year-old

Suppose your big sister already knows how to answer a certain kind of riddle. You have a different riddle you can't solve. So you invent a rewriter: it turns your riddle into one of her riddles. You hand it to her, she answers, and her answer is exactly the answer to yours too. That rewriter is the reduction. The only rules: the rewriter must always finish (never get stuck), and it must be honest both ways — a "yes" stays a "yes" and a "no" stays a "no". If your riddle is impossible to solve, then her riddle must be impossible too — otherwise you'd have just solved yours!

Concept Map

enables

requires

direction 1

direction 2

combine f with

yields

makes step halt

proves

contrapositive

used for

Computable total function f

Many-one reduction A <=m B

Biconditional w in A iff f(w) in B

YES maps to YES

NO maps to NO

Construct decider M_A

Given decider M_B for B

Thm1 B decidable so A decidable

Thm2 A undecidable so B undecidable

Prove undecidability

Hinglish (regional understanding)

Intuition Hinglish mein samjho

Socho tumhare paas ek problem BB ka solver already hai. Many-one reduction ka matlab hai ek translator function ff banao jo har AA ke sawaal ko BB ke sawaal me badal de — is tarah ki agar original answer "haan" hai to translated bhi "haan", aur "naa" hai to "naa". Formally: wA    f(w)Bw\in A \iff f(w)\in B. Yahan do cheezein zaroori hain: ff hamesha rukna chahiye (total/computable), aur dono direction sahi honi chahiye (sirf YES check karna galti hai).

Iska fayda kya? Agar BB decidable (asaan) hai, to AA bhi decidable ban jaata hai — bas ff chala ke BB ka solver use karo. Aur ulta, agar AA undecidable (impossible) hai, to BB bhi undecidable hona padega. Yahi contrapositive trick exam me sabse zyada use hota hai: kisi nayi problem ko undecidable prove karne ke liye, ek already-known undecidable problem (jaise ATMA_{TM}) ko us nayi problem me reduce karo.

Sabse common galti: direction ulti kar dena. Yaad rakho — "reduce the KNOWN onto the NEW", arrow hamesha known-hard se nayi problem ki taraf jaata hai. Doosri galti: socho ff kabhi loop kar sakta hai — nahi, ff ko har input pe halt karna mandatory hai, warna decidability transfer toot jaata hai. Mnemonic FIT yaad rakho: Function (computable+total), Iff (both directions), Transfer (easy flows back, hard flows forward). Bas itna pakka kar lo, reductions ka pura chapter clear ho jaayega.

Go deeper — visual, from zero

Test yourself — Theory of Computation

Connections