# How many positive, three-digit integers contain at least one $3$

How many positive, three-digit integers contain at least one $3$ as a digit but do not contain $5$ as a digit?

I have an answer for that which is $215$ ,is that right ?

If its wrong then ,how to solve it?

-

I think your number is a little high. Take the number of 3-digit integers that contain no 5 and subtract the number of 3-digit numbers that contain no 5 and no 3.

-

Let us consider the number of three-digit integers that do not contain $3$ and $5$ as digits; let this set be $S$. For any such number, there would be $7$ possible choices for the hundreds digit (excluding $0,3$, and $5$), and $8$ possible choices for each of the tens and ones digits. Thus, there are $7 \cdot 8 \cdot 8 = 448$ three-digit integers without a $3$ or $5$.

Now, we count the number of three-digit integers that just do not contain a $5$ as a digit; let this set be $T$. There would be $8$ possible choices for the hundreds digit, and $9$ for each of the others, giving $8 \cdot 9 \cdot 9 = 648$.

By the complementary principle, the set of three-digit integers with at least one $3$ and no $5$'s is the number of integers in $T$ but not $S$. There are $648 - 448 = 200$ such numbers.

-

The number of three-digit natural numbers starting with 3, but without 5 as a digit is 9*9.

Similarly, for the middle-digit & the least-digit the number of such natural numbers is (in each case) 8*9 as 0 can not be the starting digit.

So, the total number of such three-digit natural numbers is 72+72+81=225.

But, some of them are repeated over and over.

So, to remove the repetition subtract $$225 - 9 - 9 -8 + 1$$ Thus, the required number of three digit number will be equal to $$200$$

-
Are you sure you have not double counted somewhere ? – Shailesh Mar 15 at 11:05
Now, it's correct man, this tym I have checked all are counted only once. This is correct answer. – AMAN SINGH Mar 15 at 19:49
Iit doe s look better – Shailesh Mar 15 at 21:02

The number of three-digit natural numbers starting with 3, but without 5 as a digit is 9*9.

Similarly, for the middle-digit & the least-digit the number of such natural numbers is (in each case) 8*9 as 0 can not be the starting digit.

So, the required number of three-digit natural numbers is 72+72+81=225.

2nd approach:

The de facto way of solving problems with 'at least one' is to finding the solution of the reverse i.e., containing none, then subtract from the universal set.

Here the number of three number is (999-100)+1=900.

Now, if no digit is 3, then the highest digits can be one of 0 to 9 excluding 0,3 as 0 will reduce the number to 2-digit. So, the highest can accept 8 possible values.

The rest two digits each can accept one of 0 to 9 excluding 3.

The number of numbers which don't contain 3 as any digit, is 8*9*9=728.

So, the number of numbers which contain 3 as at least one digit, is = 900-728=252.

As observed by Brandon Carter in the 1st solution, it contains duplicates like 333. More over, it does not include the exhaustive set either. What are missing?

-
You are counting the same number several times. 333, for example, falls into all 3 categories. – Brandon Carter Jul 11 '12 at 6:29
What other numbers get repeated? – lab bhattacharjee Jul 14 '12 at 14:06
Lots of them. Think about it. – Brandon Carter Jul 14 '12 at 15:49