CS 390 Solutions to Test I

February 26, 1997


1 (a) True
(b) False
(c) False
(d) True
(e) False

2 (a) a
(b) aa, ab, ba
(c) Add b in front of a string, and add a or b at the end of a string.
(d) Let L be the language to be defined.
Basis Clause: tex2html_wrap_inline43
Inductive Clause: For any tex2html_wrap_inline45 , xa, xb and bx are all in L.
Extremal Clause: Nothing is in L unless it is obtained from a finite number of applications of the Basis and Inductive Clauses.

3. Basis Step: n = 0. tex2html_wrap_inline59 and tex2html_wrap_inline61 for any string x, it holds for n = 0.
Induction: Assume that tex2html_wrap_inline67 holds for an arbitrary n.
Then tex2html_wrap_inline71 by the definition of tex2html_wrap_inline73
tex2html_wrap_inline75 by the property of REV.
tex2html_wrap_inline79 by the induction hypothesis.
tex2html_wrap_inline81
QED

4. tex2html_wrap_inline85