# Counting

• Jun 12th 2008, 07:32 AM
robocop_911
Counting
Hi there I have a question...

Can anyone explain me this question which is along with its answer!

Count the set S of 3 digit numbers which begin or end
with an even digit.
Assume that 0 is even but a number cannot begin with 0.
The set is the union of the two subsets:
• The set B of three digit numbers that begin
with 2, 4, 6 or 8.
This set has cardinality
(4)(10)(10).
(why?)

• The set C of three digit numbers that end with
0, 2, 4, 6, or 8 and do not begin with 0.
This set has cardinality
(5)(9)(10). <<How come here it is (5)(9)(10) instead of (5)(10)(10)?
(why?)
• Now we use the inclusion-exclusion principle
to eliminate the overlap of sets B and C.
Their intersection:
The 3 digit numbers that begin with 2, 4, 6, or 8 and end
with 0, 2, 4, 6, or 8.
The intersection has the cardinality
(4)(10)(5)
Hence the cardinality is
400 + 450 - 200 = 650.
____________________
• Jun 12th 2008, 08:07 AM
sean.1986
It's 5*9*10 because there are 900 three digit numbers between 100 and 999 and half of these are even, therefore 900/2 = 450.
• Jun 12th 2008, 08:37 AM
sean.1986
The first set has a cardinality of 400 because...

There are 4 different numbers which can be the 10^2 digit (2, 4, 6, 8)

10 numbers which can be the digit in the tens column (0-9)

And 10 numbers which can be the digit in the units column (0-9)
• Jun 12th 2008, 09:23 AM
robocop_911
Quote:

Originally Posted by sean.1986
It's 5*9*10 because there are 900 three digit numbers between 100 and 999 and half of these are even, therefore 900/2 = 450.

I still don't get it How come its 5*9*10? shouldn't it be 9*10*5? where 5 is units 10 is tens and 9 is hundreds?
• Jun 12th 2008, 09:30 AM
sean.1986
Quote:

Originally Posted by robocop_911
I still don't get it How come its 5*9*10? shouldn't it be 9*10*5? where 5 is units 10 is tens and 9 is hundreds?

Basically, yeah. The commutative laws of multiplication mean they're the same.
• Jun 12th 2008, 10:56 AM
Soroban
Hello, robocop_911!

Quote:

Count the set $S$ of 3-digit numbers which begin or end with an even digit.

Assume that 0 is even but a number cannot begin with 0.

The set is the union of the two subsets:

• The set $B$ of 3-digit numbers that begin with 2, 4, 6 or 8.

The first digit can be any of {2,4,6,8}: .4 choices.
The second digit can be any of the 10 digits.
The third digit can be any of the 10 digits.

Hence, there are: . $(4)(10)(10) \:=\:400$ numbers in set $B \;\;\hdots\;\; n(B) = 400$

Quote:

• The set $C$ of 3-digit numbers that end with {0,2,4,6,8} and do not begin with 0.
The first digit must not be zero: .9 choices.
The second digit can be any digit: .10 choices.
The last digit is even: .5 choices.

Hence, there are: . $(9)(10)(5) \:=\:450$ numbers in set $C\;\;\hdots\;\;n(C) = 450$

Quote:

• Now we use the inclusion-exclusion principle
to eliminate the overlap of sets B and C.

Their intersection:
The 3-digit numbers that begin with {2,4,6,8} and end with {0,2,4,6,8}.

The first digit is from {2,4,6,8}: .4 choices.
The second digit can be any digit: .10 choices.
The last digit is from {0,2,4,6,8}: .5 choices.

Hence, there are: . $(4)(10)(5) \:=\:200$ numbers in the overlap . $\hdots\;\;n(B \cap C) = 200$

Therefore: . $n(B \cup C) \;=\;n(B) + n(C) - n(B \cap C) \;=\;400 + 450 -200 \;=\;\boxed{650}$