David has 2014 dolls. He has to choose odd number of dolls from the collection. Find the last three digits of the number which represents the total number of ways in which he could do this.
Details and Assumptions :- David can choose 1,3,5.....or any odd number of toys but not an even number of them
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
There is a direct approach which tells us that there are 2 2 0 1 3 total number of ways.
Log in to reply
Yes. Using binomial coefficients theorem one can even derive it. But Agni is such a computer geek that he never does problems without it,,, :P
Consider this question: In how many ways can I select any number of dolls from a collection of 2014 dolls.
For each doll you have, 2 choices. To select it or not, so there are 2^2014 ways.
Now, for only odd number of dolls:
Half of those cases we selected odd number of dolls
Clearly the answr is 2^2013
Is that what you meant?
Does this work in Python too?
Please re-share this
Mathematica (half the world is already built-in, so one line kills it all)
Mod[Sum[Binomial[2014, 2 i - 1], {i, 1, 1007}], 1000]
= 192
Note: I solved it the hard way first.
The problem states choose the odd number of Dolls from 2014 dolls. This means we can choose 1, 3, 5 ... 2013 dolls out of 2014. Now, how many ways are there for choosing 1 doll ( 1 2 0 1 4 ) Similarly to choose 3 dolls , there are ( 3 2 0 1 4 ) ways and so on. So total number of ways is given by, ( 1 2 0 1 4 ) + ( 3 2 0 1 4 ) + ( 5 2 0 1 4 ) + ⋯ + ( 2 0 1 3 2 0 1 4 ) We know that, ( 0 n ) + ( 1 n ) + ( 2 n ) + ⋯ + ( n n ) = 2 n This consists of equal number of odd and even terms so sum of only odd terms is 2 n / 2 In our case this is 2 2 0 1 3 Finally we have to calculate 2 2 0 1 3 % 1 0 0 0 which comes out to be 1 9 2
By the way, can you prove your proposition for the sum of that extended binomial coefficents ...? 2^n and 2^n-1?
Good solution! But you could have done the last part too without a computer! :P
Problem Loading...
Note Loading...
Set Loading...
Python/Sage Code:
Define the Factorial:
Define c(n,r):
Find the sum of all the terms in 2014Choose1, 2014Choose3,.... 2014Choose 2013
Returns
9 4 0 5 4 8 6 6 5 5 6 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