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

## Synopsis

• Usage:
diagonalMultidegrees(d,t)
diagonalMultidegrees(d,L)
• Inputs:
• d, an integer, the (non-negative) sum of the tuples
• t, an integer, the length of the tuples
• L, a list, the maximum value for each coordinate
• Outputs:
• a list, containing lists of t integers each

## 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

• basis(ZZ,Module) -- basis or generating set of all or part of a ring, ideal or module

## Ways to use diagonalMultidegrees :

• "diagonalMultidegrees(ZZ,List)"
• "diagonalMultidegrees(ZZ,ZZ)"

## For the programmer

The object diagonalMultidegrees is .