GATE / CS ARCHIVE

GATE CSE 1998 / QUESTION 1.10

Recognizable numerical languages

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

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

Regular Expressions & Languages

Question 1.10, GATE 1998: Which is regular: powers of two written in binary, powers of two in unary, equal numbers of zeros and ones, or{1, 101, 11011, 1110111, …}?
Tap to enlarge
Your answer
Answer & solution

Answer: A (no official key was published)

Binary powers of two are exactly 10*, a regular expression, so a DFA recognizes A. Unary powers of two have gaps that keep increasing and are not ultimately periodic, as every unary regular language must be. Equal zero/one counts would yield nonregular 0n1n after intersection with 0*1*. The displayed final pattern requires matching runs of ones on either side of a zero and is likewise nonregular by pumping or distinguishable prefixes. Hence A under the evident continuation of that example list; an ellipsis itself is not a formal language definition.

Original paper, page 1