Which of the following set can be recognized by a Deterministic Finite state Automaton?
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 written in binary.
In binary, these numbers are represented as:
The set of these binary strings is represented by the regular expression . Since it can be described by a regular expression, the language is regular and can be recognized by a DFA. - Option B: The numbers written in unary.
In unary, a number is represented by a sequence of identical symbols (say, ). The set of strings is:
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 . Recognizing this language requires counting and comparing the occurrences of s and s, which requires infinite memory. Hence, it is a deterministic context-free language (DCFL) but not regular. - Option D: The set .
This set can be written as (where gives , gives , etc.). This requires matching the number of s before and after the , 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.
