2

In how many ways a Table with $N$ rows and $M$ columns can be created so that sum of elements in $i$th row is greater or equal to the sum of elements in $(i-1)$th row for $ 2 \le i\le N$ and sum of elements in $N$th row is less or equal to $M$. Each cell of the table contains a non-negative integer.

Example for testing purpose :

for $N=2$ and $M=2$ value is $25$

for $N=2$ and $M=3$ value is $273$

1 Answers1

0

I don't have a closed-form solution but instead a formula for it. I hope it's of some value.

A building block towards the answer is counting the number of solutions to an equation of the following form for any $0\leq k\leq M$

$$x_1 + x_2 + \cdots + x_M = k.$$

where the $x_i$ are non-negative and represent the entries in any given row. By the "stars and bars" method, the number of solutions is $\binom{M+k-1}{k}$. So we need to sum over all combinations of $k$ values for each row where such $k$ values are non-decreasing in going from row $1$ to $N$.

Thus, the formula is:

$$T_{N,M} = \sum_{j_1=0}^{M} \binom{M+j_1-1}{j_1} \sum_{j_2=j_1}^{M} \binom{M+j_2-1}{j_2} \cdots \sum_{j_N=j_{N-1}}^{M} \binom{M+j_N-1}{j_N}.$$

Each index $j_i$ represents the sum of entries for the $i^{th}$ row.

For example, with $N=2,M=2$, we have

\begin{eqnarray*} T_{2,2} &=& \binom{1}{0}\left[\binom{1}{0} + \binom{2}{1} + \binom{3}{2} \right] + \binom{2}{1}\left[\binom{2}{1} + \binom{3}{2} \right] + \binom{3}{2}\left[\binom{3}{2} \right] \\ &=& 25. \end{eqnarray*}

Mick A
  • 10,208