FindPermutation

FindPermutation[expr]
gives a permutation that produces expr by permuting Sort[expr].

FindPermutation[expr1,expr2]
gives a permutation that converts to for two expressions that differ only in the order of their arguments.

DetailsDetails

  • The permutation is returned with head Cycles, in disjoint cyclic form.
  • If the arguments of are different, the permutation returned is uniquely defined.
  • FindPermutation[expr2,expr1] gives the inverse permutation of FindPermutation[expr1,expr2].
Introduced in 2010
(8.0)