GATE / CS ARCHIVE

GATE CSE 1998 / QUESTION 1.9

Equivalent regular-expression groupings

Theory of Computation · Regular Expressions & Languages · Full GATE CSE 1998 paper

GATE 1998, Q1.9 1 mark · MCQ
Report issue

Regular Expressions & Languages

Question 1.9, GATE 1998: Compare A=(01+1)* and B=((01)*1*)*: proper inclusion, equality, or incomparable?
Tap to enlarge
Your answer
Answer & solution

Answer: D: equality (no official key was published)

Every block in B is a sequence of 01 blocks followed by a sequence of 1 symbols, all of which are permitted individual blocks of A. Thus B⊆A. Conversely B can produce an individual 01 by selecting one occurrence in (01)* and none in 1*, and can produce an individual 1 by the reverse choice. Its outer star concatenates any sequence of these, so A⊆B. Both include the empty string. Therefore A=B, D.

Original paper, page 1