Download presentation
Presentation is loading. Please wait.
1
Theory of Computability
Giorgi Japaridze Theory of Computability Reducibility Episode 3
2
The undecidability of the halting problem
Giorgi Japaridze Theory of Computability 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
Definition of mapping reducibility
Giorgi Japaridze Theory of Computability We say that A is mapping reducible to B, written AmB, if there is a computable function f: ** such that, for every w*, wA iff f(w)B. The function f is called a mapping reduction (映射归约) of A to B. Let A and B be sets of strings over an alphabet . * * A B f f
4
Exercise on mapping reducibility
Giorgi Japaridze Theory of Computability 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}
5
Using mapping reducibility for proving decidability/undecidability
Giorgi Japaridze Theory of Computability Theorem 3.2: If AmB 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 AmB and A is undecidable, then B is undecidable. Theorem 3.2 remains valid with “recognizable” instead of “decidable”. So does Corollary 3.3.
6
A mapping reduction of ATM to HALTTM
Giorgi Japaridze Theory of Computability 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 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>) i.e. f is a HALTTM mapping reduction of ATM to HALTTM So, since ATM is undecidable, HALTTM is undecidable as well.
7
An oracle (谕示) for a set B is an external device that is capable
Turing reducibility 3.3.e Giorgi Japaridze Theory of Computability 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 ATB, iff there is an OTM M such that, as long as the oracle of M is for B, M decides A.
8
Using Turing reducibility
3.3.f Giorgi Japaridze Theory of Computability Theorem 3.4: a) If ATB and B is decidable, then A is decidable. Consequently, b) If ATB 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).
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.