FOR FREE MATERIALS

Some rules for regular expression:

 

ɸ, λ, a ∊ ∑ is a regular expression (primitive R.E)

 

r1 and r2 are regular expression then,

  

 

 

 

 

Some examples of regular expression:

 

1. L = set of all strings terminated by either a or bb

 

Regular Expression = (a + b)* (a + bb) 

 

2. L = even no. of a’s followed by odd no. of b’s

 

Regular Expression =

 

 

3. L = at least one pair of consecutive zero

 

Regular Expression = (0 + 1)*00(0 + 1)*

 

4. L = set of all strings with no pair of consecutive zero.

 

Regular Expression = (01 + 1)*(0 + λ) or (0 + λ) (10 + 1)*