III Year
–
V Semester CSE
CS2303
–
Theory of Computation
Adhiparasakthi College of Engg., G.B. Nagar, Kalavai
Page 8 of 20
Unit - II
1.
State regular expression.
Let Σ be an alphabet. The regular expressions over Σ and the
sets that they
denote are defined recursively as follows
a.
Ø is a regular expression and denotes the empty
set.
b.
is a regular expression and denotes the set {
}
c.
For each
‘
a
’
Σ, ‘a’ is a regular expression and denotes the set {a}.
d.
If
‘r’ and ‘s’ are regu
lar expressions denoting the languages L
1
and L
2
respectively then
r + s is equivalent to L
1
U L
2
i.e. union
rs is equivalent to L
1
L
2
i.e. concatenation
r
*
is equivalent to L
1
*
i.e. closure
2.
How the kleen
’s
closure or closure of L can be denoted?
n
L
*
=
U
L
i
(e.g. a
*
={
,a,aa,aaa,……})
i=0
3.
How do you represent positive closure of L?
n
L
+
=
U
L
i
(e.g. a
+
={a,aa,aaa,……})
i=1
4.
Write the regular expression for the language accepting all combin
ations of a’s
over the set
= {a}.
L = { a,aa,aaa,………………….}
R= a
*
(i.e. kleen closure)
5.
Write regular expression for the language accepting
the strings which are
starting with
1
and ending with
0, over the set
= {0,1}.
L = { 10,1100,1010,100010………………….}
R= 1(0+1)
*
0
6.
Show that
(0*1*)*
=
(0+1)*.
LHS :
(0*1*)* =
{
, 0,1,00,11,0011,011,0011110……………….}
RHS : (0+1)*
=
{
, 0,1,00,11,0011,011,0011110……………….}
Hence
LHS = RHS is proved
7.
Show that
(r+s)*
r* + s*.
LHS :
(r+s)*
=
{
, r,s,rs,rr,ss,rrrsssr,……………….}
RHS : r* + s*
=
{
, r,rr,rrr………….}U {
, s,ss,sss,………….}
=
{
, r,rr,rrr,s,ss,ssss……………..}
Hence
LHS ≠ RHS is proved