CS 301 Problem Set 10, Due Friday, April 6, 2012
- Consider a new version of the Turing machine that has one additional operation: “Bomb!” When it executes the Bomb operation, it self destructs and also usually injures or kills anybody within a 20 meter radius. It would certainly be nice to be able to determine whether such a Turing machine will Bomb on an particular input.
Formalize this as a language, and prove that the language is undecidable. Hint: One very easy way to do the proof is with a pretty easy reduction.
- Prove that if then also where we are using to denote the complement of set .
- If L mapping reduces to a finite, nonempty, language, does L have to be a finite language? If so, why; if not, give a simple counterexample.
- For each of the following languages, classify it as decidiable, undecidable but Turing-recognizable, or not Turing-recognizable. Justify the classification you use. In all the languages, anything of the form <M> is an encoding of a Turing machine. Our alphabet includes at least 0 and 1.
- For each of the following problems about software design or computer science, reformulate the problem as a formal language, and then give an argument that the corresponding language is undecidable. You are allowed to used reductions among different parts of this problem. At least for the first one, model it in terms of Turing machines.
- Dead code (dead state): Given a program and a particular input and a particular line number in the program (model this as a state of your Turing machine), does the program running on that input ever reach that line number?
- Given a program and a line number, can we determine whether that line number is reached on all inputs?
- Given a program and a file f, does the program always close f before exiting?
- Given a program and a variable x, is x always initialized before the first time x is used?
-- Main.sloan - 2012-03-31