
The above DFA accepts the set of all strings over that
View worked solution
Answer: C
Let the states of the given DFA be (start state), , and (accepting state). The transitions are as follows:
- From : on input it loops to , and on it transitions to .
- From : on input it goes back to , and on it transitions to the accepting state .
- From : on input it loops to , and on it goes back to .
Let us analyze the behavior of this DFA:
- State : Represents the state where the string processed so far does not end with .
- State : Represents the state where the string processed so far ends with a single (i.e., suffix is but not ).
- State (Accepting): Represents the state where the string processed so far ends with at least two s (i.e., suffix is ).
Whenever a is encountered, the suffix condition is broken, and the DFA resets to . Thus, the DFA reaches the accepting state if and only if the string ends with .
Eliminating other options:
- Option A: The string begins with but is not accepted (ends in ).
- Option B: The string ends with but is not accepted.
- Option D: The string contains the substring , but processing it leads to (non-accepting), so it is rejected.
Therefore, the DFA accepts the set of all strings that end with .
Free practice · Your answers on this page are not saved.
