Right Inversion To Permutation - Maple Help

Iterator[Inversion]

 RightInversionToPermutation
 convert right inversion table to permutation

 Calling Sequence RightInversionToPermutation(c)

Parameters

 c - {list,rtable}; right inversion table

Description

 • RightInversionToPermutation constructs the permutation, $a$, of integers 1 to $n$ corresponding to the inversion table c, where ${c}_{j}$ is the number of elements to the right of $j$ in $a$ that are less than $j$.
 • The c parameter is a right inversion table; it may be a list or one-dimensional rtable indexed from one, with $0\le {c}_{j}\le j-1$
 • The output is an Array indexed from 1 to $n$ that contains a permutation of the integers from 1 to $n$.

Examples

 > $\mathrm{with}\left(\mathrm{Iterator}:-\mathrm{Inversion}\right):$
 > $c≔\left[0,0,1,2\right]$
 ${c}{≔}\left[{0}{,}{0}{,}{1}{,}{2}\right]$ (1)
 > $a≔\mathrm{RightInversionToPermutation}\left(c\right)$
 ${a}{≔}\left[\begin{array}{cccc}{1}& {4}& {3}& {2}\end{array}\right]$ (2)
 > $\mathrm{PermutationToRightInversion}\left(a\right)$
 $\left[\begin{array}{cccc}{0}& {0}& {1}& {2}\end{array}\right]$ (3)

Compatibility

 • The Iterator[Inversion][RightInversionToPermutation] command was introduced in Maple 2016.
 • For more information on Maple 2016 changes, see Updates in Maple 2016.