# Complement of a DFA without final states

Let $$L_1=\{Q,\Sigma,q_0,\delta,Q\}$$ be a DFA that accepts a language $$L$$ and where all the states are also final states. If we want a DFA that accepts the complement of $$L$$, we swap its accepting states with its non-accepting states, that is $$\overline{L_1}=\{Q,\Sigma,q_0,\delta,Q-Q\}$$. In this case we have a DFA without final states. Is this still a DFA? Is it regular?

• What is a DFA for you? Is $\delta$ a total function? – Yuval Filmus Apr 16 '20 at 15:24
• The definition of a DFA just requires the set of final states to be a subset of the set of states. We don't require anything else. In particular, a DFA is allowed to have no accepting state, or no non-accepting state. A DFA without accepting states accepts the empty language, hence this language is regular (since a language is regular iff it is accepted by some DFA). – Yuval Filmus Apr 16 '20 at 15:26

If the DFA you are referring to is complete and has no non-accepting states, then it must be the case that it recognises $$\Sigma^*$$ so that its complement is the empty set. But I have a hunch that's not the case.
If I understood it correctly, then $$L$$ contains every possible string, because no matter what the input is, $$L_1$$ will terminate on a final state.
Since $$L_1$$ accepts every possible string, its complement should accept no strings, hence the empty language.