Module 2.7 · Counting and Probability
Venn diagrams and overlapping sets
When two groups overlap, adding their sizes counts the overlap twice. Venn diagrams make the overlap visible, and the inclusion-exclusion formula fixes the double count. Survey problems ("how many students play both?") and "divisible by or " problems both live here.
Two sets
Picture two overlapping circles, one for each group. The lens in the middle is the set of things in both groups.
If you add and , everyone in the lens is counted twice. Subtract it once.
Inclusion-exclusion for two sets
and
Here is the number in or (or both) and is the number in both.
Worked example: A survey
In a class of students, play soccer, play basketball and play neither. How many play both?
The number who play at least one sport is . So , which gives both .
To draw the Venn diagram, fill in from the middle out: in the lens, soccer only, basketball only, and outside. Check: .
Worked example: Divisible by 2 or 3
How many integers from to are divisible by or ?
Divisible by : . Divisible by : . Divisible by both means divisible by : . So .
Three sets
For three overlapping sets, the formula adds the singles, subtracts the pairs, and adds back the triple:
The last term is there because the center region is added times, then subtracted times, so it needs to be added back once.
In practice, it is often easier to fill in a three-circle Venn diagram from the center outward, especially when the question asks about "exactly one" or "only" regions.
Worked example: Three languages
Of students, take French, take Spanish and take Latin. Also take French and Spanish, take French and Latin, take Spanish and Latin, and take all three. How many take none of these languages? How many take only French?
Union: . So take none.
For only French, work from the center. The center has . French and Spanish only: . French and Latin only: . So only French is .
Common mistake
"Both" numbers usually include people in all three groups. If take French and Spanish, and take all three, then only are in the French-and-Spanish-but-not-Latin region. Subtract the center before filling in pair regions.
Tip
For the smallest possible overlap of two groups, push them apart: the overlap is at least (or if that's negative). The largest possible overlap is the size of the smaller group.
Practice
In a class of students, have a dog, have a cat and have both. How many have neither a dog nor a cat?
Enter a number. Fractions like 3/4 and sqrt(2) are OK.
How many integers from to are divisible by or by ?
Enter a number. Fractions like 3/4 and sqrt(2) are OK.
How many integers from to are divisible by neither nor ?
Enter a number. Fractions like 3/4 and sqrt(2) are OK.
In a class of students, play an instrument, sing in the choir, and do neither. How many students both play an instrument and sing in the choir?
In a group of people, like coffee and like tea. What is the smallest possible number of people who like both?
Enter a number. Fractions like 3/4 and sqrt(2) are OK.
In a class, students like at least one of pizza and tacos. Twice as many students like pizza as like tacos, and like both. How many like pizza but not tacos?
Enter a number. Fractions like 3/4 and sqrt(2) are OK.
A survey of students found that like math, like science and like art. Also like math and science, like math and art, like science and art, and like all three. How many students like exactly one of the three subjects?
Enter a number. Fractions like 3/4 and sqrt(2) are OK.
How many integers from to are divisible by at least one of , and ?
Real contest practice
- 2011 AMC 8, Problem 6: car owners and motorcycle owners in a town.
- 2015 AMC 8, Problem 15: votes on two issues, and how many voted for both.
- 2007 AMC 8, Problem 13: two equal-size sets with a known union and intersection.