CS 390 Final Exam


June 25, 1998



1(a) Obtain an $FA$ that accepts the language accepted by the following $NFA$:

State $q$ $\delta (q,a)$ $\delta (q,b)$
$1$ {$3,4,5$} {$2$}
$2$ {$5$} $\emptyset$
$3$ {$4$} {$2,5$}
$4$ {$5$} {$2,3$}
$5$ {$3,5$} $\emptyset$


The initial state is $1$ and the accepting state is $5$. [10]

(b) Find $\delta^{*}(1,aba)$ for the $NFA$ of (a). [10]

2. Prove the following statement using the structural induction:
For an $FA$ if $\delta (q,a) = q$ for every symbol $a$ in the alphabet $\Sigma$, then $\delta^{*} (q,x) = q$ for any string $x$ in $\Sigma^{*}$. [15]

3. Find a regular expression for the language of all strings in which every $1$ is immediately followed by $00$. [15]

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

5. Let $Accept(a)$ denote the problem that asks whether or not a given Turing machine accepts a symbol (i.e. a string of one symbol) $a$. Prove that $Accept(a)$ is not decidable. [15]

6(a) Design a Turing machine that accepts the language { $ 0^{i}1^{j} \mid
i > j \geq 0$, $i$ and $j$ are integers.} You may use the Turing machines discussed in the lectures as building blocks. [10]
(b) Let the language $L$ be defined recursively as follows:
Basis Clause: $0 \in L$
Inductive Clause: For all $x$, if $x \in L$, then $0x1 \in L$ and $0x \in L$.
Extremal Clause: Nothing is in $L$ unless it is obtained from the above two clauses.

Does the Turing machine you designed in (a) solve the problem "Is $x$ in the language $L$ ?" for an arbitrary string $x$ ? Give your reasons. [10]