So I'm working on a method that converts a dfa to it's complement. The complement rejects all strings the dfa accepts, and accepts all strings thee dfa rejects. To do this I am supposed to follow this algorithm: "First add an explicit dead state and make explicit all transitions to it. Second change all final states to non-final states, and all non-final states to final states."
I took a shot at this, and had no success. I don't think I understand correctly.
First I changed all the final states to non final states and non final states to final states.
Then for each state, if it didn't have a transition with an alphabet, I added a transition from that state to the explicit dead state, using those alphabets
Is this correct?