Consider the following deterministic finite automaton (DFA) defined over theโฆ
2025
Consider the following deterministic finite automaton (DFA) defined over the alphabet, \(ฮฃ = \{๐, ๐\}\). Identify which of the following language(s) is/are accepted by the given DFA.

Answer: C. The set of all strings ending with the pattern \(๐๐๐\). โ Final answer: The DFA accepts exactly the set of all strings that contain an even number of b's. Reasoning: the automaton effectively tracks the parity of theโฆ
- A.
The set of all strings containing an even number of
\(๐\)โs. - B.
The set of all strings containing the pattern
\(๐๐๐\). - C.
The set of all strings ending with the pattern
\(๐๐๐\). - D.
The set of all strings not containing the pattern
\(๐๐๐\).
Attempted by 53 students.
Show answer & explanation
Correct answer: C
Final answer: The DFA accepts exactly the set of all strings that contain an even number of b's.
Reasoning: the automaton effectively tracks the parity of the number of b's seen so far.
Start/accepting state = even number of b's observed so far (including zero).
Reading an a does not change parity: transitions on a stay within the same parity class, so a's do not affect acceptance.
Reading a b toggles parity: each b moves the machine between the even and odd parity states. Therefore acceptance depends solely on whether the total number of b's is even.
Examples (to build intuition):
Accepted: the empty string (0 b's), "aa" (0 b's), "bb" (2 b's), "abaabb" (2 b's).
Rejected: "b" (1 b), "ab" (1 b), "bba" (1 b), "bbab" (3 b's).
Why the other described languages do not match the DFA:
The property "contains the substring 'bab'": not equivalent. Counterexample: "bbab" contains 'bab' but has three b's and is rejected.
The property "ends with 'bab'": not equivalent. Counterexample: "bbab" ends with 'bab' but is rejected since it has an odd number of b's.
The property "does not contain 'aba'": not equivalent. Counterexample: "b" does not contain 'aba' but is rejected because it has an odd number of b's.
Conclusion: The DFA accepts exactly those strings over {a, b} whose total number of b's is even.
A video solution is available for this question โ log in and enroll to watch it.