Mapping Reductions

Context: FIT2014_MOC · the machinery for transporting decidability between languages — the tool that turns one hard-won result (FA-Empty is decidable) into many, and later turns one undecidable language into a whole family

Quick Revision

  • 🎯 Objective: a computable with for every ➔ written , read ” is no harder than “.
  • ⚠️ Key Constraint: direction is everything. To prove decidable, reduce to a known-decidable language. To prove undecidable, reduce a known-undecidable language to . Reversing the arrow proves nothing at all.

📝 Core

A mapping reduction from language to language is a computable function such that, for every , .

  • Notation means there exists a mapping reduction from to ; the function itself is usually left anonymous once exhibited.
  • What does and does not do is a translator, never a decider: it answers nothing, it only rewrites an instance of one problem as an instance of another preserving the Yes/No answer.
  • Where the outputs land maps into and into . Into, not onto need not be injective, surjective, or invertible, and may miss most of entirely.
  • Reflexivity via the identity function, which is trivially computable.
  • Totality is mandatory must be defined and halt on every , including junk inputs; a partial “reduction” that loops on malformed input is not computable and the transfer theorem collapses.

🧮 Proof Blueprint — the transfer theorem

Theorem. .

Corollary. .

Strategyexhibit a decider for built from and the decider for ; the corollary is then the contrapositive, obtained for free.

🔧 Worked reductions

Each is stated as: the function, then the iff chain that certifies it. The chain is the marked part of the answer — a bare function earns nothing.

  • sort .
    • Why it works ➔ sorting preserves letter frequencies and forces the canonical s-then-s shape, so the counting property survives and the ordering property is manufactured.
  • ➔ scan left to right; if the previous letter was and the current is (i.e. the substring , impossible in HALF-AND-HALF) output the single string ) and stop; otherwise replace and .
    • Two failure routes, one target ➔ wrong order is caught by the guard, which emits a lone unmatched ); wrong counts survive to with . Both land outside PARENTHESES, and , which is balanced (see Writing a CFG).
  • compose the two above; justified by transitivity, no new construction needed.
  • ➔ given : vertices states of ; every transition becomes a directed edge ; add a new vertex and an edge from every Final State ; set the Start State’s vertex; output .
    • What the new sink buys ➔ collapsing many Final States into the single target converts “reaches some Final State” into the standard single-pair reachability question (Walks, Trails, and Paths); letters are discarded because emptiness ignores which word is read.
  • the FA for ; the symmetric difference is empty iff the languages agree. This is the Lecture-20 decidability proof re-read as a reduction — same construction, now named.

🚫 Reducing from a decidable language is worthless

Theorem. If is decidable and is any language except and , then .

  • Construction ➔ let decide ; pick a fixed and a fixed (both exist precisely because ). Define if accepts , else .
  • The lecture’s joke instance by outputting on a palindrome and otherwise.
  • ⚡ Key Constraint: the reduction has already decided inside — so it transfers nothing and proves nothing. Reductions are only informative when the source language is not known to be decidable, which is why every serious use runs from an undecidable language.
  • Where the two excluded cases go has no and has no , so a constant-valued cannot separate the two answers.

⚠️ Common Mistakes

  • 💡 Reducing the wrong way ➔ the single biggest mark-killer. pushes hardness up and easiness down: it lets you conclude ” decidable decidable” and ” undecidable undecidable” — never the reverse of either.
  • 💡 Proving only one direction is half a reduction. The converse forbids from mapping a No-instance onto a Yes-instance; without it the composite decider accepts too much.
  • 💡 Treating as a decider outputs a string, not a verdict, and is not allowed to consult an oracle for . If your needs to know whether , you have assumed what you are proving.
  • 💡 Forgetting must handle malformed input ➔ every needs an image, including strings that encode no object; map them to any fixed non-member of .
  • 💡 Assuming is symmetric ➔ it is reflexive and transitive (a preorder), not an equivalence. says nothing about .

🧠 Active Recall