next | previous | forward | backward | up | top | index | toc | Macaulay2 website
LinearTruncations > diagonalMultidegrees

diagonalMultidegrees -- t-tuples of non-negative integers with sum equal to d

Synopsis

Description

Given numbers d and t, this function gives all lists of t non-negative integers where the sum of each list is equal to d. If the second input is a list L, the tuples have the same length as L and are constrained to have i-th entry at most 1+L_i.

i1 : t = 2

o1 = 2
i2 : d = 5

o2 = 5
i3 : diagonalMultidegrees(d,t)

o3 = {{0, 5}, {1, 4}, {2, 3}, {3, 2}, {4, 1}, {5, 0}}

o3 : List
i4 : diagonalMultidegrees(d, {0,1,2})

o4 = {{0, 2, 3}, {1, 1, 3}, {1, 2, 2}}

o4 : List

See also

Ways to use diagonalMultidegrees :

For the programmer

The object diagonalMultidegrees is a method function.