There are $6$ identical red balls, $9$ identical blue balls and $8$ identical yellow balls. Those balls will be distributed to $3$ distinct boxes such that the first box can contain at most $3$ balls, the second box can contain $1 \leq ... \leq5$ , the third box can contain $3 \leq ... \leq7$ balls.
i-) Find the number of all possible distributions
ii-) Find the number of all possible distribution where the order of balls in each boxes matter.
My work
PART i-) I thought to use generating functions for each ball type, but it was very long process. Moreover, because of not all balls will be used, there are some extra difficulties.
G.F for reds: $$[x^r](1+x+x^2+x^3)(x+x^2+x^3+x^4+x^5)(x^3+x^4+x^5+x^6+x^7)$$
G.F for blues: $$[x^b](1+x+x^2+x^3)(x+x^2+x^3+x^4+x^5)(x^3+x^4+x^5+x^6+x^7)$$
G.F for yellowss: $$[x^y](1+x+x^2+x^3)(x+x^2+x^3+x^4+x^5)(x^3+x^4+x^5+x^6+x^7)$$
However, I do not know how to proceed. Moreover, my thought above doesnt help anything.
To be honest, I could not think any sensible thought. Can you give any hint or solution for both parts. You can use any mathematical methods except for programming, but if possible, i prefer generating functions.