Skip to main content
Logo image

Section 20.2 Addition and subtraction rules

As usual in mathematics, breaking a big problem into smaller parts is a useful strategy.
After recalling the definition of disjoint union, Statement 1 should be obvious. To prove Statement 2, apply Statement 1 to the following disjoint unions:
U=A1βŠ”(A2βˆ–A1),A2=(A2βˆ–A1)βŠ”(A1∩A2).
Then combine the resulting equalities of cardinalities.

Worked Example 20.2.3. Counting by breaking into cases.

How many words of length 3 or less are there using alphabet Ξ£={Ξ±,Ο‰}?
Solution.
Write Σ≀3βˆ— to mean the set of words in alphabet Ξ£ of length 3 or less. Then
Σ≀3βˆ—=Ξ£0βˆ—βŠ”Ξ£1βˆ—βŠ”Ξ£2βˆ—βŠ”Ξ£3βˆ—,
so we can break into cases based on length and then apply the Addition Rule.

Count Ξ£0βˆ—.

There is only one word of length 0: the empty word. So |Ξ£0βˆ—|=1.

Count Ξ£1βˆ—.

There are only two words of length 1: the single-letter words wΞ±=Ξ± and wΟ‰=Ο‰. So |Ξ£1βˆ—|=2.

Count Ξ£2βˆ—.

We can count be simply listing the elements:
Ξ£2βˆ—={Ξ±Ξ±,Ξ±Ο‰,ωα,ωω}.
So |Ξ£2βˆ—|=4.

Count Ξ£3βˆ—.

This time we will just use inductive reasoning. Each word in Ξ£2βˆ— may be extended to a word in Ξ£3βˆ— by appending either an Ξ± or an Ο‰ onto the end. So there must be twice as many words in Ξ£3βˆ— as in Ξ£2βˆ—, i.e. |Ξ£3βˆ—|=8.

Total count.

Using the Addition Rule, we obtain the total by adding up our preliminary results:
|Σ≀3βˆ—|=1+2+4+8=15.
Another common strategy in mathematics is to consider the opposite.

Example 20.2.5. Counting by counting the complement.

For alphabet Ξ£={a,b,c,…,y,z}, how many words in Ξ£2βˆ— do not begin with the letter a? It’s much easier to count the number of words in Ξ£2βˆ— that do begin with a, as there are only 26 possibilities for the second letter.
Later in this chapter we will learn a rule that will allow us to easily calculate the total number of words in Ξ£2βˆ— to be 262 (see Worked Example 20.3.10). Accepting this fact for the moment, we can then use the Subtraction Rule to compute
#{2-letter words not beginning with a}=|Ξ£2βˆ—|βˆ’#{2-letter words beginning with a}=262βˆ’26=26(26βˆ’1)=26β‹…25.