Lesson 02
Lesson 02
1
Examples
2
Important Note
4
Solutions
Answers:
1) Let S={ab, bb} and T={ab, bb, bbbb} Show
that S* = T* [Hint S* T* and T* S*]
2) Let S={ab, bb} and T={ab, bb, bbb} Show
that S* ≠ T* But S* T*
Solution: Since S T , so every string
belonging to S* , also belongs to T* but bbb is
a string belongs to T* but does not belong to
S *.
5
Solutions
6
PLUS Operation (+)
i. (S+)*=(S*)*
ii. (S+)+=S+
iii. Is (S*)+=(S+)*
8
Solutions
9
Solutions Cont…
i. (S+)*=(S*)*
Solution: In general Λ is not in S+ , while
Λ does belong to S*. Obviously Λ will
now be in (S+)*, while (S*)* and S*
generate the same set of strings.
Hence (S+)*=(S*)*.
10
Solutions Cont…
ii) (S+)+=S+
Solution: since S+ generates all possible
strings that can be obtained by
concatenating the strings of S, so (S+)+
generates all possible strings that can
be obtained by concatenating the
strings of S+ , will not generate any
new string.
Hence (S+)+=S+
11
Q2) continued…
iii) Is (S*)+=(S+)*
Solution: since Λ belongs to S* ,so Λ
will belong to (S*)+ as member of
S* .Moreover Λ may not belong to S+,
in general, while Λ will automatically
belong to (S+)*.
Hence (S*)+=(S+)*
12
Remark
14
Example
15
Example
16
Example
17
Defining the language L, of strings
ending in a , defined over Σ={a,b}
Step 1:
a is in L
Step 2:
if a is in L then s(a) is also in L, where s
belongs to Σ*
Step 3:
No strings except those constructed in
above, are allowed to be in L
18
Defining the language L, of strings
beginning and ending in same letters ,
defined over Σ={a, b}
Step 1:
a and b are in L
Step 2:
(a)s(a) and (b)s(b) are also in L, where s
belongs to Σ*
Step 3:
No strings except those constructed in
above, are allowed to be in L
19
Defining the language L, of strings
containing aa or bb , defined over
Σ={a, b}
Step 1:
aa and bb are in L
Step 2:
s(aa)s and s(bb)s are also in L, where s belongs
to Σ*
Step 3:
No strings except those constructed in
above, are allowed to be in L
20
Defining the language L, of strings
containing exactly aa, defined over
Σ={a, b}
Step 1:
aa is in L
Step 2:
s(aa)s is also in L, where s belongs to b*
Step 3:
No strings except those constructed in
above, are allowed to be in L
21
Note
22