In Ullman's Introduction to Automata, Languages and Computation (1979):
We formally denote a finite automaton by a 5-tuple $(Q, \Sigma, \delta, q_0, F)$, where $Q$ is a finite set of states, $\Sigma$ is a finite input alphabet, $Q_0$ in $Q$ is the initial state, $F \subseteq Q$ is the set of final states, and $\delta$ is the transition function mapping $Q \times \Sigma$ to $Q$. That is, $\delta(q, a)$ is a state for each state $q$ and input symbol $a$.
A Moore machine is a six-tuple $(Q, \Sigma, \Delta, \delta, \lambda, q_o)$, where $Q$, $\Sigma$, $\delta$ and $q_0$ are as in the DFA. $\Delta$ is the output alphabet and $\lambda$ is a mapping from $Q$ to $\Delta$ giving the output associated with each state.
A Mealy machine is also a six-tuple $M = (Q, \Sigma, \Delta, \delta, \lambda, q_o)$, where all is as in the Moore machine, except that $\lambda$ maps $Q \times \Sigma$ to $\Delta$. That is, $\lambda(q, a)$ gives the output associated with the transition from state $q$ on input $a$.
Why do both Moore machines and Mealy machines not have a set of final states, like $F$ in a DFA?
Do DFA's with outputs in general not have a set of final states?
Without a set of final states, how do they decide whether to accept an input string?
Thanks.
Moore and Mealy machines do not exhaust the possible definitions of "finite state machines with outputs". For a more general machine (not necessarily deterministic), see, for example, Finite-state Transducers (FSTs), which usually are defined with final states. But it doesn't really add any additional power to a transducer; you could just as well mark an accepted parse by producing a special "Success!" output symbol at the end of the parse, assuming you had augmented the input with a special "end-of-input" input symbol.
Moore and Mealy machines are intended to model computations which don't have a fixed termination; as long as they continue receiving input, they continue producing output (one output symbol per input symbol). That models a different type of computation than the DFA recogniser (although there are clear relationships). Since the machine cannot "take back" an output symbol already produced, every input -- whether "accepted" or not -- must produce some output. So if you wanted to model a recognizer, you could limit the output alphabet to $0$ and $1$, and define a (finite) input as being "accepted" by the machine if the last symbol output with that input is a $1$.