2

Please explain me how can I calculate a number of possible solutions for such inequality and obtain those values:

$$3x + 7y + z \leq 198$$

where $x,y,z$ are integers (non-negative).

N. F. Taussig
  • 76,571
  • Please read this tutorial on how to typeset mathematics on this site. – N. F. Taussig Jan 17 '16 at 19:56
  • It is worth asking what tools/methods/techniques you have available for such questions. If mathematics software is not available to you (rendering the generating function argument less useful), perhaps you might attempt describing the scenario using Ehrhart Polynomials. If requiring more elementary techniques, I would need to think further on how to approach. – JMoravitz Jan 17 '16 at 20:00
  • In searching for a more elementary approach, I came across this related question, but the technique employed there would amount to a great deal of case-work for these specific numbers. – JMoravitz Jan 17 '16 at 20:05

1 Answers1

3

I would recommend approaching via generating functions.

First, to account for the fact that it is less than or equal, consider the related problem of counting the non-negative integer solutions of $3x+7y+z+\color{red}{w}\color{blue}{=}198$. The number of solutions of the original question will be the same as the number of solutions of this related question.

We have the following generating function:

$$f(t)=(1+t^3+t^6+t^9+\dots)(1+t^7+t^{14}+t^{21}+\dots)(1+t+t^2+\dots)(1+t+t^2+\dots)$$

$$=\frac{1}{(1-t^3)(1-t^7)(1-t)(1-t)}$$

Using your favorite mathematics software and expanding the generating function, you have

$f(t)=1+2t+3t^2+5t^3+7t^4+\dots+66368t^{197}+\color{red}{67354t^{198}}+68350t^{199}+\dots$

The coefficient of $t^{198}$ is the number of non-negative integer solutions to the equation $3x+7y+z+w=198$, and hence of the original question.

JMoravitz
  • 79,518