∑ MockTestKart
⌂

0 0 0
Complete Formula Lesson

Set Operations & Venn Diagrams: Master the Inclusion-Exclusion Principle

This lesson explains how to solve two-set word problems using the inclusion-exclusion principle. You will learn to find unions, intersections, and 'neither' counts, with fully worked examples and common pitfalls.

On this page
  1. Understanding Sets and Venn Diagrams
  2. Inclusion-Exclusion Principle for Two Sets
  3. Finding the Number of Elements in Neither Set
  4. Finding the Intersection When 'Neither' is Known
  5. When to Use Each Formula
  6. Derivation and Intuitive Proof
  7. Shortcuts and Alternate Methods
  8. Common Traps and How to Avoid Them
  9. Worked examples
  10. Common mistakes
  11. Frequently asked questions

Set operations are fundamental in mathematics and appear in everyday reasoning. The inclusion-exclusion principle lets you count elements in overlapping sets without double-counting. This lesson covers the key formulas for two sets, their derivations, and how to apply them to word problems. You will also learn to avoid common mistakes and use Venn diagrams as a visual aid.

Key Formulas for Two Sets
Unionn(A∪B) = n(A) + n(B) - n(A∩B)
Neithern(neither) = Total - [n(A) + n(B) - n(A∩B)]
Intersection (given neither)n(A∩B) = n(A) + n(B) + n(neither) - Total
Intersection (given union)n(A∩B) = n(A) + n(B) - n(A∪B)
GivenFindFormula
n(A), n(B), n(A∩B)n(A∪B)n(A) + n(B) - n(A∩B)
Total, n(A), n(B), n(A∩B)n(neither)Total - [n(A) + n(B) - n(A∩B)]
Total, n(A), n(B), n(neither)n(A∩B)n(A) + n(B) + n(neither) - Total
n(A), n(B), n(A∪B)n(A∩B)n(A) + n(B) - n(A∪B)
1Identify the universal set and total number of elements.
2Label the two sets A and B and note their sizes.
3Determine what is given: intersection, union, or neither.
4Choose the appropriate formula or use a Venn diagram.
5Compute the unknown quantity.
6Verify that all regions sum to the total and no count is negative.
ad = a√2
Venn diagram for two sets: rectangle represents universal set; two overlapping circles represent A and B; overlap is A∩B; outside both is 'neither'.

Understanding Sets and Venn Diagrams

A set is a collection of distinct objects. The universal set (often denoted U) contains all elements under consideration. For two sets A and B, we define: n(A) = number of elements in A, n(B) = number in B, n(A∩B) = number in both (intersection), n(A∪B) = number in either A or B or both (union). A Venn diagram uses overlapping circles inside a rectangle (the universal set) to show these relationships. The overlap region represents A∩B, while the combined area of the circles represents A∪B. The region outside both circles represents 'neither A nor B'.

  • Universal set U: all elements in the problem.
  • n(A): count of elements in set A.
  • n(A∩B): count of elements in both A and B.
  • n(A∪B): count of elements in A or B or both.
  • n(neither): count of elements outside both A and B.
A ∩ B = {x : x ∈ A and x ∈ B}

Inclusion-Exclusion Principle for Two Sets

The number of elements in the union of two sets is given by n(A∪B) = n(A) + n(B) - n(A∩B). This formula corrects for double-counting: when we add n(A) and n(B), elements in the intersection are counted twice, so we subtract n(A∩B) once. This principle is the foundation for all two-set counting problems. It works for any finite sets.

  • Add individual sizes: n(A) + n(B).
  • Subtract the overlap: n(A∩B).
  • Result is the union size: n(A∪B).
  • Valid for any two sets, no restrictions.
n(A∪B) = n(A) + n(B) - n(A∩B)

Finding the Number of Elements in Neither Set

In many word problems, you are given the total number of elements in the universal set and asked how many are in neither A nor B. Since the universal set is partitioned into those in A∪B and those outside it, we have: Total = n(A∪B) + n(neither). Therefore, n(neither) = Total - n(A∪B). Substituting the inclusion-exclusion formula gives n(neither) = Total - [n(A) + n(B) - n(A∩B)]. This is the key formula for 'neither' problems.

  • Total = n(A∪B) + n(neither).
  • Rearrange: n(neither) = Total - n(A∪B).
  • Substitute n(A∪B) from inclusion-exclusion.
  • Use when total and both set sizes are known.
n(neither A nor B) = Total - [n(A) + n(B) - n(A∩B)]

Finding the Intersection When 'Neither' is Known

Sometimes you know the total, the sizes of A and B, and the number in neither, but you need the intersection. Starting from Total = n(A∪B) + n(neither) and n(A∪B) = n(A) + n(B) - n(A∩B), we get: Total = n(A) + n(B) - n(A∩B) + n(neither). Solving for n(A∩B): n(A∩B) = n(A) + n(B) + n(neither) - Total. This rearranged form is very useful when the overlap is the unknown.

  • Start with Total = n(A∪B) + n(neither).
  • Replace n(A∪B) with n(A)+n(B)-n(A∩B).
  • Solve for n(A∩B).
  • Check that the result is non-negative and ≤ min(n(A), n(B)).
n(A∩B) = n(A) + n(B) + n(neither) - Total

When to Use Each Formula

Choose the formula based on what is given and what is asked. If you need the union and know both sets and their intersection, use n(A∪B) = n(A)+n(B)-n(A∩B). If you need 'neither' and know total, both sets, and intersection, use n(neither) = Total - [n(A)+n(B)-n(A∩B)]. If you need the intersection and know total, both sets, and 'neither', use n(A∩B) = n(A)+n(B)+n(neither)-Total. Always identify the knowns and the unknown first.

  • Union: known A, B, intersection.
  • Neither: known total, A, B, intersection.
  • Intersection: known total, A, B, neither.
  • Always check that the answer makes sense in context.
See above formulas.

Derivation and Intuitive Proof

The inclusion-exclusion principle can be proven by partitioning the union into three disjoint regions: elements only in A, only in B, and in both. Let x = n(only A), y = n(only B), z = n(A∩B). Then n(A) = x + z, n(B) = y + z, and n(A∪B) = x + y + z. Adding n(A) and n(B) gives x + y + 2z, which counts the intersection twice. Subtracting z once gives x + y + z = n(A∪B). Thus n(A∪B) = n(A) + n(B) - n(A∩B). This proof shows why the formula works for any finite sets.

  • Partition union into three disjoint parts.
  • Express n(A) and n(B) in terms of parts.
  • Show double-counting of intersection.
  • Subtract one copy to correct.
n(A∪B) = (x+z) + (y+z) - z = x+y+z

Shortcuts and Alternate Methods

For two-set problems, you can often solve by filling in a Venn diagram. Start with the intersection, then find the 'only A' and 'only B' counts by subtracting the intersection from each set size. The sum of these three regions is the union. The 'neither' count is total minus union. This method is equivalent to the formulas but can be faster and less error-prone. Another shortcut: if you know n(A), n(B), and n(A∪B), then n(A∩B) = n(A)+n(B)-n(A∪B). This is just the inclusion-exclusion formula rearranged.

  • Venn diagram method: fill intersection first.
  • Only A = n(A) - n(A∩B).
  • Only B = n(B) - n(A∩B).
  • Union = only A + only B + intersection.
  • Neither = total - union.
n(A∩B) = n(A) + n(B) - n(A∪B)

Common Traps and How to Avoid Them

A frequent mistake is to add n(A) and n(B) without subtracting the intersection, leading to an overcount. Another is to confuse 'neither' with 'not in A or not in B' (which is the complement of the intersection). Also, ensure that the intersection is not larger than either set. When using the formula for intersection given 'neither', check that the result is non-negative. Always verify that the sum of all regions equals the total. Drawing a Venn diagram helps catch these errors.

  • Do not forget to subtract the intersection when finding union.
  • 'Neither' means outside both sets, not outside one.
  • Intersection cannot exceed the smaller set size.
  • Check that all regions sum to the total.
  • Use a Venn diagram to visualize and verify.
n(A∩B) ≤ min(n(A), n(B))

Worked examples

In a class of 50 students, 30 play cricket, 25 play football, and 10 play both. How many students play neither?
Show solution

Identify: Total = 50, n(C) = 30, n(F) = 25, n(C∩F) = 10.

Use n(neither) = Total - [n(C) + n(F) - n(C∩F)]. Compute: n(C∪F) = 30 + 25 - 10 = 45. Then n(neither) = 50 - 45 = 5.

5 students play neither.
In a class of 60 students, 40 play cricket, 30 play football, and 20 play both. How many students play neither?
Show solution

Total = 60, n(C) = 40, n(F) = 30, n(C∩F) = 20. n(C∪F) = 40 + 30 - 20 = 50. n(neither) = 60 - 50 = 10.

10 students play neither.
In a class of 80 students, 50 passed in Mathematics, 40 passed in Science, and 30 passed in both. How many students failed in both subjects?
Show solution

Total = 80, n(M) = 50, n(S) = 40, n(M∩S) = 30. n(M∪S) = 50 + 40 - 30 = 60. Failed in both = neither = 80 - 60 = 20.

20 students failed in both.
In a class of 60 students, 40 like cricket, 30 like football, and 10 like neither. How many students like both cricket and football?
Show solution

Total = 60, n(C) = 40, n(F) = 30, n(neither) = 10.

Use n(C∩F) = n(C) + n(F) + n(neither) - Total = 40 + 30 + 10 - 60 = 20.

20 students like both.
If A = {1, 2, 3} and B = {2, 3, 4}, what is A ∩ B?
Show solution

List elements common to both sets. A has 1,2,3; B has 2,3,4. Common elements are 2 and 3.

A ∩ B = {2, 3}.
In a group of 100 people, 60 like tea, 50 like coffee, and 30 like both. How many people like neither tea nor coffee?
Show solution

Total = 100, n(T) = 60, n(C) = 50, n(T∩C) = 30. n(T∪C) = 60 + 50 - 30 = 80. n(neither) = 100 - 80 = 20.

20 people like neither.
In a class of 40 students, 25 play cricket and 20 play football, and 10 play both. How many play neither game?
Show solution

Total = 40, n(C) = 25, n(F) = 20, n(C∩F) = 10. n(C∪F) = 25 + 20 - 10 = 35. n(neither) = 40 - 35 = 5.

5 students play neither.

Common mistakes

  • Adding n(A) and n(B) without subtracting n(A∩B) when finding the union.
  • Confusing 'neither' with 'not in A or not in B' (which is the complement of the intersection).
  • Assuming the intersection is always given; sometimes it must be calculated.
  • Using the formula for intersection given 'neither' without checking that the result is non-negative.
  • Forgetting that the total includes all elements, including those in neither set.
  • Miscalculating the 'only A' or 'only B' regions by not subtracting the intersection.

Frequently asked questions

What is the inclusion-exclusion principle?

It is a counting technique that finds the size of the union of two sets by adding their individual sizes and subtracting the size of their intersection. This corrects for double-counting elements that belong to both sets.

How do I find the number of elements in neither set?

Subtract the union from the total: n(neither) = Total - n(A∪B). If the union is not given, first compute it using n(A∪B) = n(A) + n(B) - n(A∩B).

Can I use a Venn diagram instead of formulas?

Yes, a Venn diagram is often easier. Fill in the intersection first, then compute 'only A' and 'only B' by subtracting the intersection from each set size. The sum of these three regions is the union, and the remainder to the total is 'neither'.

What if the intersection is larger than one of the sets?

That is impossible for valid data. The intersection cannot exceed the size of either set. If your calculation gives such a result, recheck the given numbers or your arithmetic.

How do I find the intersection if I know the total, both set sizes, and the number in neither?

Use the rearranged formula: n(A∩B) = n(A) + n(B) + n(neither) - Total. This comes from combining Total = n(A∪B) + n(neither) with the inclusion-exclusion principle.

What is the difference between 'neither' and 'not in A or not in B'?

'Neither' means outside both sets, i.e., not in A and not in B. 'Not in A or not in B' is the complement of the intersection, which includes elements only in A, only in B, and neither. They are different regions.