15. Find a regular expression for
L = {w∈{0,1}* : w has exactly one pair of consecutive zeros}
16. Give regular expressions for the following languages on Σ = {a, b, c}.
(a) all strings containing exactly one a,
(b) all strings containing no more than three a’s,
(c) all strings that contain at least one occurrence of each symbol in Σ,
(d) all strings that contain no run of a's of length greater than two,
* (e) all strings in which all runs of a's have lengths that are multiples of three.
17. Write regular expressions for the following languages on {0, 1}.
(a) all strings ending in 01,
(b) all strings not ending in 01,
(c) all strings containing an even number of 0’s,
(d) all strings having at least two occurrences of the substring 00. (Note
that with the usual interpretation of a substring, 000 contains two such
occurrences),
(e) all strings with at most two occurrences of the substring 00,
*(f) all strings not containing the substring 101.
18. Find regular expressions for the following languages on {a, b}.
(a) L = {w : |w| mod 3 = 0}.
(b) L = {w : n a (w)mod 3 = 0}.
(c) L = {w : n a (w)mod 5 > 0}.
19. Repeat parts (a), (b), and (c) of Exercise 18, with Σ = { a, b, c}.
20. Determine whether or not the following claims are true for all regular
expressions r 1 and r 2 . The symbol ≡ stands for equivalence of regular
expressions in the sense that both expressions denote the same language.
Précédent

- 104/532

Suivant