Number of states in DFA accepting the following language L = { aⁿ b²ᵐ | n, m ≥…
2020
Number of states in DFA accepting the following language
L = { aⁿ b²ᵐ | n, m ≥ 1 }
- A.
m
- B.
n
- C.
5
- D.
2
Attempted by 103 students.
Show answer & explanation
Correct answer: C
The language L = {an b2m | n, m >= 1} requires at least one a, followed by an even, non-zero number of b's (minimum string is abb). Constructing the minimal DFA requires: an initial state, a state tracking the first a, a state for the first b, an accepting state for the second b, and a dead state for invalid structures. Total states = 5. Thus, Option C is correct.