Skip to content
Related Articles

Related Articles

Improve Article

GATE | Gate IT 2008 | Question 5

  • Last Updated : 28 Jun, 2021

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

Attention reader! Don’t stop learning now.  Practice GATE exam well before the actual exam with the subject-wise and overall quizzes available in GATE Test Series Course.

Learn all GATE CS concepts with Free Live Classes on our youtube channel.

My Personal Notes arrow_drop_up
Recommended Articles
Page :