EDIT: I\'m not sure that my original question is clear enough. I need an algorithm that will compute the minimal sequence of moves to rearrange an array from one ord
Knuth Volume 3 has a section on "sorting networks". He doesn't go into a lot of detail about how to construct minimum comparison networks, but does cite some work (e.g., by Batcher and himself) about how to construct them. Note that while these are notes as "minimum comparison networks", few (if any) of them has really been proven to be minimal -- they're attempts at minimizing the number of comparators needed, but not necessarily successful in terms of actually achieving the true minimum.