If N denote the number of 2 6 -digit numbers: a 1 a 2 a 3 … a 2 6 which consists of zeros or ones only such that a 1 + a 3 + a 5 + … + a 2 3 + a 2 5 = a 2 + a 4 + a 6 + … + a 2 4 + a 2 6 What is the last 3 digits of N ?
Details and assumptions
SInce N is a 26-digit number, a 1 = 0 .
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.
shouldn't the index be c in the sums at the end?
Can you please explain how did you calculate that (25 C 13 ) is 300 mod 1000
Really elegant approach with clever usage of the Vandermonde identity
Just forget about a1=1 restriction.
If you have i 1's in odd places, then you need to have i 1's in even places. (for i=0,1,....13) Number of ways you can have i 1's = C(13,i)*C(13,i)
Hence total number of ways = Sum (C(13,i) C(13,i)) for i=0 to 13 = Sum(C(13i) C(13,13-i)) for i=0 to 13 = C(26,13)
By symmetry (There is nothing special about '0' or '1'), there are half number of a1=0 and half number of a1=1.
=> C(26,13)/2
oh my gosh!!!!!!!!!!!!!!! I have a HUGE doubt about this, doesn't the question say "the number is made up of all 0s and 1s.." then HOW can the last 3 digits be 300?????? It must only consist 0 and 1, not any other number like 3. Someone, please explain!
Vaishnavi, the question is asking for the last 3 digits of the total number of possibilities of the 26 digit number not for the last 3 digits of the 26 digit number itself.
Note that a 1 = 1 , or else it would not be a 2 6 digit number. The number of ways to have the LHS digit sum be equal to n and the RHS digit sum equal to n is equal to ( n − 1 1 2 ) and ( n 1 3 ) , respectively. We could find the sum from n = 1 t o 1 3 of that product, but I found an easier way through some investigation:
Note that the sum is taking two rows in pascal's triangle and taking the element in the top row and multiplying it with the number that is to the bottom and to the right of it. I found the first sums and found a sequence of 1 , 3 , 1 0 , 3 5 , 1 2 6 , which I recognized as binomial coefficients, so I converted them: ( 0 1 ) , ( 2 3 ) , ( 3 5 ) , ( 4 7 ) , ( 5 9 ) , and I found a pattern that it was equal to ( n + 1 2 n + 1 ) , though due to the fact that I should really be doing college apps I left it at that, computed ( 1 3 2 5 ) ( m o d 1 0 0 0 ) by finding the last digit and multiplying by 1 0 0 and called it a day.
Good observation, it is actually a special case of the Vandermonde's Identity.
Log in to reply
Whats that ??
Cool, thanks for letting me know
Sorry but could you explain what you meant by
the sum is taking two rows in pascal's triangle and taking the element in the top row and multiplying it with the number that is to the bottom and to the right of it?
(As in what do you mean by sum?)
Log in to reply
By the sum I mean N, what we're trying to find in the problem.
haha, I feel you on the college apps.
Nice one :D. But I've got a different type of solution. a 1 has to be 1 . But when a 1 = 0 , just change all the 0 ′ s into 1 and all the 1 ′ s into 0 ′ s in both sides of the equation. So, a 1 has now got the value 1 and still both sides of the equation shares the same sum. Thus you can get a one-to-one correspondence between the possible combinations when a 1 is 1 and when a 1 is 0 . Now the total number of such numbers without the condition that a 1 has to be 1 is ( 0 1 3 ) 2 + ( 1 1 3 ) 2 + … + ( 1 2 1 3 ) 2 + ( 1 3 1 3 ) 2 or ( 0 1 3 ) ( 1 3 1 3 ) + … + ( 1 2 1 3 ) ( 1 1 3 ) + ( 1 3 1 3 ) ( 0 1 3 ) = ( 1 3 2 6 ) . And so N would be ( 1 3 2 6 ) / 2 ≡ 3 0 0 ( m o d 1 0 0 0 ) .
We proceed with casework on the possible sums. If the sum is 1, then there is a total of ( 0 1 2 ) ⋅ ( 1 1 3 ) (there must be a 1 as the first digit and the digits at the odd position have ( 0 1 2 ) and the digits at the even position have ( 1 1 3 ) ). Similarly, if the sum is 2, then there is a total of ( 1 1 2 ) ⋅ ( 2 1 3 ) . Continuing this gives us the sum ( 0 1 2 ) ⋅ ( 1 1 3 ) + ( 1 1 2 ) ⋅ ( 2 1 3 ) + ⋯ + ( 1 2 1 2 ) ⋅ ( 1 3 1 3 ) . This is just simply Vandermonde's identity, so we have ( 1 3 2 5 ) which has last three digits 3 0 0 .
Sorry for sharing this here..... i am a beginner thats d reason i took this method :( First digit in 26-digit number should be 1.. so for remaining 25 digits 1==even digits-odd digits and no of ways ==5200\boxed{300}
here its c programme
int main(){
int q,w,e,r,t,y,u,i,o,p,a,s,d,f,g,h,j,k,l,z,x,c,v,b,n,sum=0;
for(q=0;q<2;q++){
for(w=0;w<2;w++){
for(e=0;e<2;e++){
for(r=0;r<2;r++){
for(t=0;t<2;t++){
for(y=0;y<2;y++){
for(u=0;u<2;u++){
for(i=0;i<2;i++){
for(o=0;o<2;o++){
for(p=0;p<2;p++){
for(a=0;a<2;a++){
for(s=0;s<2;s++){
for(d=0;d<2;d++){
for(f=0;f<2;f++){
for(g=0;g<2;g++){
for(h=0;h<2;h++){
for(j=0;j<2;j++){
for(k=0;k<2;k++){
for(l=0;l<2;l++){
for(z=0;z<2;z++){
for(x=0;x<2;x++){
for(c=0;c<2;c++){
for(v=0;v<2;v++){
for(b=0;b<2;b++){
for(n=0;n<2;n++){
if(q+w+e+r+t+y+u+i+o+p+a+s+d-f-g-h-j-k-l-z-x-c-v-b-n==1) sum++;
}}}}}}}}}}}}}}}}}}}}}}}}}
printf("%d", sum);
return 0;
}
Problem Loading...
Note Loading...
Set Loading...
We know i = 1 ∑ 1 3 a 2 i − 1 = i = 1 ∑ 1 3 a 2 i = c for some constant 1 ≤ c ≤ 1 3 . For each case of c , we must have a 1 = 1 , so we can set a 3 , a 5 , ⋯ , a 2 5 in ( c − 1 1 2 ) ways, and we can set a 2 , a 4 , ⋯ , a 2 6 in ( c 1 3 ) ways
Therefore our answer is i = 1 ∑ 1 3 ( c − 1 1 2 ) ( c 1 3 ) = i = 1 ∑ 1 3 ( 1 3 − c 1 2 ) ( c 1 3 ) = ( 1 3 2 5 ) ≡ 3 0 0 ( m o d 1 0 0 0 ) by Vandermonde's Identity.