A DFA accepts an input string $w$ if and only if
- the computation visits every state at least once
- the input contains an even number of zeroes
- the computation halts before reading all of $w$
- computation ends in an accepting state
Show answer and solution
Correct answer: D. computation ends in an accepting state
1. A DFA's computation on input $w = w_1 w_2 \ldots w_n$:
- Start in $q_0$
- For each symbol $w_i$, transition: $q_{i} = \delta(q_{i-1}, w_i)$
- End in state $q_n$ after reading all symbols
2. ACCEPTANCE: the DFA accepts $w$ iff $q_n \in F$.
3. The LANGUAGE of $M$ is $L(M) = \{w \mid M \text{ accepts } w\}$. Languages recognised by DFAs are precisely the REGULAR LANGUAGES.
4. Options A, C, D are wrong or unrelated criteria for acceptance.
_Source: Jeff Erickson, "Models of Computation", §2.4 (Acceptance condition)._