Quote:

Count the set $\displaystyle 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 $\displaystyle B$ of 3-digit numbers that begin with 2, 4, 6 or 8.

Quote:

• The set $\displaystyle C$ of 3-digit numbers that end with {0,2,4,6,8} and do not begin with 0.

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}.