CS 390 Final Exam
May 6, 1997
1(a). Find an NFA that recognizes the same language as the following
:
The initial state is 0 and the accepting state is 5.
(b) Find .
(c) Find .
(d) Find an FA that recognizes the same language as the following
NFA:
The initial state is 0 and the accepting state is 1.
2. Find a regular expression for each of the following languages over the alphabet {0,1}:
(a) The set of all strings that have an even number of 0's.
(b) The set of all strings that do not have 01 as a substring.
(c) The language L defined recursively as follows:
Basis Clause:
Inductive Clause: If , then and .
Extremal clause: Nothing is in L unless it is obtained from the above two clauses.
3. Prove by induction that if L is regular, then is regular for all natural number .
4. In the questions below the languages are over the alphabet {0,1}.
(a) Prove that the language { : i > j} is non-regular.
You may use { : } for the infinite set of strings.
(b) Prove that the set of strings of the form xyx for some string x with
and some string y is non-regular.
5. Design a Turing machine for (a) and (b), and answer (c):
You may use the basic Turing machines, shifter, copier and eraser.
(a) A Turing machine that accepts but not decides the language L = {a, ba}.
(b) A Turing machine that decides the language L = {a, ba}.
(c) Does the Turing machine of (a) solve the problem "Does a string belong to L ?
" ?
Explain what the Turing machine does when a string is given to it and explain in what
sense it
solves or does not solve the problem.