gives a permutation that produces expr by permuting Sort[expr].
gives a permutation that converts expr1 to expr2 for two expressions that differ only in the order of their arguments.
- The permutation is returned with head Cycles, in disjoint cyclic form.
- If the arguments of expr1 are different, the permutation returned is uniquely defined.
- FindPermutation[expr2,expr1] gives the inverse permutation of FindPermutation[expr1,expr2].
Examplesopen allclose all
Basic Examples (1)
Permutation relating two expressions with the same elements:
Verify the result using Permute:
For expressions containing repeated parts, the permutation is not uniquely defined. FindPermutation only returns one of them:
However, this other permutation also relates those two expressions:
Properties & Relations (1)
Relation with Ordering:
Wolfram Research (2010), FindPermutation, Wolfram Language function, https://reference.wolfram.com/language/ref/FindPermutation.html.
Wolfram Language. 2010. "FindPermutation." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/FindPermutation.html.
Wolfram Language. (2010). FindPermutation. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/FindPermutation.html