UGC-NET | UGC NET CS 2015 Jun – III | Question 20

The regular expression corresponding to the language L where
L = { x ϵ {0, 1}*|x ends with 1 and does not contain substring 00 } is:
(A) (1 + 01) * (10 + 01)
(B) (1 + 01) * 01
(C) (1 + 01) * (1 + 01)
(D) (10 + 01) * 01


Answer: (C)

Explanation: L = { x ϵ {0, 1}*|x ends with 1 and does not contain substring 00 }:

  • (1 + 01) * (10 + 01) – This expression does not follow the condition mentioned above i.e. it will contain 00 and can end with 0.
  • (1 + 01) * 01 – It will always ends with 01.
  • (1 + 01) * (1 + 01) It follows all the condition mentioned.
  • (10 + 01) * 01 – It will contain 00 as substring.
  • So, option (C) is correct.


    Quiz of this Question



    My Personal Notes arrow_drop_up


    Article Tags :

    Be the First to upvote.


    Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.