The Art of Counting
Navigating Divisibility
Welcome, future engineer! Today, we are not just solving a problem; we are embarking on a journey of logical organization. Imagine you are standing in front of a massive library containing all 3-digit numbers, from 100 to 999.
Your task is to filter this library, keeping only the books that meet specific criteria. This is the essence of set theory and the Principle of Inclusion-Exclusion.
Phase 1
Defining the Universe
First, let us define our universe. We are looking at 3-digit numbers, where the smallest is 100 and the largest is 999.
To find the total count, we use the simple formula:
Total=999−100+1=900
This is our search space. We are looking for numbers divisible by 2 or 3, but we have a strict 'no-go' zone: numbers divisible by 7.
Phase 2
The Power of Two and Three
Let A be the set of numbers divisible by 2, and B be the set of numbers divisible by 3. To find n(A), we look at the sequence 100,102,…,998.
Using the AP formula
l=a+(n−1)d, we get:
998=100+(n−1)2⇒n(A)=450
Similarly, for
B, the sequence is
102,105,…,999. Applying the same logic:
999=102+(n−1)3⇒n(B)=300
If we simply add these, we double-count the multiples of 6. The intersection n(A∩B) consists of multiples of 6: 102,108,…,996.
Solving the sequence:
996=102+(n−1)6⇒n(A∩B)=150
Thus, the number of elements in
A∪B is:
n(A∪B)=450+300−150=600
Phase 3
The Intruder
Now, we must address the constraint: no multiples of 7. Let C be the set of numbers divisible by 7.
We need to remove any number from our set of 600 that is also in C. This means we need to find the size of (A∪B)∩C, which is equivalent to (A∩C)∪(B∩C).
First, let's find
n(A∩C), the multiples of 14:
112,126,…,994.
994=112+(n−1)14⇒n(A∩C)=64
Next,
n(B∩C), the multiples of 21:
105,126,…,987.
987=105+(n−1)21⇒n(B∩C)=43
Finally, the triple intersection
n(A∩B∩C), the multiples of 42:
126,168,…,966.
966=126+(n−1)42⇒n(A∩B∩C)=21
Phase 4
The Final Subtraction
Using the Principle of Inclusion-Exclusion for the 'bad' numbers:
n((A∩C)∪(B∩C))=64+43−21=86
These 86 numbers are the intruders that must be removed from our initial 600. The final calculation is:
600−86=514
We have successfully filtered the library! The elegance of this method lies in its systematic approach. By breaking down complex constraints into manageable intersections, we turn a daunting problem into a clear, logical path.