Skip to content
Related Articles

Related Articles

Improve Article
GATE | GATE CS 1997 | Question 44
  • Difficulty Level : Basic
  • Last Updated : 12 Jan, 2021

Which one of the following regular expressions over {0,1} denotes the set of all strings not containing 100 as a substring?

(A) 0* (1+0)*
(B) 0*1010*
(C) 0*1*01*
(D) 0*(10+1)*


Answer: (D)

Explanation: According to given question, it should generate all other string / substring, but in given options :

  • (A) generates 100
  • (B) doesn’t generate 0
  • (C) doesn’t generate 1

Only option (D) is correct.

Quiz of this Question

Attention reader! Don’t stop learning now. Learn all GATE CS concepts with Free Live Classes on our youtube channel.

My Personal Notes arrow_drop_up
Recommended Articles
Page :