GATE / CS ARCHIVE

GATE CSE 1996 / QUESTION 1.10

A regular two-block language

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

GATE 1996, Q1.10 1 mark · MCQ
Report issue

Regular Expressions & Languages

Question 1.10, GATE 1996: Which language over {a,b} is regular: (A) all words with equally many a and b symbols; (B) {a^n b^n:n≥1}; (C) all words with more a symbols than b symbols; (D) {a^m b^n:m≥1,n≥1}?
Tap to enlarge
Your answer
Answer & solution

Answer: D (no official key was published)

The displayed language has no equality or inequality coupling the two block lengths. It is described by the regular expression aa*bb*: read at least one a, then at least one b. A finite automaton only needs to remember which block it is reading and reject a later a. In contrast, requiring equal block lengths or comparing their unbounded counts generally needs more than finite memory. Thus the unrestricted positive two-block choice D is regular; the independent quantifiers m,n are crucial.

Original paper, page 2