Here is a puzzle (which I am sure somebody must have studied in TCS):
Suppose I have $x$ balls, each having a unique $O(\log x)$ bit name (the names have no structure). These balls are distributed into $y$ boxes, each box containing equal number of balls.
I want to name each of the boxes such that, given the name of one of the balls, I can identify the box that contains the ball?
What is the minimum number of bits required to name the boxes? How does the solution change if some balls have similar names (i.e., if names are not unique)?