CSCI 4602
Fall 2000
Homework assignment 10.

Due: Friday 10/20

  1. Show that the language {p | p is a program that terminates on all inputs, and L(p) is a regular language} is not decidable.

  2. Show that the language {p | p is a C++ program that can, on some input, use a variable that has not been initialized} is undecidable. That is, it is not possible to write a program that will read a C++ program and tell whether there is an input on which that program will use an uninitialized variable.

    Hint. Reduce from the halting problem. Arrange to use an uninitialized variable just before halting. Be sure that the program does not use any uninitialized variables before that. How can you do that?