Skip to content
Related Articles
Get the best out of our app
GeeksforGeeks App
Open App
geeksforgeeks
Browser
Continue

Related Articles

GATE | GATE CS 1997 | Question 44

Improve Article
Save Article
Like Article
Improve Article
Save Article
Like Article

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

My Personal Notes arrow_drop_up
Last Updated : 12 Jan, 2021
Like Article
Save Article
Similar Reads