# GRE Probability question

How many 3-digit positive integers are odd and do not contain the digit 5 ?

My attempt: 100-999 3 -digit integers, 900/2=450 odd numbers. Now how to calculate odd numbers which do not contain digit 5 in it.

-
Hint: An odd integer, expressed in decimal notation, must have an odd digit $1,3,5,7,9$ in the rightmost ("ones") place. –  Dilip Sarwate Sep 10 '12 at 11:06
it says should not contain digit 5, and that implies not only for the ones place but for ones, tens and hundred place. isnt it? –  sonam Sep 10 '12 at 11:08
Yes, but I did not provide an answer to your question or address the details on it. I just gave a hint that might help you in working out the answer for yourself. –  Dilip Sarwate Sep 10 '12 at 11:11

## 2 Answers

Units digit should contain {1,3,7,9} = 4; Tens digits can be {0,1,2,3,4,6,7,8,9} = 9 Hundreds digit can be {1,2,3,4,6,7,8,9} = 8.

So the answer is 8$*$9$*$4 = 288

-

The important aspect in these kinds of permutations and combinations questioins is the direction with which you are approaching the problem.

For some questions, starting from the left most digit and then moving towards right may be a good strategy. Ex-- How many numbers are greater than 500 or less than 800 kind of questions, where hundred's digit has a lot of importance.

But for these kind of questions, where units digit is important, it is a better idea to start from the right-most digit.

Note: When repetition is not allowed, the above two strategies play an important role.

As repetition is allowed in this problem, it is a straight forward one.

First units digit : odd-1,3,5,7,9 No five : 4 possibilities

Middle digit : all 10 values No five : 9 possibilities

Hundred's digit : zero not possible- 9 values 8 possibilities

Total = 4 * 9 * 8 = 288

-