Lesson 3
Lesson 3
Lesson 3
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*)*.
Q2) continued…
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+
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+)*
Regular Expression
2.r1 r2
3.r1 + r2 and
4. r1*
are also regular expressions.
Step 3: Nothing else is a regular expression.
Defining Languages (continued)…