shop have 8 different type of bagels as y1, y2, y3, y4, y5, y6, y7, y8 where y1 is egg bagel (y1>=3) and y2 is salty bagel (y2<=2).
y1 + y2 + y3 + y4 + y5 + y6 + y7 + y8=12
By generating function :
we have to choose coefficient of x12 in following eq.
(x3 + x4 +....x12) (1 + x + x2 ) (1 + x + x2...x12) (1 + x + x2...x12) (1 + x + x2...x12) (1 + x + x2...x12) (1 + x + x2...x12) (1 + x + x2...x12)
as we only need coefficient of x12 adding variable having power greater than x12 should not affect the solution.
(x3 + x4 +....∞) (1 + x + x2 ) (1 + x + x2...∞) (1 + x + x2...∞) (1 + x + x2...∞) (1 + x + x2...∞) (1 + x + x2...∞) (1 + x + x2...∞)
= x3 (1 + x + x2...∞) (1 + x + x2 ) (1 + x + x2...∞)6
= x3 (1 + x + x2 ) (1 + x + x2...∞)7
now we choose coefficient of x9 in $\left ( \frac{1-x^{3}}{1-x} \right )\left ( \frac{1}{(1-x)^{7}} \right )$
= $(1-x^{3})\left ( \frac{1}{(1-x)8} \right )$
General term of Binomial coefficient is $\binom{n+r-1}{r}$ for $\frac{1}{(1-x)^{8}}$
here we have to calculate x9 and x6
$\binom{8+9-1}{9}$ - $\binom{8+6-1}{6}$ = 11440 - 1716 = 9724