Bases: sage.combinat.combinat.CombinatorialClass
Returns the number of permutations of k things from a list of n things.
EXAMPLES:
sage: from sage.combinat.permutation_nk import PermutationsNK
sage: PermutationsNK(3,2).cardinality()
6
sage: PermutationsNK(5,4).cardinality()
120
Returns a random permutation of k things from range(n).
EXAMPLES:
sage: from sage.combinat.permutation_nk import PermutationsNK
sage: PermutationsNK(3,2).random_element()
[0, 1]