T F, CS-5800 Sample Exam 1
T F, CS-5800 Sample Exam 1
T F, CS-5800 Sample Exam 1
Sample Exam 1
CLOSED BOOK, CLOSED NOTES
Your name:
1. Prove by induction:
2 + 5 + 8 + + (3n 1) =
n(3n + 1)
2
, for n > 0.
2. If u and v are strings, u, v
b) X
+
(ii) Let X = { a, b, c }; Y = { ccb, d }.
Express:
a) XY
b) X
0
c) XX = X
2
7. Exercise: Show that the set of the regular languages is closed under union, concatenation and Kleene closure.
8. For a given DFA and a particular string, give a computation on the string. Is the string accepted or rejected?
Give an algorithm to simulate a DFA. Work through it for an example DFA and string. What is the time
complexity of the algorithm as a function of the length of the string?
9. Give an overview of the Chomsky hierarchy of languages and their grammars, with the characteristic form
of the grammar rules for each type.
2