This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: Computer Science 340 Reasoning about Computation Homework 11 Due on Friday, December 14, 2007 For this homework, read Section 5.3 on Mapping Reducibility in the notes distributed in class. Problem 1 Recall that E TM = {h M i M is a TM and L ( M ) = ∅} . Prove that E TM is Turingrecognizable. Solution: We claim that the following TM recognizes the language E TM . N on input w : 1. If w is not an encoding of a TM, then w 6∈ E TM . Hence N can already accept w at this point. 2. Otherwise, let M be the TM encoded by w . 3. Let i be a counter. Initially set i = 1. 4. For all strings x of length at most i , simulate M on x for i steps. If M accepted some string during these simulations, then L ( M ) 6 = ∅ . Hence w = h M i 6∈ E TM and N can accept w at this point. 5. Increment i by one, and go back to step (4). We already argued that N accepts only if the input w belongs to E TM . We still need to argue about the converse: if w belongs to E TM , then N accepts w . Let w be a word in E TM . Then, either w is not a TM or w encodes a machine M with L ( M ) 6 = ∅ . In the former case, N will accept w in step (1). In the latter case, there is a word x such that x ∈ L ( M ). Suppose that x has length j and that M accepts x after j steps. Then N will accept w = h M i when the counter i assumes a value larger than both j and j . If the counter does not reach this value then N must have accepted earlier (which is...
View
Full
Document
 Fall '07
 CharikarandChazelle

Click to edit the document details