Solutions To Problem Set 2
Solutions To Problem Set 2
1 (0 1)
(1 + ). Similarly, R(L
2
) = (1 + 01)
(0 + ).
Thus, R(L) = (0+10)
(1+)(1+01)
(1+01)
(0+).
(b) The set of all binary strings such that the number of 0s in the string is divisible by 5.
Solution: Any string in the language must be composed of 0 or more blocks, each hav-
ing exactly ve 0s and an arbitrary number of 1s between them. This is given by the reg-
ular expression (1
01
01
01
01
01
01
01
01
01
01
)+
1
F be the set of all the states from which there is no such path.
Then changing the set of nal states of the DFA to F