Practice free →
HomeGATE CSEcomputerscienceTheory of Computation › The REGULAR EXPRESSION $(0 + 1)^* 0$ describes t…

The REGULAR EXPRESSION $(0 + 1)^* 0$ describes the language of all strings over $\{0, 1\}$

Astarting with $0$
Bending with $0$
Ccontaining the substring $00$
Dof even length
Answer & Solution
Correct answer: B. ending with $0$
1. Parse the regex $(0 + 1)^* 0$: - $(0 + 1)^*$: any sequence (possibly empty) of 0's and 1's — i.e., any string in $\{0,1\}^*$. - Then the symbol $0$ — must end with a 0. 2. So the language is $\{w \cdot 0 \mid w \in \{0,1\}^*\}$ — every string ending in 0. 3. Examples: '0', '10', '110', '00', '1110' are in $L$. '1' and '01' (wait — 01 DOES end in 1, NOT in 0, so 01 is NOT in $L$). 4. Option A would be $0(0+1)^*$. Option C would be $(0+1)^* 00 (0+1)^*$. Option D would be $((0+1)(0+1))^*$. _Source: Jeff Erickson, "Models of Computation", §2.3 (Regular Expressions)._
Solve this in the app — GATE CSE practice & 24k+ MCQs →
Related questions