Activity Overview
Students act as postmen sorting mail by PIN code for 5 districts. They discover that sorting all 50 letters one by one is slow — and design a faster two-step algorithm. Bubble vs. bucket sort!
💡 Teacher Tip
Don't tell students about bucket sort beforehand — let them invent it! The discovery moment ('what if we first split into 5 groups?') is far more powerful than being told the answer. Your job is to ask the right questions.
Learning Objectives
- ✓ Experience the difference between efficient and inefficient sorting
- ✓ Design and compare two different sorting algorithms
- ✓ Discover the concept of bucket sort through hands-on activity
- ✓ Understand that algorithm choice affects speed even with the same data
Materials Needed
50 envelope cards with PIN codes 5 labelled district bins Stopwatch Tally chart Whiteboard for tracking times
Step-by-Step Instructions
Setup (5 min) — Distribute 50 envelope cards (each with a PIN starting 110xxx, 400xxx, 560xxx, 700xxx, or 600xxx) and 5 district bins.
Round 1 — No Strategy (8 min) — Time each group sorting all 50 letters one at a time, checking each PIN individually. Record time.
Reflection (5 min) — 'That was slow! Why? What pattern do you notice about the PIN codes?' Students discover the first digit tells them the district.
Design Round 2 Algorithm (5 min) — Groups plan a faster approach: first sort by first digit into 5 rough piles, then sort within each pile.
Round 2 — Optimised (8 min) — Execute the new algorithm. Time it. Compare with Round 1. How much faster?
Discuss Bubble vs Bucket Sort (7 min) — Teacher introduces terminology: Round 1 = bubble sort-like. Round 2 = bucket sort. Draw the difference on the board.
Extension (7 min) — 'What if you had 5,000 letters? Which algorithm wins by more? Why does scale matter?'
CT Pillar Connections
Algorithmic Thinking
Students design, test, and compare two distinct algorithms for the same task — experiencing that multiple correct solutions can have very different performance.
Pattern Recognition
Recognising that PIN codes share a first-digit pattern unlocks a dramatically faster algorithm — pattern recognition directly enables algorithmic optimisation.
Discussion Questions
- Why did the second algorithm work faster even though we sorted the same letters?
- If the PIN codes had no pattern at all, which algorithm would you choose?
- How do you think India Post sorts millions of letters every day?
- Can you think of another real-life sorting problem where bucket sort would help?