Skip to content
Official PYQ · 1998

GATE CS 1998 Q1.10 — Regular Expressions and Finite Automata

Explain with AI

Which of the following set can be recognized by a Deterministic Finite state Automaton?

Choose one option
View worked solution

Answer: A

A language can be recognized by a Deterministic Finite Automaton (DFA) if and only if it is a regular language. Let us analyze each option:

  • Option A: The numbers 1,2,4,8,…,2n,…1, 2, 4, 8, \dots, 2^n, \dots written in binary.
    In binary, these numbers are represented as:
    1=122=1024=10028=10002⋮2n=102n\begin{align*}1 &= 1_2 \\ 2 &= 10_2 \\ 4 &= 100_2 \\ 8 &= 1000_2 \\ &\vdots \\ 2^n &= 10^n_2\end{align*}The set of these binary strings is represented by the regular expression 10∗10^*. Since it can be described by a regular expression, the language is regular and can be recognized by a DFA.
  • Option B: The numbers 1,2,4,8,…,2n,…1, 2, 4, 8, \dots, 2^n, \dots written in unary.
    In unary, a number kk is represented by a sequence of kk identical symbols (say, 11). The set of strings is:
    L={12n∣n≥0}={1,11,1111,11111111,… }L = \{1^{2^n} \mid n \ge 0\} = \{1, 11, 1111, 11111111, \dots\}Since the gap between consecutive string lengths grows exponentially, this language violates the pumping lemma for regular languages. Hence, it is not regular.
  • Option C: The set of binary strings with an equal number of zeros and ones.
    This language is L={w∈{0,1}∗∣N0(w)=N1(w)}L = \{w \in \{0,1\}^* \mid N_0(w) = N_1(w)\}. Recognizing this language requires counting and comparing the occurrences of 00s and 11s, which requires infinite memory. Hence, it is a deterministic context-free language (DCFL) but not regular.
  • Option D: The set {1,101,11011,1110111,… }\{1, 101, 11011, 1110111, \dots\}.
    This set can be written as L={1n01n∣n≥0}L = \{1^n 0 1^n \mid n \ge 0\} (where n=0n=0 gives 11, n=1n=1 gives 101101, etc.). This requires matching the number of 11s before and after the 00, which cannot be done with finite states. Thus, it is not regular.

Therefore, only the set in Option A can be recognized by a DFA.

Free practice · Your answers on this page are not saved.

Published
Report a correction
Keep exploringMore Regular Expressions and Finite Automata questions