Section 20.2 Addition and subtraction rules
As usual in mathematics, breaking a big problem into smaller parts is a useful strategy.
Proof idea.
After recalling the definition of disjoint union, Statement 1 should be obvious. To prove Statement 2, apply Statement 1 to the following disjoint unions:
Then combine the resulting equalities of cardinalities.
Remark 20.2.2.
Worked Example 20.2.3. Counting by breaking into cases.
Solution.
Count
Count
Count
Count
Write to mean the set of words in alphabet of length or less. Then
so we can break into cases based on length and then apply the Addition Rule.
Count .
There is only one word of length the empty word. So
Count .
There are only two words of length the single-letter words and So
Count .
We can count be simply listing the elements:
So
Count .
This time we will just use inductive reasoning. Each word in may be extended to a word in by appending either an or an onto the end. So there must be twice as many words in as in i.e.
Total count.
Using the Addition Rule, we obtain the total by adding up our preliminary results:
Another common strategy in mathematics is to consider the opposite.
Theorem 20.2.4. Subtraction Rule.
Proof idea.
Since is always true, simply apply Statement 1 of Theorem 20.2.1 to this disjoint union and rearrange to isolate
Example 20.2.5. Counting by counting the complement.
For alphabet how many words in do not begin with the letter Itβs much easier to count the number of words in that do begin with as there are only 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 to be (see Worked Example 20.3.10). Accepting this fact for the moment, we can then use the Subtraction Rule to compute