Handout-10 - A - Properties of RL
Handout-10 - A - Properties of RL
Properties
Regular Languages
• A language that can be defined by a
regular expression is called a regular
language.
• Closure Properties
• Decision Properties
• The language that cannot be defined by
a regular expression are nonregular
languages e.g. PALINDROME, PRIME
Closure Properties of Regular
Languages
• If certain languages are regular, and a language L
is formed from the application of some special
operations, then L is also regular.
• Principal Closure Properties
– Union of two regular languages is regular
– Complement of a regular language is regular
– Intersection of two regular languages is regular
– Closure of a regular language is regular
– Product / Concatenation of regular languages is
regular
Closure Properties
of Regular Languages (Union)
• If L and M are regular languages over alphabet
-
Λ Λ
- -
TG1 TG2
+ +
Another Method
• Example
• We will consider two FA’s
• Then Construct the FA for the
Union of These FA’s
Closure Properties of Regular
Languages (Complement)
a b a,b a b a,b
-
- + + +
+
a a
b b
a,b a,b
+
a,b a,b
Closure Properties of Regular
Languages (Intersection)
a a,b b a b
b a
-
- +
+
b FA1 FA2 a
Closure Properties of Regular
Languages (Intersection)
• Complements of FAs
a a,b b a b
b a
x1-
+ x3 y1- y2+
+
b FA1’ FA2’ a
Join the machines to get FA3 = FA1’ + FA2’ which defines the
language (L1’ + L2’)
Reverse the final status of each state of FA3 to get (FA1’+FA2’)’
that defines L1 ∩ L2
Apply the TG to RE conversion over FA3 to get r3 that defines the
intersection of both languages
Closure Properties of Regular
Languages (Intersection)
• Second Method of Intersection
a a,b b a b
b a
y1-
x1- x2 x3+ y2
+
b FA1 FA2 a
Λ TG1 Λ
+
Closure Properties of Regular
Languages (Concatenation)
Λ
- TG1 1 2 TG2 +