In the Toric code, there can be errors acting on the physical qubits. We take an error operator chain E that acts on the code. Given a syndrome (eigenvalues of the plaquette and vertex operators in the toric code), one uses a decoding algorithm to find out a correction operator R. Now, in order to see whether the decoding algorithm is successful or not, one has to check whether R.E belongs to the equivalence class containing the trivial identity operator or not. Because if it does, then R.E's action does not destroy the logical information and otherwise, it does. So, if we are given R.E operator chain, what is the efficient numerical algorithm to figure out which equivalence class it belongs to ?