Give a $3$-state DFA for $(01 \cup 1)^∗$
It is correct that your DFA accepts 001, which is wrong. 

Here is a strong hint. The three sets of strings accepted by the states should be the set of accepted strings, the set of accepted strings with one "0" attached at the end, the set of the strings that contains two consecutive "0"s. (From that description, you can see how to construct simple DFA by the Myhill–Nerode relation.)

In case the above hint does not ring a bell, here is the full answer, which you can reveal by hovering your mouse over it.


   Let state $S_1$ be the set of all strings having no consecutive "0"s and ending in "1". Let state $S_0$ be the set of all strings having no consecutive "0"s and ending in "0". Let state $S_{00}$ be the set of all strings having two consecutive "0"s. $S_1$ is the start state and the accepted state. Here are the transitions.

 $\quad(S_1, 0)\mapsto S_0$
 $\quad(S_1, 1)\mapsto S_1$
 $\quad(S_0, 0)\mapsto S_{00}$
 $\quad(S_0, 1)\mapsto S_1$
 $\quad(S_{00}, 0)\mapsto S_{00}$
 $\quad(S_{00}, 1)\mapsto S_{00}$ 


 It should be easy to see that the above DFA accepts the given set of strings, $(01\cup 1)^*$.