Hoffman's packing puzzle is an assembly puzzle named after Dean G. Hoffman, who described it in 1978. The puzzle consists of 27 identical rectangular cuboids, each of whose edges have three different lengths. Its goal is to assemble them all to fit within a cube whose edge length is the sum of the three lengths.

writes that the first person to solve the puzzle was David A. Klarner, and that typical solution times can range from 20 minutes to multiple hours.

Construction The puzzle itself consists only of 27 identical rectangular cuboid-shaped blocks, although physical realizations of the puzzle also typically supply a cubical box to fit the blocks into. If the three lengths of the block edges are , , and , then the cube should have edge length . Although the puzzle can be constructed with any three different edge lengths, it is most difficult when the three edge lengths of the blocks are close enough together that , as this prevents alternative solutions in which four blocks of the minimum width are packed next to each other. Additionally, having the three lengths form an arithmetic progression can make it more confusing, because in this case placing three blocks of the middle width next to each other produces a row of the correct total width but one that cannot lead to a valid solution to the whole puzzle.

Mathematical analysis Each valid solution to the puzzle arranges the blocks in an approximate grid of blocks, with the sides of the blocks all parallel to the sides of the outer cube, and with one block of each width along each axis-parallel line of three blocks. Counting reflections and rotations as being the same solution as each other, the puzzle has 21 combinatorially distinct solutions.

The total volume of the pieces, , is less than the volume of the cube that they pack into. If one takes the cube root of both volumes, and divides by three, then the number obtained in this way from the total volume of the pieces is the geometric mean of , , and , while the number obtained in the same way from the volume of the cube is their arithmetic mean. The fact that the pieces have less total volume than the cube follows from the inequality of arithmetic and geometric means.

Table of solutions The 21 distinct solutions are tabulated here as described by the references cited above .

All boxes below are entered in the format (north-south length) x (east-west length) x (up-down length), denoting the size of each box with the dimensions A, B, and C, where A < B < C. (In the above example, A = 4, B = 5, and C = 6).

All 3x3 matrices describe a set of 9 boxes, with east-west neighbors along each row and north-south neighbors down each column, with the three stacked layers being listed in sequence for each solution.

SolutionBottom layerMiddle layerTop layerSolution 01CxBxA AxCxB BxAxCBxCxA CxAxB AxBxCAxCxB BxAxC CxBxACxAxB AxBxC BxCxAAxBxC BxAxC AxCxBBxCxA CxBxA CxAxBBxAxC CxBxA AxCxBCxAxB BxCxA CxBxAAxBxC AxCxB BxAxCSolution 02CxBxA AxCxB BxAxCBxCxA CxAxB AxBxCAxCxB BxAxC CxBxACxAxB AxBxC AxCxBAxBxC BxAxC BxCxABxCxA CxBxA CxAxBBxAxC BxCxA CxBxACxAxB CxBxA AxCxBAxBxC AxCxB BxAxCSolution 03CxBxA AxCxB BxAxCBxCxA CxAxB AxBxCAxCxB BxAxC CxBxAAxBxC BxAxC BxCxACxAxB AxBxC AxCxBBxCxA CxBxA CxAxBCxAxB CxBxA AxCxBBxAxC BxCxA CxBxAAxBxC AxCxB BxAxCSolution 04CxBxA AxCxB BxAxCBxCxA CxAxB AxBxCAxCxB BxAxC CxBxAAxBxC BxAxC AxCxBCxAxB AxBxC BxCxABxCxA CxBxA CxAxBCxAxB BxCxA CxBxABxAxC CxBxA AxCxBAxBxC AxCxB BxAxCSolution 05CxBxA AxCxB CxAxBBxCxA CxBxA BxAxCAxCxB BxAxC AxBxCAxBxC BxCxA BxAxCBxAxC AxCxB CxBxACxBxA CxAxB AxCxBAxCxB BxAxC CxBxACxAxB AxBxC AxCxBBxAxC CxBxA BxCxASolution 06CxBxA AxCxB CxAxBBxCxA CxBxA BxAxCAxCxB BxAxC AxBxCAxBxC BxCxA BxAxCCxAxB AxCxB CxBxABxAxC CxBxA AxCxBAxCxB BxAxC CxBxABxAxC AxBxC AxCxBCxBxA CxAxB BxCxASolution 07CxBxA AxCxB BxAxCBxCxA CxBxA CxAxBAxCxB BxAxC AxBxCCxAxB CxBxA BxCxABxAxC AxCxB AxBxCAxBxC BxCxA CxAxBAxBxC BxAxC AxCxBCxAxB AxBxC BxCxABxCxA CxAxB CxBxASolution 08CxBxA AxCxB BxAxCBxCxA CxBxA CxAxBAxCxB BxAxC AxBxCBxAxC CxBxA BxCxACxAxB AxCxB AxBxCAxBxC BxCxA CxAxBCxAxB AxBxC AxCxBAxBxC BxAxC BxCxABxCxA CxAxB CxBxASolution 09CxBxA AxCxB BxAxCBxCxA CxBxA CxAxBAxCxB BxAxC AxBxCAxBxC BxCxA CxAxBBxAxC AxCxB AxBxCCxBxA CxAxB BxCxAAxCxB BxAxC CxBxACxAxB AxBxC BxCxABxAxC CxBxA AxCxBSolution 10CxBxA AxCxB BxAxCBxCxA CxBxA CxAxBAxCxB BxAxC AxBxCAxBxC BxCxA CxAxBCxAxB AxCxB AxBxCBxAxC CxBxA BxCxAAxCxB BxAxC CxBxABxAxC AxBxC BxCxACxBxA CxAxB AxCxBSolution 11CxBxA AxCxB BxAxCBxCxA BxAxC AxBxCAxCxB CxBxA CxAxBCxAxB AxBxC BxCxAAxBxC CxAxB AxCxBBxCxA BxAxC CxBxABxAxC CxBxA AxCxBCxAxB BxCxA CxBxAAxBxC AxCxB BxAxCSolution 12CxBxA AxCxB BxAxCBxCxA BxAxC AxBxCAxCxB CxBxA CxAxBCxAxB AxBxC AxCxBAxBxC CxAxB BxCxABxCxA BxAxC CxBxABxAxC BxCxA CxBxACxAxB CxBxA AxCxBAxBxC AxCxB BxAxCSolution 13CxBxA AxCxB BxAxCBxCxA BxAxC AxBxCAxCxB CxAxB CxBxACxAxB AxBxC AxCxBAxBxC BxCxA CxAxBBxCxA CxBxA BxAxCBxAxC CxBxA BxCxACxAxB AxCxB CxBxAAxBxC BxAxC AxCxBSolution 14CxBxA AxCxB BxAxCBxCxA BxAxC AxBxCAxCxB CxAxB CxBxABxAxC AxBxC AxCxBAxCxB CxBxA CxAxBCxBxA BxCxA BxAxCCxAxB CxBxA BxCxABxAxC AxCxB CxBxAAxBxC BxAxC AxCxBSolution 15CxBxA BxCxA CxAxBBxCxA CxAxB AxBxCAxCxB AxBxC BxAxCCxAxB AxBxC BxCxAAxBxC BxAxC AxCxBBxCxA CxBxA CxAxBBxAxC AxCxB AxBxCCxAxB BxCxA CxBxAAxBxC CxAxB BxCxASolution 16CxBxA BxCxA CxAxBBxCxA CxAxB AxBxCAxCxB AxBxC BxAxCCxAxB AxBxC BxCxAAxBxC BxAxC AxCxBBxCxA CxAxB CxBxABxAxC AxCxB AxBxCCxAxB CxBxA BxCxAAxBxC BxCxA CxAxBSolution 17CxBxA BxCxA CxAxBBxCxA CxAxB AxBxCAxCxB AxBxC BxAxCCxAxB AxCxB AxBxCAxBxC BxAxC BxCxABxCxA CxAxB CxBxABxAxC AxBxC BxCxACxAxB CxBxA AxCxBAxBxC BxCxA CxAxBSolution 18CxBxA BxCxA CxAxBBxCxA CxAxB AxBxCAxCxB AxBxC BxAxCBxAxC AxCxB AxBxCCxAxB BxCxA CxBxAAxBxC CxAxB BxCxACxAxB AxBxC BxCxAAxBxC BxAxC AxCxBBxCxA CxBxA CxAxBSolution 19CxBxA BxCxA CxAxBBxCxA CxAxB AxBxCAxCxB AxBxC BxAxCAxCxB BxAxC CxBxABxAxC AxBxC BxCxACxBxA CxAxB AxCxBAxBxC AxCxB BxAxCCxAxB CxBxA AxCxBBxAxC BxCxA CxBxASolution 20CxBxA BxCxA CxAxBBxCxA CxAxB AxBxCAxCxB AxBxC BxAxCAxCxB BxAxC CxBxABxAxC AxBxC AxCxBCxBxA CxAxB BxCxAAxBxC AxCxB BxAxCCxAxB BxCxA CxBxABxAxC CxBxA AxCxBSolution 21CxBxA BxCxA CxAxBBxCxA CxAxB AxBxCAxCxB AxBxC BxAxCAxBxC AxCxB BxAxCBxAxC BxCxA CxBxACxBxA CxAxB AxCxBAxCxB BxAxC CxBxACxAxB AxBxC AxCxBBxAxC CxBxA BxCxA

Higher dimensions

A two-dimensional analogue of the puzzle asks to pack four identical rectangles of side lengths and into a square of side length ; as the figure shows, this is always possible. In dimensions the puzzle asks to pack identical blocks into a hypercube. By a result of Raphael M. Robinson this is again solvable whenever for two numbers and such that the - and -dimensional cases are themselves solvable. For instance, according to this result, it is solvable for dimensions 4, 6, 8, 9, and other 3-smooth numbers. In all dimensions, the inequality of arithmetic and geometric means shows that the volume of the pieces is less than the volume of the hypercube into which they should be packed. However, it is unknown whether the puzzle can be solved in five dimensions, or in higher prime number dimensions.

References