GATE / CS ARCHIVE

GATE CSE 1995 / QUESTION 2.24

Union with the universal binary language

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

GATE 1995, Q2.24 2 marks · MCQ
Report issue

Regular Expressions & Languages

Question 2.24, GATE 1995: Let Σ={0,1}, L=Σ*, R={0^n1^n:n>0}. Classify L∪R and R as regular or nonregular.
Tap to enlarge
Your answer
Answer & solution

Answer: C: regular,nonregular (no official key was published)

Every member of R is a binary word, so R⊆Σ*=L. Hence L∪R=L, which is regular. R itself is nonregular: if its pumping length were p, the word 0p1p would have a pumpable nonempty segment entirely among its first p zeros. Pumping that segment changes the number of zeros but not ones, leaving R and contradicting the lemma. Thus adjoining R to a universal regular language does not make the union nonregular.

Original paper, page 5