Reduction Informal Definition A problem A is reducible to problem B iff the solution to problem B can be used to solve the problem A . Computability and Complexity This means that solving A cannot be more difficult than solving B . Lecture 5 In the terms of computability theory: Reductions Undecidable problems from language theory A reduces to B means that Linear bounded automata if B is decidable then A is decidable too, and given by Jiri Srba if A is undecidable then B is undecidable too. The way we will use reducibility: If we can reduce e.g. A TM to some other problem (language) B , then B is undecidable. Lecture 5 Computability and Complexity 1/14 Lecture 5 Computability and Complexity 2/14 Typical Proof Structure to Show Undecidability The Language HALT TM We want to show that a language B is undecidable using the fact that we already know that the language A is undecidable. Problem: ”Given a TM M and a string w , does M halt on w ?” Proof idea (proof by contradiction): Language formulation 1 Assume for a while that we have a decider M B for the def HALT TM = {� M , w � | M is a TM and M halts on the input w } language B . 2 Using M B we construct a decider M A for the language A . 3 Because we know that M A cannot exist ( A is undecidable), Theorem this implies that M B cannot exist either. The language HALT TM is undecidable. 4 Conclusion is that the language B is undecidable. Proof: We reduce A TM to HALT TM . In the proof we provided a reduction from an undecidable language A to the language B . Hence B is undecidable too. Lecture 5 Computability and Complexity 3/14 Lecture 5 Computability and Complexity 4/14 Undecidability of HALT TM by Reduction from A TM The Language E TM def A TM = {� M , w � | M is a TM and M accepts the input w } def = {� M , w � | M is a TM and M halts on the input w } HALT TM Problem: ”Given a TM M is the language of M empty?” 1 By contradiction. Assume there is a decider R for HALT TM . Language formulation 2 Using the decider R , we construct a decider S for A TM : def E TM = {� M � | M is a TM such that L ( M ) = ∅ } S = ” On input � M , w � : 1. Run R on � M , w � . 2. If R rejected then S rejects. Theorem 3. If R accepted then simulate M on w . The language E TM is undecidable. 4. If M accepted then S accepts, else If M rejected then S rejects. ” Proof: We reduce A TM to E TM . 3 So S is a decider for A TM , but we know that S does not exist. 4 Conclusion: the decider R does not exist either and so HALT TM is undecidable. Lecture 5 Computability and Complexity 5/14 Lecture 5 Computability and Complexity 6/14
Undecidability of E TM by Reduction from A TM The Language EQ TM def = {� M , w � | M is a TM and M accepts the input w } A TM def E TM = {� M � | M is a TM such that L ( M ) = ∅ } 1 By contradiction. Assume there is a decider R for E TM . Problem: ”Given two TMs M 1 and M 2 , do they recognize the 2 Using the decider R , we construct a decider S for A TM : same language?” S = ” On input � M , w � : Language formulation 1. Using M and w construct the following TM M 1 def EQ TM = {� M 1 , M 2 � | M 1 and M 2 are TMs s.t. L ( M 1 ) = L ( M 2 ) } M 1 = ”On input x : 1. If x � = w then M 1 rejects 2. If x = w then simulate M on w . Theorem If M accepted then M 1 accepts, The language EQ TM is undecidable. if M rejected then M 1 rejects.” 2. Run R on � M 1 � . Proof: We reduce E TM to EQ TM . 3. If R accepted, S rejects; if R rejected, S accepts. ” 3 So S is a decider for A TM , but we know that S does not exist. 4 Conclusion: R cannot exist and hence E TM is undecidable. Lecture 5 Computability and Complexity 7/14 Lecture 5 Computability and Complexity 8/14 Undecidability of EQ TM by Reduction from E TM The Language REGULAR TM def EQ TM = {� M 1 , M 2 � | M 1 and M 2 are TMs s.t. L ( M 1 ) = L ( M 2 ) } def = {� M � | M is a TM such that L ( M ) = ∅ } E TM Problem: ”Given a TM M , is L ( M ) regular?” 1 By contradiction. Assume there is a decider R for EQ TM . Language formulation 2 Using the decider R , we construct a decider S for E TM : def REGULAR TM = {� M � | M is a TM s.t. L ( M ) is regular } S = ” On input � M � : 1. Let M 1 be a TM that rejects all inputs. Theorem 2. Run R on � M , M 1 � . The language REGULAR TM is undecidable. 3. If R accepted, S accepts; if R rejected, S rejects. ” Proof: We reduce A TM to REGULAR TM . 3 So S is a decider for E TM , but we know that S does not exist. 4 Conclusion: R cannot exist and so EQ TM is undecidable. Lecture 5 Computability and Complexity 9/14 Lecture 5 Computability and Complexity 10/14 Undecidability of REGULAR TM by Reduction from A TM Linear Bounded Automaton def A TM = {� M , w � | M is a TM such that M accepts w } Idea: def = {� M � | M is a TM such that L ( M ) is regular } REGULAR TM Limit the memory (tape cells) of a TM. The available memory is proportional (by a constant factor) to 1 By contradiction. Assume a decider R for REGULAR TM . the length of the input string. 2 Using the decider R , we construct a decider S for A TM : S = ” On input � M , w � : Definition 1. Construct the following TM M 1 : Linear bounded automaton (LBA) is a restricted Turing machine M 1 = ”On input x : M such that when M runs on any input string w , its head always 1. If x of the form 0 n 1 n then M 1 accepts, else stays within the first | w | cells. 2. run M on w and M 1 accepts iff M accepted.” 2. Run R on � M 1 � . Lemma 3. If R accepted, S accepts; if R rejected, S rejects.” Let M be an LBA with q states and g tape symbols. When M is run on w then there are at most qng n distinct configurations of M 3 So S is a decider for A TM , but we know that S does not exist. where n = | w | . 4 So R cannot exist and REGULAR TM is undecidable. Lecture 5 Computability and Complexity 11/14 Lecture 5 Computability and Complexity 12/14
Acceptance Problem of Linear Bounded Automaton Exam Questions Problem: ”Does a given LBA accept a given string?” Language formulation def A LBA = {� M , w � | M is an LBA such that M accepts w } Notion of reduction from problem A to problem B . Theorem Undecidability proofs using the reduction. The language A LBA is decidable. Linear bounded automata: definition, decidability of the Proof: The following algorithm decides A LBA : acceptance problem. ”On input � M , w � where M is an LBA and w a string: 1. Simulate M on w for at most q · | w | · g | w | steps where q is the number of states in M , and g the number of tape symbols in M . 2. If M accepted, then accept. If M rejected, then reject. If M did not halt (in q · | w | · g | w | steps), then reject.” Lecture 5 Computability and Complexity 13/14 Lecture 5 Computability and Complexity 14/14
Recommend
More recommend