CS 390 Solutions to Test 1
1. Prove
Let y be an arbitrary element of
.
Then there is an element x in
and y = f(x).
Hence
and
.
Hence
and
, that is
.
Hence
.
2. For any set A,
. Hence R is reflexive.
For two set A and B
does not necessarily imply
. Hence R is not symmetric.
For any three sets A,B, and C if
and
then
.
Hence R is transitive.
3.(a)
.
(b)
(c)
or
.
4. L is the set of strings consisting of a's and b's but containing at least
one a.
Since the seed is a, any element of L is genmerated from a by applying (2)
an appropriate number of times. Since both a and b can be appended
any number of times any time during the generation and b can also be added
in front any time any number of times, any string containing at least one a
can be generated by (1) and (2).
5. The statement to be proven is as follows.
Any string in L starts with an a followed by any number of a's and then any number of b's.
Proof.
Basis Step:
Since the seed is a, we prove the statement for string a.
Obviously a starts with a and is followed by zero a's and zero b's.
Hence the statement holds for the basis case.
Induction Step:
Let x be a string in L.
Then we need to show that for any string produced from x by (2) of the
definition, the statement holds.
(2) produces strings ax and xb from x.
For ax, since x starts with a and is followed by a's then b's, obviously
ax still starts with a and is followed by a's and b's.
For xb, since x starts with a and is followed by a's and then b's,
xb still starts with a, is followed by a's and then b's.
Hence the statement holds for all strings of L.
S. Toida
Tue Jan 14 11:14:21 EST 1997