Non-Negative Integer Solutions with Upper Restrictions

Rarely Tested

Non-Negative Integer Solutions with Upper Restrictions

## Formula

For:

$$x_1+x_2+\cdots+x_n=r$$

with:

$$0\le x_i\le m$$

the number of solutions can be found using inclusion-exclusion:

$$\sum_{k=0}^{\lfloor r/(m+1)\rfloor}(-1)^k{}^nC_k{}^{r-k(m+1)+n-1}C_{n-1}$$

## Usage

- Used when identical objects are distributed with a maximum limit on each recipient.

No related questions available for this formula yet.

Go back to topics

Join CAT 2026 course by 5-Time CAT 100%iler

Start your IIM journey with the right preparation and crack CAT 2026.