title: Compute the minimal number of swaps to order a sequence
body: <p>I'm working on sorting an integer sequence with no identical numbers (without loss of generality, let's assume the sequence is a permutation of <code>1,2,...,n</code>) into its natural increasing order (i.e. <code>1,2,...,n</code>). I was thinking about directly swapping the elements (regardless of the positions of elements; in other words, a swap is valid for any two elements) with minimal number of swaps (the following may be a feasible solution):</p>
  
  <blockquote>
    <p>Swap two elements with the constraint that either one or both of them should be swapped into the correct position(s). Until every element is put in its correct position.</p>
  </blockquote>
  
  <p>But I don't know how to mathematically prove if the above solution is optimal. Anyone can help?</p>