Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download

Testing latest pari + WASM + node.js... and it works?! Wow.

28494 views
License: GPL3
ubuntu2004
Function: permtonum
Section: combinatorics
C-Name: permtonum
Prototype: G
Help: permtonum(x): ordinal (between 0 and n!-1) of permutation x.
Doc: given a permutation $x$ on $n$ elements, gives the number $k$ such that
 $x=\kbd{numtoperm(n,k)}$, i.e.~inverse function of \tet{numtoperm}.
 The numbering used is the standard lexicographic ordering, starting at $0$.