1 / 63

Introduction to Computability Theory

Introduction to Computability Theory. Lecture12: Reductions Prof. Amos Israeli. Introduction. The rest of the course deals with an important tool in Computability and Complexity theories, namely: Reductions .

rania
Download Presentation

Introduction to Computability Theory

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Introduction to Computability Theory Lecture12: Reductions Prof. Amos Israeli

  2. Introduction The rest of the course deals with an important tool in Computability and Complexity theories, namely: Reductions. The reduction technique enables us to use the undecidability of to prove many other languages undecidable.

  3. Introduction A reduction always involves two computational problems. Generally speaking, the idea is to show that a solution for some problem A induces a solution for problem B. If we know that B does not have a solution, we may deduce that A is also insolvable. In this case we say that B is reducible to A.

  4. Introduction In the context of undecidability: If we want to prove that a certain language L is undecidable. We assume by way of contradiction that L is decidable, and show that a decider for L, can be used to devise a decider for . Since is undecidable, so is the language L.

  5. Introduction Using a decider for L to construct a decider for , is called reducing Lto . Note:Once we prove that a certain language L is undecidable, we can prove that some other language, say L’ , is undecidable, by reducing L’ to L.

  6. Schematic of a Reduction • We know that A is undecidable. • We want to prove B is undecidable. • We assume that B is decidable and use this assumption to prove that A is decidable. • We conclude that B is undecidable. Note: The reduction is fromAtoB.

  7. Demonstration • We know that A is undecidable. The only undecidable language we know, so far, is whose undecidability was proven directly. (In the discussion you also proved directly that is undecidable). So we pick to play the role of A. • We want to prove B is undecidable.

  8. Demonstration • We want to prove B is undecidable. We pick to play the role of B that is: We want to prove that is undecidable. • We assume that B is decidable and use this assumption to prove that A is decidable.

  9. Demonstration • We assume that B is decidable and use this assumption to prove that A is decidable.In the following slides we assume (towards a contradiction) that is decidable and use this assumption to prove that is decidable. • We conclude that B is undecidable.

  10. The “Real” Halting Problem Consider Theorem is undecidable. Proof By reducing to .

  11. Discussion Assume by way of contradiction that is decidable. Recall that a decidable set has a deciderR: A TM that halts on every input and either accepts or rejects, but never loops!. We will use the assumed decider of to devise a decider for .

  12. Discussion Recall the definition of : Why is it impossible to decide ? Because as long as M runs, we cannot determine whether it will eventually halt. Well, now we can, using the deciderR for .

  13. Proof Assume by way of contradiction that is decidable and let Rbe a TM deciding it. In the next slide we present TM S that uses R as a subroutine and decides . Since is undecidable this constitutes a contradiction, so R does not exist.

  14. Proof (cont.) S=“On input where M is a TM: 1. Run R on input until it halts. 2. If R rejects, (i.e. M loops on w ) - reject. (At this stage we know that R accepts, and we conclude that M halts on input w.) 3. Simulate M on w until it halts. 4. If M accepts - accept, otherwise - reject. “

  15. Another Example In the discussion, you saw how Diagonalization can be used to prove that is not decidable. We can use this result to prove by reduction that is not decidable.

  16. Another Example Note: Since we already know that both and are undecidable, this new proof does not add any new information. We bring it here only for the the sake of demonstration.

  17. Demonstration • We know that A is undecidable. Now we pick to play the role of A. • We want to prove B is undecidable. We pick to play the role of B, that is: We want to prove that is undecidable. • We assume that B is decidable and use this assumption to prove that A is decidable.

  18. Demonstration • We assume that B is decidable and use this assumption to prove that A is decidable.In the following slides we assume that is decidable and use this assumption to prove that is decidable. • We conclude that B is undecidable.

  19. Discussion Let R be a decider for . Given an input for , R can be run with this input :If R accepts, it means that .This means that M accepts on input w. In particular, M stops on input w. Therefore, a decider for must accept too.

  20. Discussion If however R rejects on input , a decider for cannot safely reject: M may be halting on w to reject it. So if M rejects w, a decider for must accept .

  21. Discussion How can we use our decider for ?The answer here is more difficult. The new decider should first modify the input TM, M, so the modified TM, , accepts, whenever TMMhalts. Since M is a part of the input, the modification must be apart of the computation.

  22. Discussion Faithful to our principal “ If it ain’t broken don’t fix it”, the modified TM keeps M as a subroutine, and the idea is quite simple:Let and be the accepting and rejecting states of TM M, respectively. In the modified TM, , and are kept as ordinary states.

  23. Discussion We continue the modification of M by adding a new accepting sate . Then we add two new transitions: A transition from to , and another transition from to . This completes the description of . It is not hard to verify that accepts iff M halts.

  24. Discussion

  25. Discussion The final description of a decider S for is: S=“On input where M is a TM: 1. Modify M as described to get . 2. Run R, the decider of with input . 3. If R accepts - accept, otherwise - reject. ”

  26. Discussion It should be noted that modifying TM M to get , is part of TM S, the new decider for , and can be carried out by it. It is not hard to see that S decides . Since is undecidable, we conclude that is undecidable too.

  27. The TM Emptiness Problem We continue to demonstrate reductions by showing that the language , defined by is undecidable. Theorem is undecidable.

  28. Proof Outline The proof is by reduction from : • We know that is undecidable. • We want to prove is undecidable. • We assume toward a contradiction that is decidable and devise a decider for . • We conclude that is undecidable.

  29. Proof Assume by way of contradiction that is decidable and let Rbe a TM deciding it. In the next slides we devise TM S that uses R as a subroutine and decides .

  30. Proof Given an instance for , , we may try to run R on this instance. If Raccepts, we know that . In particular, M does not accept w so a decider for must reject .

  31. Proof What happens if Rrejects? The only conclusion we can draw is that . What we need to know though is whether . In order to use our decider R for , we once again modify the input machine M to obtain TM :

  32. Description of___ We start with a TM satisfying .

  33. Description of___ Now we add a filter to divert all inputs but w. filter yes no

  34. Proof TM has a filter that rejects all inputs excepts w, so the only input reaching M, is w. Therefore, satisfies:

  35. Proof Here is a formal description of : “On input x : 1. If - reject . 2. If - run M on w and accept if M accepts. ” Note:M accepts w if and only if .

  36. Proof S=“On input where M is a TM: 1. Compute an encoding of TM . 2. Run R on input . 3. If R rejects - accept, otherwise - reject.

  37. Proof Recall that R is a decider for . If R rejects the modified machine , , hence by the specification of , , and a decider for must accept .If however Raccepts, it means that , hence , and Smust reject . QED

  38. _______ is undecidable We continue to demonstrate reductions by showing that the language : is undecidable. Theorem is undecidable.

  39. Proof Outline The proof is by reduction from : • We know that is undecidable. • We want to prove is undecidable. • We assume that is decidable and devise a decider for . • We conclude that is undecidable.

  40. Proof Consider an instance of ATM . Once again, the idea is to transform TM M to another TM, , such that is regular if and only if . Once we have such a machine we can run a decider for with as input, and accept , if the decider accepts.

  41. Description of___ Here the idea is to devise a TM that satisfy: .

  42. Description of___ TM M2 is obtained as follows: • Start with M. • Add a filter in front of M such that for every input x: 2.1 If x is of the form 0n1n - accept. 2.2 Send w to M – If M accepts - accept.

  43. Description of___ We start with a TM satisfying .

  44. Description of___ Add a filter to accept all inputs of form . yes filter no

  45. Proof “On input x : 1. If x has the form , accept . 2. If x does not have this form, run M on w and accept if M accepts w . ” Note: If M accept w then . If M does not accepts w then .

  46. Proof Now consider S: “On input :1. Construct as described using . 2. Run R on . 3. If R accepts (Meaning ) - accept , otherwise ( ) - reject .”

  47. TM Equivalence is Undecidable Consider Theorem is undecidable.

  48. Proof The proof is by reduction from . We have to show that if is decidable, so is .The idea is very intuitive: In order to check that a language of TM M is empty, as required by , we will check whether M is equivalent to a TM that rejects all its inputs.

  49. Proof S=“On input , where M is a TM: 1. Run R on input where is a TM that rejects all its inputs. 2. If R accepts – accept, otherwise – reject . IfR decides , S decides . Since is undecidable, so is . QED

  50. Mapping Reductions Mapping Reductions are the most common reductions in Computer Science. In this lecture we define mapping reductions and demonstrate the way in which they are used.

More Related