CSC165 ยท 2080 ยท 5 marks
Explain the principle of inclusion and exclusion. How many integers from 1 to 30 are multiples of 2 or 3?
Explain the principle of inclusion and exclusion. How many integers from 1 to 30 are multiples of 2 or 3? [5]
Principle of Inclusion and Exclusion
Given Data
- Range of integers: 1 to 30
- Divisibility conditions: multiples of 2 or multiples of 3
Statement of the Principle
The Principle of Inclusion and Exclusion is a counting technique for finding the number of elements in the union of finite sets. When we add the sizes of individual sets, elements common to more than one set get counted multiple times. The principle corrects this overcounting by systematically including individual set sizes, excluding pairwise intersections, including triple intersections, and so on.
For Two Sets:
$$n(A \cup B) = n(A) + n(B) - n(A \cap B)$$
For Three Sets:
$$n(A \cup B \cup C) = n(A) + n(B) + n(C) - n(A \cap B) - n(A \cap C) - n(B \cap C) + n(A \cap B \cap C)$$
The alternating signs (add odd-order intersections, subtract even-order... precisely: single sets +, pairs -, triples +) ensure each element is counted exactly once.
Application: Multiples of 2 or 3 from 1 to 30
Step 1: Define sets
- $A$ = multiples of 2 in $[1,30]$
- $B$ = multiples of 3 in $[1,30]$
We need $n(A \cup B)$.
Step 2: Multiples of 2 $$n(A) = \left\lfloor \frac{30}{2} \right\rfloor = 15$$
Step 3: Multiples of 3 $$n(B) = \left\lfloor \frac{30}{3} \right\rfloor = 10$$
Step 4: Multiples of both 2 and 3 (i.e. multiples of $\text{lcm}(2,3)=6$) $$n(A \cap B) = \left\lfloor \frac{30}{6} \right\rfloor = 5$$
Step 5: Apply the principle $$n(A \cup B) = n(A) + n(B) - n(A \cap B) = 15 + 10 - 5 = 20$$
$$\boxed{n(A \cup B) = 20}$$
Verification list: $${2,3,4,6,8,9,10,12,14,15,16,18,20,21,22,24,26,27,28,30}$$ Counting these gives exactly 20 integers. โ
Conclusion
csc165-venn-multiples-30
There are 20 integers between 1 and 30 that are multiples of 2 or 3.
Short on time? The 1, 5 and 10 mark versions of this answer, flashcards and practice sets come with a program pass.