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.

→ Examples

Categories

Cat::CombinatorialClass, Cat::FacadeDomain(DOM_LIST)

See Also:

combinat::chooseNK, combinat::permutationsNK, combinat::splitNK

Details:

count – number of multisets

combinat::multisetsNK::count(nonnegative integer math, nonnegative integer math)

Returns the number of multisets of k elements out of n.

generator – generator for the multisets

combinat::multisetsNK::generator(nonnegative integer math, nonnegative integer math)

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 math, nonnegative integer math)

Returns the list of all the multisets of k elements out of n, in lexicographic order.

random – random multiset

combinat::multisetsNK::random(nonnegative integer math, nonnegative integer math)

Returns a random multiset of k elements out of n.

Example 1:

Here is the list of all the multisets of 2 elements out of 5:

    combinat::multisetsNK(5,2)

math

Changes in MuPAD 4.0

New Function.