Given n placements where each placement belongs to {1,2,3,4,5,6}, how many ways can you place each number so that $n_1$ $\geq$ ... $n_k$

26 Views Asked by At

Let's say you have n spots like this

[] [] [] [] [] [] [] []

How many ways can you place the numbers {1,2,3,4,5,6} so that the condition $n_1$ $\geq$ $n_2$ ... $\geq$ $n_k$ is satisfied? Each number can be used more than once.

The first spot can start with any of the numbers. So for example, if $n_1$ is 6 then the rest of the spots has to be 6 or greater, which means they are all 6. So given the first spot is 6 then there is only 1 way to place the numbers in n spots.

1

There are 1 best solutions below

0
On

Denote the number of $1$s as $a_1$, number of $2$s as $a_2$ and so on

There are a total of $n$ spots to fill. This is equal to finding all possible solutions to the equation:

$a_1+a_2+a_3+a_4+a_5+a_6=n$

This is a stars and bars problem and we dont need to worry about the order of the numbers since all numbers are in ascending order.

The total ways are $\binom{n+5}{5}$