information:filtering, structural:scholar_edition
Balls and boxes

Traditionally many of the problems in the twelvefold way have been formulated in terms of placing balls in boxes (or some similar visualization) instead of defining functions. The set N can be identified with a set of balls, and X with a set of boxes; the function f: N → X {\displaystyle f:N\to X} then describes a way to distribute the balls into the boxes, namely by putting each ball a into box f (a) {\displaystyle f(a)}. A function ascribes a unique image to each value in its domain; this property is reflected by the property that any ball can go into only one box (together with the requirement that no ball should remain outside of the boxes), whereas any box can accommodate an arbitrary number of balls. Requiring in addition f {\displaystyle f} to be injective means forbidding to put more than one ball in any one box, while requiring f {\displaystyle f} to be surjective means insisting that every box contain at least one ball.

Counting modulo permutations of N or X is reflected by calling the balls or the boxes, respectively, "indistinguishable". This is an imprecise formulation, intended to indicate that different configurations are not to be counted separately if one can be transformed into the other by some interchange of balls or of boxes. This possibility of transformation is formalized by the action by permutations.