› Forums › Statistics › Q&A: Understanding Inclusion–Exclusion in Alice’s Class Scheduling Problem
- This topic is empty.
-
AuthorPosts
-
December 11, 2025 at 11:20 am #5858
Q&A: Understanding Inclusion–Exclusion in Alice’s Class Scheduling Problem
Inclusion – exclusion method and complement in probability theory
byu/DigitalSplendid inlearnmathComment
byu/DigitalSplendid from discussion
inprobabilitytheoryQ&A: Understanding Inclusion–Exclusion in Alice’s Class Scheduling Problem
Question:
Alice must choose 7 classes out of 30 available classes. Each class meets on one of the five weekdays, and there are exactly 6 classes per day. She selects 7 classes uniformly at random. What is the probability that her final schedule includes at least one class on each of the five days?
I understand the direct counting method, but I’m confused about how the inclusion–exclusion method works. In particular:
- Why does the total number of outcomes use “30 choose 7”?
- Why don’t we include day-structure inside “30 choose 7”?
- How do terms like “24 choose 7” and “18 choose 7” correctly represent the complement events?
- Does the complement operation automatically take care of the day assignments?
Answer:
Yes — inclusion–exclusion handles the day-structure automatically. Here’s the reasoning broken down clearly.
1. Why is the total number of possible selections equal to “30 choose 7”?
Because there are 30 distinct classes, and Alice picks 7 distinct classes.
Even though classes belong to different weekdays, this does not change the fact that each class is a separate item.
For example:- “History (Monday)”
- “Physics (Tuesday)”
- “Economics (Thursday)”
are three different classes, so choosing 7 classes from the catalog is simply:
ways to pick 7 items from 30 distinct items
= “30 choose 7”The day of the week is already encoded in the identity of each class.
2. What are we trying to count with inclusion–exclusion?
We want:
selections that include at least one class on each of the five days.
It is difficult to count this directly, so we count the complement:
selections that leave at least one day with zero classes.
This is much easier to describe and count.
3. Why does “24 choose 7” appear?
If one day is empty, for example Monday:
- All 7 classes must come from the remaining 24 classes on Tue–Fri.
So the number of selections with Monday empty is:
“24 choose 7”
There are 5 possible days that could be empty, so we get:
5 × “24 choose 7”
This is the first inclusion–exclusion term.
4. Why does “18 choose 7” appear?
If two days are empty, for example Monday and Tuesday:
- All 7 classes must come from the remaining 18 classes on Wed–Thu–Fri.
So one such case contributes:
“18 choose 7”
There are “5 choose 2” = 10 such pairs of empty days, giving:
10 × “18 choose 7”
This term must be subtracted because inclusion–exclusion corrects the overcounting from the previous step.
5. Why does “12 choose 7” appear?
If three days are empty, for example Mon–Tue–Wed:
- Alice must choose 7 classes from the remaining 12 classes on Thu–Fri.
So one case contributes:
“12 choose 7”
There are “5 choose 3” = 10 such triples, so:
10 × “12 choose 7”
This term is added back, because inclusion–exclusion alternates signs.
6. Why do we stop at “12 choose 7”?
If four days were empty, she would need to pick 7 classes from the remaining 6 classes on just one day. That is impossible. Therefore:
all terms beyond “12 choose 7” are zero.
7. So how does inclusion–exclusion give the number of “bad” selections?
Bad selections (those with at least one empty day) equal:
- 5 × (24 choose 7)
- minus 10 × (18 choose 7)
- plus 10 × (12 choose 7)
- remaining terms are zero
8. How does this relate to “30 choose 7”?
Total selections = “30 choose 7”
Good selections = total minus bad
So:
Number of good selections
= “30 choose 7”
− [5 × (24 choose 7) − 10 × (18 choose 7) + 10 × (12 choose 7)]Probability = (good selections) / (“30 choose 7”)
It evaluates to roughly 30.2%.
9. Does the complement method automatically capture which class belongs to which day?
Yes.
When we remove all 6 classes from Monday (or any day), we remove:- exactly those classes that meet on that day
- and only those classes
Thus:
- “24 choose 7”, “18 choose 7”, and “12 choose 7” naturally reflect the day-structure
- because they reduce the pool to the remaining days only
- without needing any extra encoding inside “30 choose 7”
Inclusion–exclusion uses the day labels that are already part of each class’s identity.
**Final Summary **
- “30 choose 7” counts all possible schedules Alice may choose.
- Terms like “24 choose 7”, “18 choose 7”, and “12 choose 7” count schedules that leave 1, 2, or 3 days empty.
- Inclusion–exclusion correctly adds and subtracts these to ensure each “bad” schedule is counted once.
- Subtracting the total number of bad schedules from “30 choose 7” gives the number of valid schedules with at least one class on each weekday.
- The probability is about 30.2%.
-
AuthorPosts
- You must be logged in to reply to this topic.

