# Block-stacking problem

In statics, the block-stacking problem (sometimes known as The Leaning Tower of Lire (Johnson 1955), also the book-stacking problem, or a number of other similar terms) is a puzzle concerning the stacking of blocks at the edge of a table.

## Statement

The block-stacking problem is the following puzzle:
   Place $N$ identical rigid rectangular blocks in a stable stack on a table edge in such a way as to maximize the overhang.
Paterson et al. (2007) provide a long list of references on this problem going back to mechanics texts from the middle of the 19th century.

## Variants
### Single-wide

The single-wide problem involves having only one block at any given level. In the ideal case of perfectly rectangular blocks, the solution to the single-wide problem is that the maximum overhang is given by ∑$_{i=1}$$^N$ 1/2i {\textstyle \sum _{i=1}^{N}{\frac {1}{2i}}} times the width of a block. This sum is one half of the corresponding partial sum of the harmonic series. Because the harmonic series diverges, the maximal overhang tends to infinity as $N$ increases, meaning that it is possible to achieve any arbitrarily large overhang, with sufficient blocks.
| N | Maximum overhang | Maximum overhang | Maximum overhang | Maximum overhang |
| N | expressed as a fraction | expressed as a fraction | decimal | relative size |
| 1 | 1 | /2 | 0.5 | 0.5 |
| 2 | 3 | /4 | 0.75 | 0.75 |
| 3 | 11 | /12 | ~0.91667 | 0.91667 |
| 4 | 25 | /24 | ~1.04167 | 1.04167 |
| 5 | 137 | /120 | ~1.14167 | 1.14167 |
| 6 | 49 | /40 | 1.225 | 1.225 |
| 7 | 363 | /280 | ~1.29643 | 1.29643 |
| 8 | 761 | /560 | ~1.35893 | 1.35893 |
| 9 | 7 129 | /5 040 | ~1.41448 | 1.41448 |
| 10 | 7 381 | /5 040 | ~1.46448 | 1.46448 |
| N | Maximum overhang | Maximum overhang | Maximum overhang | Maximum overhang |
| N | expressed as a fraction | expressed as a fraction | decimal | relative size |
| 11 | 83 711 | /55 440 | ~1.50994 | 1.50994 |
| 12 | 86 021 | /55 440 | ~1.55161 | 1.55161 |
| 13 | 1 145 993 | /720 720 | ~1.59007 | 1.59007 |
| 14 | 1 171 733 | /720 720 | ~1.62578 | 1.62578 |
| 15 | 1 195 757 | /720 720 | ~1.65911 | 1.65911 |
| 16 | 2 436 559 | /1 441 440 | ~1.69036 | 1.69036 |
| 17 | 42 142 223 | /24 504 480 | ~1.71978 | 1.71978 |
| 18 | 14 274 301 | /8 168 160 | ~1.74755 | 1.74755 |
| 19 | 275 295 799 | /155 195 040 | ~1.77387 | 1.77387 |
| 20 | 55 835 135 | /31 039 008 | ~1.79887 | 1.79887 |
| N | Maximum overhang | Maximum overhang | Maximum overhang | Maximum overhang |
| N | expressed as a fraction | expressed as a fraction | decimal | relative size |
| 21 | 18 858 053 | /10 346 336 | ~1.82268 | 1.82268 |
| 22 | 19 093 197 | /10 346 336 | ~1.84541 | 1.84541 |
| 23 | 444 316 699 | /237 965 728 | ~1.86715 | 1.86715 |
| 24 | 1 347 822 955 | /713 897 184 | ~1.88798 | 1.88798 |
| 25 | 34 052 522 467 | /17 847 429 600 | ~1.90798 | 1.90798 |
| 26 | 34 395 742 267 | /17 847 429 600 | ~1.92721 | 1.92721 |
| 27 | 312 536 252 003 | /160 626 866 400 | ~1.94573 | 1.94573 |
| 28 | 315 404 588 903 | /160 626 866 400 | ~1.96359 | 1.96359 |
| 29 | 9 227 046 511 387 | /4 658 179 125 600 | ~1.98083 | 1.98083 |
| 30 | 9 304 682 830 147 | /4 658 179 125 600 | ~1.99749 | 1.99749 |
The number of blocks required to reach at least $N$ block-lengths past the edge of the table is 4, 31, 227, 1674, 12367, 91380, ... (sequence A014537 in the OEIS).

### Multi-wide

Multi-wide stacks using counterbalancing can give larger overhangs than a single width stack. Even for three blocks, stacking two counterbalanced blocks on top of another block can give an overhang of 1, while the overhang in the simple ideal case is at most ⁠11/12⁠. As Paterson et al. (2007) showed, asymptotically, the maximum overhang that can be achieved by multi-wide stacks is proportional to the cube root of the number of blocks, in contrast to the single-wide case in which the overhang is proportional to the logarithm of the number of blocks. However, it has been shown that in reality this is impossible and the number of blocks that we can move to the right, due to block stress, is not more than a specified number. For example, for a special brick with h = 0.20 m, Young's modulus E = 3000 MPa and density ρ = 1.8×10$^3$ kg/m$^3$ and limiting compressive stress 3 MPa, the approximate value of N will be 853 and the maximum tower height becomes 170 m.

## Proof of solution of single-wide variant

The above formula for the maximum overhang of $n$ blocks, each with length $l$ and mass $m$, stacked one at a level, can be proven by induction by considering the torques on the blocks about the edge of the table they overhang. The blocks can be modelled as point-masses located at the center of each block, assuming uniform mass-density. In the base case ($n=1$), the center of mass of the block lies above the table's edge, meaning an overhang of $l/2$. For $k$ blocks, the center of mass of the $k$-block system must lie above the table's edge, and the center of mass of the $k-1$ top blocks must lie above the edge of the first for static equilibrium. If the $k$th block overhangs the $(k-1)$th by $l/2$ and the overhang of the first is $x$,
$(k-1)mgx=(l/2-x)mg\implies x=l/2k,$
where $g$ denotes the gravitational field. If the $k-1$ top blocks overhang their center of mass by $y$, then, by assuming the inductive hypothesis, the maximum overhang off the table is
$y+{\frac {l}{2k}}=\sum _{i=1}^{k}{l/2i}\implies y=\sum _{i=1}^{k-1}{l/2i}.$
For $k+1$ blocks, $y$ denotes how much the $k+1-1$ top blocks overhang their center of mass $(y=\sum _{i=1}^{k}l/2i)$, and $x={\frac {l}{2(k+1)}}$. Then, the maximum overhang would be:
${\frac {l}{2(k+1)}}+\sum _{i=1}^{k}l/2i=\sum _{i=1}^{k+1}l/2i.$

## Robustness

Hall (2005) discusses this problem, shows that it is robust to nonidealizations such as rounded block corners and finite precision of block placing, and introduces several variants including nonzero friction forces between adjacent blocks.