FindPermutation
FindPermutation[expr]
gives a permutation that produces expr by permuting Sort[expr].
FindPermutation[expr1,expr2]
gives a permutation that converts expr1 to expr2 for two expressions that differ only in the order of their arguments.
Details
- 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].
Examples
open allclose allBasic Examples (1)
Permutation relating two expressions with the same elements:
Verify the result using Permute:
Scope (1)
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:
Text
Wolfram Research (2010), FindPermutation, Wolfram Language function, https://reference.wolfram.com/language/ref/FindPermutation.html.
CMS
Wolfram Language. 2010. "FindPermutation." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/FindPermutation.html.
APA
Wolfram Language. (2010). FindPermutation. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/FindPermutation.html