This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: CS 181 — Winter 2008 Formal Languages and Automata Theory Problem Set #7 Solutions Problem 7.1. (10 points) A useless state in a Turing machine is one that is never entered on any input string. Consider the problem of determining whether a Turing machine has any useless states. Formulate this problem as a language and show that it is undecidable. Solution We formulate this problem as the following language: US TM = {h M i  M is a Turing machine with a useless state } . We will show that US TM is undecidable via a reduction from the language E TM . Recall that E TM = {h M i  M is a Turing machine with L ( M ) = ∅} . Assume, by way of contradiction, that US TM is decidable and let D be a decider for it. Now suppose we wish to decide whether or not some Turing machine M has an empty language (i.e. whether or not h M i ∈ E TM ). Notice that M has an empty language if and only if its accept state q accept is useless. However, we can only use D to find if any of the states (not just q accept ) are useless. Thus, we will need to construct a Turing machine M whose language is exactly that of M , but guarantees that all nonaccepting states are not useless. We construct M by starting with M and adding transitions. Let ♠ be a tape symbol not used by M . Then for each state q ∈ Q where q 6 = q accept , M has the ability to go from q to q by writing ♠ to the tape (regardless of what tape symbol is read) and keeping the head in the same position. Since ♠ did not appear in M , no accepting run of M will use these transitions. However, the existence of these transitions guarantee that every state, other than q accept , is not useless....
View
Full
Document
This homework help was uploaded on 04/02/2008 for the course COM SCI 181 taught by Professor Griebach during the Spring '08 term at UCLA.
 Spring '08
 griebach

Click to edit the document details