Given a regular expression for the set of binary strings where every 0 is…

1998

Given a regular expression for the set of binary strings where every 0 is immediately followed by exactly k 1's and preceded by atleast k 1's (k is a fixed integer).

  1. A.

    1∗1k(01k)∗+1+


  2. B.

    1+1k(01k)∗+1∗


  3. C.

    1+1k(01k)∗+1+


  4. D.

    1k(01k)∗+1∗


Attempted by 14 students.

Show answer & explanation

Correct answer: B

image.pngimage.png

Explore the full course: Gate Guidance By Sanchit Sir