Skip to content
Related Articles

Related Articles

GATE | Gate IT 2008 | Question 5
  • Last Updated : 05 May, 2016

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

sudo-gate-course

My Personal Notes arrow_drop_up
Recommended Articles
Page :