235 views
4 4 votes

Which of the following is the correct description of language recognized by the DFA below?

  1. Binary strings not divisible by $4$
     
  2. Binary strings divisible by $4$
     
  3. Binary strings representing odd numbers
     
  4. Binary strings having odd number of $0$s

3 Answers

1 1 vote

The states in the given DFA correspond to the following conditions:

  • $q_0 :$ Remainder $0$ on division by $4$
  • $q_1 :$ Remainder $1$ on division by $4$
  • $q_2 :$ Remainder $2$ on division by $4$
  • $q_3 :$ Remainder $3$ on division by $4$

Since $q_1$ and $q_3$ are the final states, it means the DFA accepts all binary strings which have remainder $1$ or $3$, i.e. all binary strings which are odd.

The correct answer is C.

0 0 votes
for strings of length $\lt 2$:
$q_0$ is reached by $\varepsilon, 0$
$q_1$ is reached by $1$

for strings of length $\ge 2$:
$q_0$ is reached by strings ending with $00$
$q_1$ is reached by strings ending with $01$
$q_2$ is reached by strings ending with $10$
$q_3$ is reached by strings ending with $11$

for final accepting state being $q_1 \text{and}\ q_3$, we have all strings that end with $1$.

Thus the DFA accepts only and all Binary strings representing odd numbers.

Answer: C
• edited by
Answer:
Position:
Show:

Related questions

3 3 votes
3 3 answers
274
274 views
4 4 votes
3 3 answers
254
254 views
GO Classes asked Jul 4
254 views
Which state in the following DFA should be made the initial state to make it accept the language $L = \{w \in \{0,1\}^* \mid w$ has even number of $1$s and odd number of ...
3 3 votes
3 3 answers
225
225 views
GO Classes asked Jul 4
225 views
The node $q_2$ is best defined as $\dots$ $\dots$Final state Dead state Both final and dead state Neither final nor dead state
5 5 votes
4 4 answers
242
242 views
GO Classes asked Jul 4
242 views
Which of the following states would be notated as the final state/acceptance state for $L = \{x \in \Sigma^* : \text{length of } x \text{ is } 2\},\ \Sigma = \{a,b\}$?$q...