You need to find a sequence of 3 transformations (proposed by E.Rapaport motivated by music and bell ringing in churches): **I,S,K** which will bring unsorted input vector to the sorted form (it is known to be always possible). Where **S** is **S**wap of positions 0 and 1, **I** is "**I**nterleaver" - swaping positions 0⇆1, 2⇆3,4⇆5,6⇆7, .... and **K** is its "**K**onjugate Interleaver": swaping positions 1⇆2, 3⇆4,5⇆6,7⇆8, etc.