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.

View worked solution
Answer: C
The given DFA accepts the set of all strings over that end with the pattern . We can verify this by analyzing the states and their corresponding tracking behavior:
- State (Start State): Represents the state where the string processed so far does not end with any prefix of (i.e., it ends with or is empty).
- State : Represents that the string processed so far ends with the prefix .
- State : Represents that the string processed so far ends with the prefix .
- State (Accepting State): Represents that the string processed so far ends with the pattern .
Let us trace the transitions from the accepting state to see how it maintains this property:
- If we receive an at (string ends in ), the suffix matching the pattern becomes , so we transition to .
- If we receive a at (string ends in ), the suffix matching the pattern becomes , so we transition to .
Since is the only final state, the DFA accepts a string if and only if it ends with the pattern .
Free practice · Your answers on this page are not saved.
