Giorgi Japaridze Theory of Computability Reducibility Episode 3
Giorgi Japaridze Theory of Computability Reducibility Episode 3
3. 1. a Giorgi Japaridze Theory of Computability The undecidability of the halting problem Let HALTTM = {<M, w> | M is a TM and M halts on input w} HALTTM is called the halting problem. Theorem 3. 1: HALTTM is undecidable. Proof idea: Assume, for a contradiction, that HALTTM is decidable. I. e. there is a TM R that decides HALTTM. Construct the following TM S: S = “On input <M, w>, an encoding of a TM M and a string w: 1. Run R on input <M, w>. 2. If R rejects, reject. 3. If R accepts, simulate M on w until it halts. 4. If M has accepted, accept; if M has rejected, reject. ” • If M works forever on w, what will S do on <M, w>? Expicitly reject • If M accepts w, what will S do on input <M, w>? Accept • If M explicitly rejects w, what will S do on <M, w>? Expicitly reject Thus, S decides the problem ATM. But this is impossible (Theorem 2. 2)
3. 3. a Giorgi Japaridze Theory of Computability Definition of mapping reducibility Let A and B be sets of strings over an alphabet . We say that A is mapping reducible to B, written A m. B, if there is a computable function f: * * such that, for every w *, w A iff f(w) B. The function f is called a mapping reduction (映射归约) of A to B. * * A B f f
3. 3. a Giorgi Japaridze Theory of Computability Definition of mapping reducibility Let A and B be sets of strings over an alphabet . We say that A is mapping reducible to B, written A m. B, if there is a computable function f: * * such that, for every w *, w A iff f(w) B. The function f is called a mapping reduction (映射归约) of A to B. * * A B f f
3. 3. a Giorgi Japaridze Theory of Computability Definition of mapping reducibility Let A and B be sets of strings over an alphabet . We say that A is mapping reducible to B, written A m. B, if there is a computable function f: * * such that, for every w *, w A iff f(w) B. The function f is called a mapping reduction (映射归约) of A to B. * * A B f f
3. 3. b Giorgi Japaridze Theory of Computability Exercise on mapping reducibility In each case below, find (precisely define) a particular function that is a mapping reduction of A to B. Both A and B are sets of strings over the alphabet {0, 1}. A = {w | the length of w is even}, B = {w | the length of w is odd} A = B = {w | the length of w is even} A={0, 1}*, B={00, 1, 101}
3. 3. c Giorgi Japaridze Theory of Computability Using mapping reducibility for proving decidability/undecidability Theorem 3. 2: If A m. B and B is decidable, then A is decidable. Proof: Let DB be a decider for B and f be a mapping reduction of A to B. We describe a decider DA for A as follows. DA= “On input w: 1. Compute f(w). 2. Run DB on input f(w) and do whatever DB does. ” Corollary 3. 3: If A m. B and A is undecidable, then B is undecidable. Theorem 3. 2 remains valid with “recognizable” instead of “decidable”. So does Corollary 3. 3.
3. 3. d Giorgi Japaridze Theory of Computability A mapping reduction of ATM to HALTTM For every TM M, let M* be the following TM: M* = “On input x: 1. Run M on x. 2. If M accepts, accept. 3. If M rejects, enter an infinite loop. ” Thus, • If M accepts input x, then M* • If M explicitly rejects x, then M* • If M never halts on x, then M* To summarize, M accepts x iff M* accepts x never halts on x Let then f be the function defined by f(<M, w>)=<M*, w>. Is f computable? Yes! Obviously <M, w> ATM iff f(<M, w>) HALTTM i. e. f is a mapping reduction of ATM to HALTTM ATM is undecidable, HALTTM is undecidable as well. So, since
3. 3. e Giorgi Japaridze Theory of Computability Turing reducibility An oracle (谕示) for a set B is an external device that is capable of reporting whether any string w is a member of B. An oracle Turing machine (OTM) is a modified Turing machine that has the additional capability of querying an oracle. Example: Construct an OTM O such that, as long as the oracle of O is for the acceptance problem ATM, O decides the non-acceptance problem ATM. O = “On input <M, w>, where M is a TM and w is a string: 1. Query the oracle to determine whether <M, w> ATM. 2. If the oracle answers NO, accept; if YES, reject. ” A set A is Turing reducible (图灵可归约) to set B, written A TB, iff there is an OTM M such that, as long as the oracle of M is for B, M decides A.
3. 3. f Giorgi Japaridze Theory of Computability Using Turing reducibility Theorem 3. 4: a) If A TB and B is decidable, then A is decidable. Consequently, b) If A TB and A is undecidable, then B is undecidable. Proof (a): Assume M is an OTM that decides A as long as the oracle of M is for B. If B is decidable, then we may replace the oracle for B by an actual procedure that decides B. Thus we may replace M by an ordinary TM that decides A. Exercise: Show that the acceptance problem (ATM) is Turing reducible to the halting problem (HALTTM).
- Slides: 10