Combinatorics practice problems

Q9 - Let n be a five-digit number, and let q and r be the quotient and remainder, respectively, when n is divided by 100. For how many values of n is q + r divisible by 11?
Answer: 8181
Solution:
n = 100q + r = 99q + q + r
If q+r is div by 11 then n is also.
Total numbers divisible by 11 from 1 to 99999 = [99999/11] = 9090
How many of them are less than 10,000 => [10,000/11] = 909
Finally 9090 - 909 = 8181

Q10 - A 7-digit telephone number d1 d2 d3 d4 d5 d6 d7 is called memorable if the prefix sequence d1 d2 d3 is exactly the same as either of the sequences d4 d5 d6 or d5 d6 d7 (possibly both). Assume that each di can be any of the ten decimal digits 0, 1, 2, . . . , 9. What is the number of distinct memorable telephone numbers?

Answer: 19,990

Solution:
Let's consider the 'both' case, i.e. when d1d2d3 = d4d5d6  = d5d6d7.
Let's say the number is 'abcabcd'.
If abc = bcd then a = b, b = c, c = d => a = b = c = d => all digits in the number are same.
There are 10 such numbers. For e.g. 1111111.

Now, consider the first case when  d1d2d3 = d4d5d6.
There are 10^3 ways to choose first 3 digits and next 3 digits are exactly same. So 10^3 * 1.
Last digit can be chosen in 10 ways.
So 10^4.

Now, consider the next case when  d1d2d3 = d5d6d7.
Again, 10^4 ways.

So total 20,000 ways.
But 'both' case has been considered twice.
So 20,000 - 10 = 19,990.

Comments

Popular posts from this blog

IOQM 2024 Paper solutions (Done 1-21, 29)

Combinatorics DPP - RACE 6 - Q16 pending discussion

IOQM 2023 solutions