in Mathematical Logic
629 views
0 votes
0 votes
Caption
in Mathematical Logic
629 views

2 Comments

answer 1694 ???
0
0
435 is the answer .
0
0

3 Answers

4 votes
4 votes
Best answer

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..

                       

                                                                                    

selected by
3 votes
3 votes

another way to solve .

1 vote
1 vote
a+b+c+d+e = 15

a>=3 and a<=6

so it will be for a > = 3

a'+b+c+d+e = 12 so number of ways will be 12+5-1 C 5-1 = 1820

now these are the possibilities, so this will be violated if a >=7 now we took a' = a - 3 so the condition in terms of a' will be a = a'+3

a<=6 so a' + 3 < = 6  so a' <=3 now the violating conditions will be a'>=4

so now the reject cases will be a'+b+c+d+e = 8 so it will be 8+5-1 C 5-1 = 6 C 4 = 495

so total number of possible cases will be 1820 - 495 = 1325
Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true