Which one of the following languages over the alphabet {0,1} is described by the regular expression
(0+1)* 0 (0+1)* 0 (0+1)* ?
a.The set of all strings that begin and end with either 0 or 1
b.The set of all strings containing at most two zeros
c.The set of all strings containing at least two zeros.
d.The set of all strings containing the substring 00
Option C is correct because in the given regular expression (0+1)* 0(0+1)* 0 (0+1)* the underlined two zeros will definitely be written.
Option A is incorrect because the given regular expression cannot
yield 01 which is essential to satisfy option A.
Option B is incorrect because the given expression can generate 000
which rules out the possibility of B being correct.
Option D is incorrect because the given expression can also produce
11010 which does not include the substring 00.
Get Answers For Free
Most questions answered within 1 hours.