CS 390 Final Exam



August 3, 2000



1(a) Build an $NFA-\Lambda$ from the simplest $NFA$s that accepts the language represented by the regular expression $01^{*} + 10$. DO NOT skip steps and DO NOT simplify the result. [10]
(b) Obtain $NFA$ without $\Lambda$s for the $NFA-\Lambda$ of (a). [10]



2. Prove the following statement using the structural induction:
For every string $x$ and every symbol $a$, $(ax)^{r} = x^{r}a$. [15]



Here $x^{r}$ is the reversal of $x$ i.e. $x$ spelled backward and it is defined as follows:



Basis Clause: $\Lambda^{r} = \Lambda$
Inductive Clause: For any string $x$ and any symbol $a$, $(xa)^{r} = ax^{r}$.



3. Prove that the language $L = \{w^{r}w \mid w \in \{a,b\}^{*}\}$ is not regular, where $w^{r}$ denotes the reversal of $w$. [15]



4. For the regular expression $(111^{*})^{*}$ answer the following questions:



(a) Simplify it by reducing the number of *. [7]
(b) Give your reason for (a). [7]
(c) Describe in English the language it represents as succinctly as possible. [6]



5. Design a Turing machine that accepts the language { $ 0^{i}1^{j} \mid
i \geq j \geq 0$, $i$ and $j$ are integers.} You may use the Turing machines discussed in the lectures as building blocks. [15]



6 (a) Suppose that a language $L$ is accepted by a Turing machine $T_{1}$ and that its complement is accepted by a Turing machine $T_{2}$, which may or may not be the same as $T_{1}$. Is it possible to construct a Turing machine that accepts both $L$ and its complement ? Justify your answer. [8]
(b) What kind of language is $L$ if $T_{1}$ and $T_{2}$ exist ? [7]