2. Construct a regular expressing for all the strings in {0, 1}* with next-to-last symbol 0.
Solution:
We have the input alphabets ∑* = {0, 1}*
∴∑ = {0, 1}
Here, the resultant regular expression will denotes all the strings over the given ∑ can be any of the following form-
00, 01, 10, and 11
The requirement of the question is that the next-to-last symbol must be 0, thus, only the following last two symbols can be used for construction of resultant regular expression-
00 and 01
Also, the regular expression for any string at all over the given ∑ can be written as-
(0 + 1)*
Thus, the resultant regular expression can be written as-
(0 + 1)*(00 + 01)








