Mathematics, Probability, Combinatorics.
summing to |X|. For example, given the function {(1, 2), (2, 3), (3, 1), (4, 0)}, there is only one decreasing function from {1, …, 6} to {1, …, 4} that takes value 1 twice, 2 three times and 3 once: (3, 2, 2, 2, 1, 1). Conversely, given the sequence (3, 2, 2, 2, 1, 1), we can indeed