Question
Question: There are 6 chocolates of Nestle, 8 of Cadbury, 10 of Perks, and 9 of Munch. The number of ways in w...
There are 6 chocolates of Nestle, 8 of Cadbury, 10 of Perks, and 9 of Munch. The number of ways in which a child can buy 7 chocolates, is
Solution
We will use some general formula i.e. the number of solutions of n non-negative integral variables lets say x1,x2,x3,x4..........xn and their sum is P i.e.,x1+x2+x3+x4+..........+xn=P. Then the number of solutions of the above equation is P+n−1Cn−1. Then we’ll exclude those cases that will be contradicting the given data.
Complete step by step answer:
Given data:
Number of Nestle(N)=6
Number of Cadbury(C)=8
Number of Perk(P)=10
Number of Munch(M)=9
Now, we know that if there are n non-negative integral variables lets say x1,x2,x3,x4..........xn and their sum is P ,
i.e.,x1+x2+x3+x4+..........+xn=P
Then the number of solutions of the above equation is P+n−1Cn−1 .
Now, we have to find the number of ways that the child can select 7 chocolates out of the given number of distinct chocolates.
We can write it as
N+C+P+M=7
Where N, C, P, M are non-negative integers, but there N=6 therefore cannot select all the 7 nestle chocolates which means we have to subtract one solution out of the total number of solutions.
Then the number of ways that the child can select 7 chocolates will be 7+4−1C4−1−1
On simplifying we get,
=10C3−1
Using,nCr=r!(n−r)!n!
⇒10C3−1=3!(10−3)!10!−1
=3!7!10!−1
Using n!=n(n−1)!
=3!7!10×9×8×7!−1
On cancelling common terms we get,
=3!10×9×8−1
Expanding the value of 3!
=3×2×110×9×8−1
On simplifying we get,
=120−1
=119
Hence, The number of ways in which a child can buy 7 chocolates is 119.
Note: Alternative method of this solution can be
First, we find the value of nC2=2!(n−2)!n!
Using n!=n(n−1)!
⇒2!(n−2)!n!=2!(n−2)!n(n−1)(n−2)!
=2n(n−1), we’ll be using the further solution
We know that
N+C+P+M=7,
When N=0
C+P+M=7, then the number of the solution will be 7+3−1C3−1
=9C2
=29×8
=36
When N=1
C+P+M=6, then the number of the solution will be 6+3−1C3−1
=8C2
=28×7
=28
When N=2
C+P+M=5, then the number of the solution will be 5+3−1C3−1
=7C2
=27×6
=21
When N=3
C+P+M=4, then the number of the solution will be 4+3−1C3−1
=6C2
=26×5
=15
When N=4
C+P+M=3, then the number of the solution will be 3+3−1C3−1
=5C2
=25×4
=10
When N=5
C+P+M=2, then the number of the solution will be 2+3−1C3−1
=4C2
=24×3
=6
When N=6
C+P+M=1, then the number of the solution will be 1+3−1C3−1
=3C2
=23×2
=3
Therefore the total number of ways=36+28+21+15+10+6+3
=119