0

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.

Jon Garrick
  • 2,624

0 Answers0