Activity 01
Simulation Activity: Human Hash Table
Assign students numbered seats representing array slots. Give each student a card with a key; they apply a simple modulo hash function and walk to their seat. When collisions occur, the class must decide in real time whether to chain (share the seat with a list) or probe (find the next open seat). Debrief by measuring how many steps each lookup required.
How do hash collisions impact the performance of a data retrieval system?
Facilitation TipDuring the Human Hash Table activity, assign roles so students physically move and chain collisions, rotating roles to keep everyone engaged.
What to look forProvide students with a small array (size 10) and a list of 5 key-value pairs. Ask them to: 1. Choose a simple hash function (e.g., key % array size). 2. Show the resulting array after inserting all pairs using chaining. 3. Identify any collisions.