How to minimize this DFA using given algorithm?
The difficulty with the problem is, as Dean Gurvitz hinted and as you have experienced, not all transitions are specified explicitly. For example, given input 3 at state 0, what is the transition? According to the definition of DFA, every transition for any input symbol at any state must be specified.

You will ask then, why do I see such a graph for a DFA? What you see is a DFA specified as an incomplete DFA.


  some authors use deterministic finite automaton for a slightly different notion: an automaton that defines at most one transition for each state and each input symbol; the transition function is allowed to be partial. When no transition is defined, such an automaton halts.


To apply your procedure to minimize a DFA, you have to convert an incomplete DFA to a (complete) DFA. Add another state $R$, the rejected state. Whenever a transition from some state given some symbol is not specified, add a transition from that state given that symbol that goes to $R$. In particular, all transitions that start from $R$ go to $R$. Now that a (complete) DFA if formed, you can compute merrily with your procedure, treating $R$ just as any other non-final state. Once you are done with your procedure, you will have a (complete) DFA with minimal states. If preferred or necessary, you can convert the minimal (complete) DFA to an incomplete DFA by removing the (new) rejected state, i.e., the state that comes from $R$, and all transitions from or to that state.