combinat::integerVectorsOfLength – integer vectors of fixed length

combinat::integerVectorsOfLength(k) creates a combinatorial class for the integer vectors of length k.

→ Examples

Categories

Cat::GradedCombinatorialClass, Cat::FacadeDomain(combinat::integerVectors)

See Also:

combinat::integerVectors

Details:

isA – membership testing

combinat::integerVectorsOfLength::isA(object obj, <nonnegative integer n>)

Returns TRUE if obj is an integer vector of length math (and, if specified, of sum n).

list – list the integer vectors

combinat::integerVectorsOfLength::list(object obj, nonnegative integer n, <constraints>)

Returns the list of integer vectors of length math and sum n satisfying constraints.

generator – generator for integer vectors

combinat::integerVectorsOfLength::generator(object obj, nonnegative integer n, <constraints>)

Returns a generator for the integer vectors of length math and sum n satisfying constraints.

count – number of integer vectors

combinat::integerVectorsOfLength::count(object obj, nonnegative integer n, <constraints>)

Returns the number of integer vectors of length math and sum n satisfying constraints.

Example 1:

We create the combinatorial class of integer vectors of length 3:

vectors := combinat::integerVectorsOfLength(3):

 

There are math such integer vectors of sum math:

vectors::count(4)

math

Here is the list:

vectors::list(4)

math

Those vectors can be identified with the following monomials in three variables math:

    vectorToMonomial := vector -> _mult(op(zip([x,y,z], vector, _power))):

    map(vectors::list(4), vectorToMonomial)

math

Example 2:

The usual options MinPart, MaxPart, Inner, Outer, MinSlope, and MaxSlope can be used to specify further constraints on the integer vectors. Here, we use them to obtain all the monomials of degree math which are divisible by math:

    map(vectors::list(4, Inner=[2,0,1]), vectorToMonomial)

math

Changes in MuPAD 4.0

New Function.