Week 8
Counting & Combinatorics — Interactive Games
🎨 Game 1 — The Multiplicative Principle
Design your hackathon T-shirt by choosing one option from each category.
Watch how each new choice multiplies the total number of outcomes.
Step 1 — Shirt Colour
Step 2 — Size
Step 3 — Logo
Total Combinations
4
Colours
×
3
Sizes
×
3
Logos
=
36
Total
Your selection:
— pick one from each row —
Experiment — Add / Remove Options
See how the total changes when options are added or removed from each step.
Colours:4
Sizes:3
Logos:3
Key idea: Each independent choice multiplies the total. Adding just 1 extra colour takes us from
4×3×3=36 to 5×3×3=45 — a jump of 9, not 1.
This is why passwords get exponentially stronger with each extra character type allowed.
🐦 Game 2 — Pigeonhole Principle
Distribute students into hackathon rooms. The principle says: if you have more students than rooms,
at least one room must be overcrowded — no matter how cleverly you arrange them.
Controls
Rooms
Pigeonhole Verdict
Set the sliders and click Distribute to see the principle in action.
13
Students
3
Rooms
—
⌈n/k⌉ guarantee
—
Actual max
Can you beat the principle?
Try dragging the sliders so there are more students than rooms. No matter how you distribute them,
the principle guarantees at least one room has ⌈students/rooms⌉ people. Click distribute many times — does the guarantee always hold?
Formula: With n students and k rooms,
at least one room holds ≥ ⌈n/k⌉ students. This is unavoidable — it's a mathematical certainty, not a probability.
⚖️ Game 3 — Permutations vs Combinations
Select people from the hackathon pool below. Toggle between Award Mode (order matters — Gold, Silver, Bronze)
and Committee Mode (order doesn't matter). See how the count changes!
Mode
Award Mode: You're assigning Gold, Silver, Bronze — order matters!
Picking Alice 1st, Bob 2nd is different from Bob 1st, Alice 2nd.
Use P(n,r) = n!/(n−r)!
Hackathon Teams — click to select (pick up to 3)
Your Selection
No one selected yet
Pool size (n) and selection size (r)
Pool (n)
10
→
Select (r)
3
P(n,r) — ordered (Award)
720
P(10,3) = 10×9×8
C(n,r) — unordered (Committee)
120
C(10,3) = 720 / 3!
Why is P always bigger?
P / C = 3! = 6 orderings per group
Key question to ask yourself: "Does swapping two chosen people give a different result?"
If YES (awards) → use P(n,r). If NO (committees) → use C(n,r).
C is always P divided by r! because we don't care about the internal ordering.
🎰 Game 4 — Probability Lab
The hackathon draws 1 student at random for a prize. There are 12 🔴 Computing students and 18 🔵 others.
Run the draw and watch the experimental probability converge to the theoretical value.
The Pool (30 students)
No draw yet.
Draw History
🔴 = Computing student won | 🔵 = Other student won
Results after 0 draws
0
🔴 Computing wins
0
🔵 Other wins
—
Experimental P(C)
Experimental vs Theoretical
0%
Experimental P(Computing)
40%
Theoretical P = 12/30
0%
Experimental P(Other)
🔢 Challenge — Team Draw
What if we draw a 3-person committee instead of 1 person?
What's the probability all 3 are Computing students?
Law of Large Numbers: As the number of trials grows, the experimental probability gets closer to the theoretical value.
With just 10 draws you'll see big swings; with 100+ draws the bars converge.
Theoretical probability = 12/30 = 0.4 for a Computing student winning.