Given Alphabet A.
Input: DFA (Q: States, d: Transition Function, S: Start State, F: Final States)
Output: Equivalent DFA with minimum number of states.
Method:

1. List all (unordered) pairs of states (p,q) where p is not same as q.
2. Mark each pair of which exactly one element is in F.
3. Repeat
     for each unmarked pair (r,s) do
        mark (r,s) if there exists a in A such that 
          d(r,a)=p, d(s,a)=q, and (p,q) is already marked.
4. Until (no new pairs are marked since previous iteration of repeat loop)
5. Create equivalence classes of states using:
     (p,q) unmarked iff p and q belong to same equivalence class.