CS 390 Introduction to Theoretical Computer Science


Spring 1994 Final Exam



1(a) Find an NFA- tex2html_wrap_inline74 recognizing the language corresponding to the regular expression tex2html_wrap_inline76 , by applying literally the algorithm in the textbook(also given in lectures). Do not simplify.

(b) Find an FA that accepts the complement of the language corresponding to the regular expression ab + b.

2(a) Obtain an NFA that accepts the language accepted by the following NFA- tex2html_wrap_inline74 :

tabular22



The accepting states are {3,6}.

(b) Obtain an FA that accepts the language accepted by the following NFA:

tabular28



The accepting state is {5}.
3. The halting problem is proven to be unsolvable. Explain in what sense it is unsolvable i.e. explain what happens if you want to solve it by a computer.

4. Design a Turing machine that computes the function f(x) = x div 2 for an arbitrary positive integer x. You may use Turing machines given as examples in the textbook or discussed in the lectures. Also describe in English the method that your Turing machine represents.

5(a) What is the final tape configuration for the following Turing machine, if the initial configuration is tex2html_wrap_inline198 ?

tabular37



(b) Explain briefly what the Turing machine of (a) does and how it does.

6. For a language L, let REV(L) denote the language tex2html_wrap_inline252 , where REV(x) for a string tex2html_wrap_inline256 is defined as follows:

Definition of REV(x):
(1) tex2html_wrap_inline260 = tex2html_wrap_inline74 .
(2) For any tex2html_wrap_inline256 and any tex2html_wrap_inline266 ,
REV(xa) = aREV(x).

Answer the following questions:
(a) If r is the regular expression tex2html_wrap_inline274 , and tex2html_wrap_inline276 is the corresponding language, give a regular expression corresponding to tex2html_wrap_inline278 .
(b) Using your answer to (a) as a hint, give a recursive method of finding a regular expression corresponding to the language tex2html_wrap_inline280 for a given regular expression s.
(c) Prove that your method of (b) is correct by mathematical induction.




S. Toida
Mon Jan 13 18:16:18 EST 1997