1. Which of the following statements are true and which are false ? [30]
(a)
.                             False     (Empty string may not be in L+)
(b)
                      True
(c)
            True
(d) Suppose that
and
are sets, that
and
are subsets of
and that
is a function from
to
.
Then
.             True
(e) Suppose that
and
are sets and that
is a function.
Also suppose that
is a function such that
for every
in
. Then
is
.             False
    (A may have more elements than B.)
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]
Proof:
Basis Step:
. Then
since
.
Also
since
. Hence
holds.
Inductive Step: Assume that
holds
for an arbitrary string
. We try to show that
for every symbol
.
By the definition of
,
for any
.
Since by the induction hypotheis
,
.
Also by the definition of
,
for any
.
Hence
holds for every symbol
.
4 (a) Recursively define the set of strings of the form
. [10]
Solution:
Basis Clause:
.
Inductive Clause: For any string
, if
, then
and
.
Extremal Clause: Nothing is in
unless it is obtained from the Basis
and Inductive Clauses.
(b) Give a string of length 3 that is in the set of (a). [6]                         110 and others
(c) Give one of the shortest strings that is not in the set of (a). [6]             01