Skip to content
Official PYQ · 1998

GATE CS 1998 Q1.12 — Regular Expressions and Finite Automata

Explain with AI

The string 11011101 does not belong to the set represented by

Select all correct options
View worked solution

Answer: C;D

To find which regular expressions do not represent the string 11011101, we test the string against each option:

  1. 110∗(0+1)110^*(0 + 1)

    We can match 11011101 by choosing:

    • 1111 from the prefix
    • 01=00^1 = 0 from 0∗0^*
    • 11 from (0+1)(0 + 1)

    This yields 11⋅0⋅1=110111 \cdot 0 \cdot 1 = 1101. Thus, 11011101 belongs to this set.

  2. 1(0+1)∗1011(0 + 1)^*101

    We can match 11011101 by choosing:

    • 11 from the prefix
    • ϵ\epsilon (empty string) from (0+1)∗(0 + 1)^*
    • 101101 from the suffix

    This yields 1⋅ϵ⋅101=11011 \cdot \epsilon \cdot 101 = 1101. Thus, 11011101 belongs to this set.

  3. (10)∗(01)∗(00+11)∗(10)^*(01)^*(00 + 11)^*

    Let's attempt to match 11011101:

    • Since 11011101 starts with 1111, and (10)∗(10)^* can only generate strings starting with 1010 (or ϵ\epsilon), we must choose ϵ\epsilon from (10)∗(10)^*.
    • Now we must match 11011101 with (01)∗(00+11)∗(01)^*(00 + 11)^*. Since (01)∗(01)^* can only generate strings starting with 00 (or ϵ\epsilon), we must choose ϵ\epsilon from (01)∗(01)^*.
    • This leaves (00+11)∗(00 + 11)^* to match 11011101. We can match the first two characters 1111 using the 1111 block, leaving 0101. However, (00+11)∗(00 + 11)^* cannot generate 0101.

    Thus, 11011101 does not belong to this set.

  4. (00+(11)∗0)∗(00 + (11)^*0)^*

    Observe the terms inside the outer Kleene star:

    • 0000 ends with 00.
    • (11)∗0(11)^*0 ends with 00.

    Since both constituent blocks end with 00, any non-empty string generated by this regular expression must end with 00. Since 11011101 ends with 11, it cannot be generated.

    Thus, 11011101 does not belong to this set.

Therefore, the string 11011101 does not belong to the sets represented by C and D.

Free practice · Your answers on this page are not saved.

Published
Report a correction
Keep exploringMore Regular Expressions and Finite Automata questions