Move Evicted Keys Between Two Tables
Resolve two-address collisions while preserving every evicted key.
Adult planning suggestion: about 9–12 · Logic & rule checking
- Players
- 2–4; cooperate, then exchange the checker role
- Time
- 15–25 minutes
- Materials
- Paper, pencil and the supplied player sheet; keep the host sheet separate.
Prepare
Make tables L and R with slots 0,1,2, initially empty. A key has one permitted slot in each table according to the player lookup table. It must appear once across both tables, not in both.
Follow the rule
Insert a new key at its L address. If occupied, replace the resident and carry that resident to its R address; after an R eviction carry the evicted key to L. Continue until a vacant slot is reached.
Check each step
Record every displacement and the one key held outside. Stop after 12 displacements or an exact repeated state; label unresolved, retain the held key and the full set, and restore the previous completed table.
Worked example
Insert A,B,C,D in that order, checking lookup after each completed insertion. Then attempt E from a copy of that state. Empty slots do not guarantee placement if none of these keys can use them.
Finish and adapt
Finish with a valid table or a correctly recorded failed insertion. Real implementations may rebuild with new hash functions; this kit does not silently invent new addresses or discard the unplaced key.
Purpose, observation and provenance
Within this activity: Resolve two-address collisions while preserving every evicted key.
Ask the checker to name a particular rule and show the recorded evidence. Speed alone is not the goal.
Our rules, examples and printable diagrams are separately prepared. The earliest inventor of the broader mechanism is not established here.
Yale / James Aspnes · Cuckoo Hashing — Mechanism background only. Our small paper instance and role rotation are separate; no endorsement or unique-solution claim.
Secondary practice: Cooperation and explaining a check.
For a class of 30, use ten groups of three. Prepare one player-material set per group and keep the host key with the adult. Rotate operator, recorder and checker after each worked example; a reader or scribe may help without choosing answers. Avoid public ranking or diagnostic labels.
Age bands are planning suggestions. Background references may address older learners and do not validate suitability for this age band. Goals describe observable actions, not measured long-term gains or institutional endorsement.
Free alternative: Copy the supplied grids, labels and cards onto reused paper. No specialist product is needed. Adults may prepare pieces or act as a scribe.
Printable materials
Preview at 100% scale, with browser headers and footers off. Cut with suitable help. Keep host keys separate. This is a manual tabletop kit, not an online opponent, automatic judge or solver.
Move Evicted Keys Between Two Tables · Player materials
Make tables L and R with slots 0,1,2, initially empty. A key has one permitted slot in each table according to the player lookup table. It must appear once across both tables, not in both.
Insert a new key at its L address. If occupied, replace the resident and carry that resident to its R address; after an R eviction carry the evicted key to L. Continue until a vacant slot is reached.
Record every displacement and the one key held outside. Stop after 12 displacements or an exact repeated state; label unresolved, retain the held key and the full set, and restore the previous completed table.
| Key / 键 | L address / L址 | R address / R址 |
|---|---|---|
| A | 0 | 0 |
| B | 0 | 1 |
| C | 1 | 0 |
| D | 1 | 1 |
| E | 0 | 0 |
| Step / cell | Decision / value | Rule checked |
|---|---|---|
| ________ | ________ | ________ |
| ________ | ________ | ________ |
| ________ | ________ | ________ |
| ________ | ________ | ________ |
Move Evicted Keys Between Two Tables · Host key — keep separate
After A–D: L0=A,L1=D,R0=C,R1=B; L2/R2 empty. All five keys A–E can use only four slots L0/L1/R0/R1, so E cannot be added without changing addresses or capacity.
Lead and check
Make tables L and R with slots 0,1,2, initially empty. A key has one permitted slot in each table according to the player lookup table. It must appear once across both tables, not in both.
Insert a new key at its L address. If occupied, replace the resident and carry that resident to its R address; after an R eviction carry the evicted key to L. Continue until a vacant slot is reached.
Record every displacement and the one key held outside. Stop after 12 displacements or an exact repeated state; label unresolved, retain the held key and the full set, and restore the previous completed table.
Insert A,B,C,D in that order, checking lookup after each completed insertion. Then attempt E from a copy of that state. Empty slots do not guarantee placement if none of these keys can use them.
Finish with a valid table or a correctly recorded failed insertion. Real implementations may rebuild with new hash functions; this kit does not silently invent new addresses or discard the unplaced key.
Classroom: ten trios for 30 learners; one kit per trio. Rotate operator, recorder and checker. Age guidance is a planning suggestion; prerequisite support may be necessary.