191k views
1 vote
How many 4-digit positive integers are there that are even or contain no 0's?

1 Answer

5 votes
An even number will end in 2, 4, 6, 8, or 0. Because there are even numbers that end in 0, so we need to account for any overlap. Recall the inclusion/exclusion principle:


|\text{numbers we want}|=|\text{even}|+|\text{no 0s}|-|\text{even AND no 0s}|

where
|X| is used to denote the size/cardinality of the set
X.

Any 4 digit positive even integer will have 9 choices for its first digit (1-9, can't start with 0), 10 choices for its second and third digits, and 5 choices for its last digit. So


|\text{even}|=9\cdot10^2\cdot5=4,500

Numbers that contain no 0s have 9 choices for each of their digits, so


|\text{no 0s}|=9^4=6,561

Finally, even numbers not containing 0s have 9 choices for the first three digits and 4 for the last digit.


|\text{even AND no 0s}|=9^3\cdot4=2,916

So counting the numbers we want, we find that there are
4,500+6,561-2,916=8,145 of them.
User Miron Balcerzak
by
8.0k points

No related questions found