How to determine a kind of distance between two permutations? Let's define a distance between two permutation of length $N$: it is the minimum steps to change one to be another. "A step of change" means that exchanging any two elements' location. 
For example, series $\{1,2,3\}$ can be changed into $\{2,1,3\}$ in one step, by exchanging the location of $1$ and $2$. So it means 
$$\text{d}(\{1,2,3\},\{2,1,3\}) = 1$$
$\text{d}$ means distance. So, we can easily get that $\text{d}(\{1,2,3\},\{3,1,2\})$ is $2$ and so on.
But while $N$ is big enough, how can I get the distance between two arbitrary series?
 A: Instead of "series" the mathematical term in this case is a permutation. Mathematically speaking you want to determine the following: For two permutations $\pi$, $\tau$ you want to find the minimal number $n$ of transpositions $\sigma_i$ so that 
$$\pi = \sigma_1 \circ \ldots \circ \sigma_n \circ \tau.$$
Equivalently one might ask for the minimal $n$ for which 
$$\pi \tau^{-1} = \sigma_1 \circ \ldots \circ \sigma_n.$$
Now you can decompose the permutation $\pi \tau^{-1}$ into disjoint cycles. I don't have a rigorous proof, but $n$ should be the sum of the lengths of all cycles, minus the number of cycles [or equivalently: sum up all the cycle-lengths after substracting $1$ from every length].
Edit: If the permutation consists of $k$ elements, then this number is actually the difference between $k$ and the number of cycles in the cycle-representation of the permutation. Now observe that with a transposition you can only increase or decrease this number by $1$ and that the identity is the only permutation with $k$ cycles. This should yield a rigorous proof of my statement.
A: Finding the transposition distance is an NP-hard problem.
This is proved in this paper:

Laurent Bulteau, Guillaume Fertin, and Irena Rusu
  Sorting by Transpositions is Difficult
SIAM J. Discrete Math., 26(3), 1148–1180 (2012).
  DOI: 10.1137/110851390,
  arXiv:1011.1157.

NP-hard means that most probably only approximation algorithms can be efficient for large $N$. See this paper for instance:

Ulisses Dias, Zanon Dias
  Heuristics for the transposition distance problem
Journal of Bioinformatics and Computational Biology, 11(5), 1350013 (2013).
  DOI: 10.1142/S0219720013500133.

