Regular expression
Operations on Regular LanguageThe various operations on regular language are: Union: If L and M are two regular languages then their union L U M is also a union. Intersection: If L and M are two regular languages then their intersection is also an intersection. Kleene closure: If L is a regular language then its kleene closure L1* will also be a regular language. ExampleWrite the regular expression for the language:
L = {abn w:n ≥ 3, w ∈ (a,b)+}
Solution:The string of language L starts with "a" followed by atleast three b's. Itcontains atleast one "a" or one "b" that is string are like abbba, abbbbbba, abbbbbbbb, abbbb.....a So regular expression is:
r= ab3b* (a+b)+
Here + is a positive closure i.e. (a+b)+ = (a+b)* - ∈
Next TopicOptimization of DFA
|