This can be mathematically formulated as :
Number of solutions of X1 + X2 + X3 + X4 + X5 = 15 where X1 >= 3 , X2,X3,X4,X5 >= 0 which can be rewritten as :
X1 + X2 + X3 + X4 + X5 = 12 where X1,X2,X3,X4,X5 >= 0
So as we know :
No of non negative integral solution of X1 + X2 ......+ Xn = r is given by n-1+rCr
So here n = 5 , r = 12 , so no of solutions of this part = 5-1+12C12
= 16C12
= 1820 ................(1)
Now the solution above was for Sana gets at least 3 chocolates..
Now we consider the case where Sana gets at least 7 chocolates..
So the equation becomes :
X1 + X2 + X3 + X4 + X5 = 15 where X1 >= 7 , X2,X3,X4,X5 >= 0 which can be simplified as :
X1 + X2 + X3 + X4 + X5 = 8 where X1,X2,X3,X4,X5 >= 0
Hence no of solutions for above equation is = 5-1+8C8
= 12C8
= 495
Hence no of ways s.t. Sana gets at least 3 chocolates
and at most 6 chocolates = No of ways sana gets at least 3 - at least 7 chocolates
= 1820 - 495
= 1325 ways
Hence no of desired ways = 1325..The same can also be verified using generating function approach which is more general apporach..But if we have only one constraint like this , so we can proceed in this manner..
Also chocolates are identical and children are different(like boxes) hence this approach is correct..