Basic Examples (2)
Basic Examples
(2)
This permutation has 3 numbers greater than 1 before 1, 2 numbers greater than 2 before 2, and so on:
In[50]:=
p1={4,3,2,1};
Therefore, this is its inversion vector:
In[51]:=
Out[51]=
{3,2,1,0}
———
Here is another example:
In[52]:=
p2=PermutationList@RandomPermutation@12
Out[52]=
{7,9,11,1,8,10,4,12,2,5,3,6}
In[53]:=
Out[53]=
{3,7,8,5,6,6,0,2,0,1,0,0}
Scope (3)
Scope
(3)