1. Which of the following statements are true and which are false ? [30]
(a)
.
(b)
(c)
(d) Suppose that
and
are sets, that
and
are subsets of
and that
is a function from
to
.
Then
.
(e) Suppose that
and
are sets and that
is a function.
Also suppose that
is a function such that
for every
in
. Then
is
.
2. Find a regular expression for each of the following languages over alphabet {
}:
(a) All strings with at least two
's. [15]
(b) All strings which do not contain the substring
. [10]
3. Prove by structural induction on string
that
for an arbitrary fixed string
.
You may use the following definitions.
is defined recursively as
Basis Clause:
Inductive Clause: If
. then
for all
.
Extremal Clause: As usual.
Also for any string
,
is defined as
Basis clause:
Inductive Clause: If
and
, then
. [23]
4 (a) Recursively define the set of strings of the form
. [10]
(b) Give a string of length 3 that is in the set of (a). [6]
(c) Give one of the shortest strings that is not in the set of (a). [6]