Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Please suggest a suitable approach for this problem.

share|improve this question
    
This is just counting isn't it? What's your motivation for this? –  Rasmus Sep 24 '10 at 11:56
    
This seems a bit like homework so here's just a hint: count the number that contain 00, 11, 22, ..., 99 (but not 111, 222, ...). –  Derek Jennings Sep 24 '10 at 11:59
    
Derek this is not a really a homework,the solution given is like this :9*9 + 1*9 + 8*9 = 162. But I am unable to figure out a proper explanation :| –  Quixotic Sep 24 '10 at 12:02
2  
It helps to say something about the motivation behind the question, even if it is just homework, and also a little on what you've tried so far. –  Derek Jennings Sep 24 '10 at 12:03
    
Motivation is that it comes from my test paper.As the matter of fact I can only brute-force using computer programming to reach that answer,but I need some concrete idea to solve this problem logically. –  Quixotic Sep 24 '10 at 12:09

2 Answers 2

up vote 5 down vote accepted

Ok. Ask yourself first how many contain 00. Next, how many contain 11 (it's 17, you work it out). Then consider the number that contain 22, etc. You will get 9+17*9=162. I hope this helps.

share|improve this answer
    
I understood your approach, which is like this :Number of numbers of the form 00 = 9, number of number of the form 11 = 9 and of the form *11 = 8 (we can't use 0 and 1 ) Thus we get 17 for 11 we will get 17 for each of 22,33,44,55,55,77,88,99.Hence the required answer is : 9+17*9 = 162. –  Quixotic Sep 27 '10 at 9:26

In your comment, you said that the given solution was 9 • 9 + 1 • 9 + 8 • 9 = 162. I'll attempt to explain a logic that yields that calculation.

Consider the 3-digit numbers that start with two identical digits. There are 9 choices of the first digit (and inherently the second digit): 11, 22, 33, 44, 55, 66, 77, 88, and 99 (not 00 because the number is in the range 100-999). For each of these, there are 9 choices of the final digit (0-9, except whatever digit was already chosen for the first two). So, there are 9 • 9 such numbers.

Now, suppose that the number ends with two identical digits. There are 10 choices for the last digit (and inherently the second-to-last digit): 00, 11, 22, 33, 44, 55, 66, 77, 88, and 99, but we need to treat 00 separately from the rest. If the number ends with 00, then the first digit can be 1-9, so 9 choices, so 1 • 9. If the number ends with 11-99, there are 8 choices of first digit (1-9 except the digit already chosen), so 9 • 8.

While I have the 8 and 9 transposed in the final term, this is term-by-term the same expression as in the solution you gave.

share|improve this answer
    
Thanks for an excellent explanation. –  Quixotic Sep 27 '10 at 9:33

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.