Open In App

GATE | Gate IT 2008 | Question 5

Like Article
Like
Save
Share
Report

Which of the following regular expressions describes the language over {0, 1} consisting of strings that contain exactly two 1’s?
(A) (0 + 1) * 11(0 + 1) *
(B) 0 * 110 *
(C) 0 * 10 * 10 *
(D) (0 + 1) * 1(0 + 1) * 1 (0 + 1) *


Answer: (C)

Explanation: By looking at option A and D clearly not feasible solution.
Between B and C both contains exactly two 1’s but in option B, both 1 will always come together where as in C it is general string.

Quiz of this Question


Last Updated : 28 Jun, 2021
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads