Calculating no. of solutions within some bounds

48 Views Asked by At

Find the total number of non-negative integral ordered triplets for- $$x_1+x_2+x_3=11$$ under the bounds,

  • $x_1\in (2,6)$ and

  • $x_2 \in (3,7)$.

I was generally able to solve such problems involving bounds by introducing a new variable but that was only in case of a single boundary condition. How do I proceed when there are two?

2

There are 2 best solutions below

1
On

This can be solved using Bose-Einstein, which is also known as Bars and Stars https://en.wikipedia.org/wiki/Stars_and_bars_(combinatorics).

In your case, you have 11 dots, and basically you want to put this 11 dots into 3 boxes. You only care how many dots are going in each box. For this you can use: $$\binom{n + k - 1}{k-1}$$ and in your case: $$\binom{11 + 3 - 1}{2}$$ This is including the solutions where you have 0 as possible value for some variables, so you might want to exclude those.

First let's get all the possible solutions that match the lower bound. Smallest value for x1 is 3 and for x2 is 4. We can mark x1 and x2 as: $$x1 = y1 + 3\\ x2 = y2 + 4 $$

The new equation becomes: $$ y1 + 3 + y2 + 4 + x3 = 11 <=> y1 + y2 + x3 = 4 $$ Now all the possible values are: $$ \binom{4 + 3 - 1}{3 - 1}$$ From this ones you need to substract all the values that have either x1 > 6 or x2 > 7. (They can't be both greater since the sum would be over the boundaries). So you can replace x1 with y1 + 6 and x2 with y2 + 7 and apply the same principle. After that you can substract these results from the total.

2
On

I have figured out an approach using Multinomial Theorem- We can find the coefficient of x^11 in (x^3+x^4+x^5)(x^4+x^5++x^6)(x^1+x^2+x^3+x^4).

This comes out to be 8.