300 views
3 3 votes
Which of the following languages can be recognized by a Deterministic Finite Automaton?

A. The set of binary strings representing odd integers greater than 1 .

B. The language $L=\left\{a^{n} b^{2 n} \mid n \geq 0\right\}$.

C. The set of unary strings where the length is a prime number.

D. The language of palindromic binary strings (strings that read the same forwards and backwards).

1 Answer

0 0 votes
B. The language $L=\left\{a^{n} b^{2 n} \mid n \geq 0\right\}$. This is a non-regular, context-free language. A DFA does not have the memory (like a stack) required to count the number of 'a's and ensure the number of 'b's is exactly double that count for an arbitrarily large $n$.

C. The set of unary strings where the length is a prime number. This is not a regular language. The gaps between prime numbers are not regular, and a machine with a finite number of states cannot determine if an arbitrarily large number is prime. This can be formally proven using the Pumping Lemma for regular languages.

D. The language of palindromic binary strings. This is another classic example of a nonregular, context-free language. To check if a string is a palindrome, a machine needs to remember the first half of the string to compare it with the second half. A DFA has finite memory and cannot do this for strings of arbitrary length.

Only A is correct
Answer:
Position:
Show:

Related questions

3 3 votes
1 1 answer
347
347 views
GO Classes asked Oct 16, 2025
347 views
Consider the following context-free grammar $G$ over the set of terminals $\{i d,+, *,()$,$\} , with E$ as the start symbol:1. $E \rightarrow E+E$2. $E \rightarrow E * E$...
3 3 votes
2 2 answers
448
448 views
GO Classes asked Oct 16, 2025
448 views
In a pushdown automaton $P=\left(Q, \Sigma, \Gamma, \delta, q_{0}, F\right)$, a transition of the form,$$p \xrightarrow{a, X \rightarrow Y} q$$where $p, q \in Q, a \in \S...
1 1 vote
1 1 answer
287
287 views
GO Classes asked Oct 16, 2025
287 views
Consider the transition diagram of a PDA given below with input alphabet $\Sigma=\{a, b, c\}$ and stack alphabet $\Gamma=\{X, Z\}$, where $Z$ is the initial stack symbol....
1 1 vote
1 1 answer
318
318 views
GO Classes asked Oct 16, 2025
318 views
The following finite state machine processes a binary number fed into it from the most significant bit (MSB) to the least significant bit (LSB). For each input bit, it pr...