Give the number of solutions of $x+y+z = 30$, for $4 \leq x \leq 14$, $3 \leq y \leq 17$, $10 \leq z \leq 25$.

3.8k Views Asked by At

How would I find the number of solutions with both upper and lower bounds? Can anyone give a step by step way to solve this problem? This is question is in preparation for my discrete math final, so much help is appreciated!

5

There are 5 best solutions below

0
On

I suppose $x,y,z$ are integers. The only method that comes to my mind is to do a bit of casework.

Case 1. $x=4$. Then you are left with $y+z=26, 3 \leq y \leq 17, 10\leq z \leq 25$. The possible cases for $y,z$ are $(16,10),(15,12),...,(3,23)$. You count these and you move on.

Case 2. $x=5$. Then you are left with $y+z=25, 3 \leq y \leq 17, 10\leq z \leq 25$. The possible cases for $y,z$ are $(15,10),(14,11),...,(3,22)$. You count these and you move on.

... Do this until $x=14$, and sum all the possibilities.

0
On

It's highly likely that $x,y,z$ need to be integers, so I'll give a couple of hints with that assumption.

You have limits on $x$. So, start at the low end ($x=4$).

What limits does this impose on $y+z$? (Hint: If $4+y+z=30$, then $y+z= ...$)

Once you have that, consider the limits on $y$. Then see if there is a corresponding $z$ that (a) satisfies the constraint on $y+z$ and (b) satisfies the constraint on $z$.

Increase $y$ through its domain and count up the number of solutions.

Now, go back and let $x=5$ and repeat the process until you reach $x=14$.

0
On

Since you included the tag discrete mathematics, this problem has something to do with generating functions. I assume also that $x$, $y$ and $z$ are integer, given the tag.

The generating function of interest is: \begin{align} f(x)&=(x^4+x^5+\dots+x^{14})(x^3+x^4+\dots+x^{17})(x^{10}+x^{11}+\dots+x^{25})\\ &=x^{17}(1+x+\dots+x^{10})(1+x+\dots+x^{14})(1+x^{1}+\dots+x^{15}) \end{align}

We want to know the coefficient for $x^{30}$.

2
On

You can just absorb the lower bounds into the variables.
Define $x'=x-4, y'=y-3,z'=z-10$
Now you are solving $x'+y'+z'=13, 0 \le x' \le 10, 0 \le y' \le 14, 0 \le z' \le 15$
The last two constraints do not matter, so can be ignored. Now you have a classic stars and bars problem

0
On

One technique here is to simplify by setting $X=x-4, Y=y-3, Z=z-10$ when you get $X+Y+Z=13$ and $0\le X \le 10; 0\le Y\le 14; 0\le Z \le 15$

It then becomes obvious that the upper constraint on $X$ is the only upper constraint which matters, and you have to exclude the cases where $X=11,12,13$ (which can't quite be counted on the fingers of one hand, but two will do).

There are standard ways, including systematic counting, finding a formula by induction, using a recurrence or working with a generating function to find the number of solutions to $X+Y+Z=13$ in non-negative integers.