I have a combinatorics problem:

How many non-negative integer are there for $x_1+x_2+x_3+x_4+x_5=12$ where $x_1<x_2<x_3$

I tried to subtract the number of integers in which $x_1=x_2=x_3$ from the number of the whole possible solutions.However I could not do the rest.Can you enlighten me ,please?

Note: $x_1,x_2,x_3$ do not have to be consecutive. They are just smaller than each other ,respectively.

  • $\begingroup$ Try this as an example. $\endgroup$ – rtybase Jun 28 at 19:34
  • $\begingroup$ What about $x_4$ and $x_5$? Are they arbitrary? $\endgroup$ – user Jun 28 at 21:12
  • $\begingroup$ @user yes ,they are $\endgroup$ – LEO Jun 28 at 21:25

Let us apply the approach suggested in comment.

Let $x_2=x_1+a, x_3=x_2+b$ so that the original equality can be written as: $$ 3x_1+2a+b+x_4+x_5=12 $$ where $a$ and $b$ are positive and the other are non-negative integer numbers.

The number of integer solutions to the equation is: $$ [x^{12}]\frac1{1-x^3}\frac{x^2}{1-x^2}\frac{x}{1-x}\frac{1}{1-x}\frac{1}{1-x}= [x^{12}]\frac{x^3}{(1-x^3)(1-x^2)(1-x)^3}=189. $$ where $[x^n]$ means the coefficient at $x^n$ in the series expansion of the following expression.

| cite | improve this answer | |
  • $\begingroup$ thank you very much sir.By the way, is there any way to solve it using inclusion -exclusion without using generating functions $\endgroup$ – LEO Jun 28 at 22:37
  • $\begingroup$ At the moment I see no simple way to use inclusion-exclusion. $\endgroup$ – user Jun 29 at 6:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.