5.9.11 Inverse of a permutation: perminv
Every permutation has an inverse, which is also a permutation.
The perminv command computes the inverse of a permutation.
-
perminv takes one argument:
p, a permutation.
- perminv(p) returns the permutation that is the inverse of
p.
Example
Input:
perminv([1,2,0])
Output: