If sum of digits of a 7 digit no. is 59, In how many ways can this number be divisible by 11?
For divisibility by 11 the difference of the sum of digits at even position and the sum of digits at odd positions should be divisible by 11. I can't think of anything right now.
The maximum sum of digits possible for any 7 digit number is 63 (for the case 9999999). Since we are given a sum of 59, this means we have replaced a few 9's with smaller numbers.
Now we have the following ways of doing that
1) Replacing one 9 with a 5
2) Replacing two 9's , either with two 7's, or with an 8 and a 6
3) Replacing three 9's with two 8's and a 7
4) Replacing four 9's with four 8's
Now, our aim is to make the final number divisible by 11. Hence, we consider each case separately.
1) One can easily see that there is no way to make a number divisible by 11 this way
2) We see the current difference between odd sum and even sum is 9. We want to make that 11. So, we decrease odd sum by one and even sum by 3, i.e replace one odd place with an 8 and an even place with a 6. Number of ways of that is $4 \choose 1$ * $3 \choose 1$ $= 12$
3) We can do this by replacing one odd place with an 8, and two of the even places with an 8 and a 7, using the same logic as above. Hence, number of ways to do that is given as $4 \choose 1$$3 \choose 1$$2 \choose 1$ $= 24$
4) We can achieve it by replacing one odd place by 8 , and all 3 even places with 8's. Number of ways to do this is $4 \choose 1$*1 $=4$
Hence, number of possible numbers are $24 + 4 + 12 = 40$