combinat::multisetsNK – Low level combinatorial class for the multisets of k elements out of n
combinat::multisetsNK is a low level combinatorial class for the multisets of k elements out of n.
Categories
Cat::CombinatorialClass, Cat::FacadeDomain(DOM_LIST)
See Also:
combinat::chooseNK, combinat::permutationsNK, combinat::splitNK
Details:
A multiset of k elements out of n is a sorted list of k elements of [1,...,n], with repetitions allowed.
This is a fast low-level combinatorial class, with a simplistic interface by design.
count – number of multisets
combinat::multisetsNK::count(nonnegative integer , nonnegative integer )
Returns the number of multisets of k elements out of n.
generator – generator for the multisets
combinat::multisetsNK::generator(nonnegative integer , nonnegative integer )
Returns a generator for the multisets of k elements out of n, in lexicographic order.
list – list of the multisets
combinat::multisetsNK::list(nonnegative integer , nonnegative integer )
Returns the list of all the multisets of k elements out of n, in lexicographic order.
random – random multiset
combinat::multisetsNK::random(nonnegative integer , nonnegative integer )
Returns a random multiset of k elements out of n.
Here is the list of all the multisets of 2 elements out of 5:
combinat::multisetsNK(5,2)
Changes in MuPAD 4.0
New Function.