0
$\begingroup$

How many solutions for the equation $Y_1 + Y_2 + Y_3 + Y_4 + Y_5 = 6$ ?

where $0\leq Y_1 \leq 3$ and $1\leq Y_2 \leq3$ and $Y_3,Y_4,Y_5\geq 0$ and $Y1,Y2,Y3,Y4,Y5 $ are integers.


I tried to apply brute force and got following equations :

  • $Y3 + Y4 + Y5 = 5\quad$ has $21$ Solutions
  • $Y3 + Y4 + Y5 = 4\quad$ has $15$ Solutions
  • $Y3 + Y4 + Y5 = 3\quad$ has $10$ Solutions
  • $Y3 + Y4 + Y5 = 2\quad$ has $6$ Solutions
  • $Y3 + Y4 + Y5 = 1\quad$ has $3$ Solutions
  • $Y3 + Y4 + Y5 = 0\quad$ has $1$ Solution

Am I going right here ?

EDIT: Using generating functions gives $106$, but what is the error in above method.

  • 0
    Add that they are integers.2017-01-15
  • 1
    From a program I put together, it appears the answer is 106 (if this helps).2017-01-15
  • 0
    @Mark Yes,I used generating functions and got 106. I'll edit that. But, why above method is not right ?2017-01-15
  • 0
    What you have noticed is that the number of ways to sum three numbers to make $n$ is $T_{n+1},$ the $(n+1)$st triangular number, which is $\frac 12(n+1)(n+2)$2017-01-15

0 Answers 0