## 1. Find the regular expression for the set of strings with either no ‘1’ preceding a ‘0’ or no ‘0’ preceding a ‘1’, over {0, 1}.

**Solution:**

We have the input alphabets ∑ = {0, 1}

Here, the resultant regular expression will denotes the set of strings in which either no 1 preceding a 0, i.e. the languge {λ, 10, 1100, 111000, 11110000, . . . . .}.

0* 1* (1)

The regular expression which denote the set of strings in which no 1’s preceding a 0’s i.e., the language { λ, 01, 0011, 000111, 0000111, .. … .. ..} can be written as-

1*0* (2)

Thus, from regular expression (1) and (2), we can write the resultant regular expression as-

0* 1* + 1* 0*

**You can also Read:** Regular expression examples in theory of automata Part – 3

sir plz snd me regular expression examples and exercies