# Bottles in a Slanted Rack

The applet bellow is a dynamic illustration of the extension (due to Nathan Bowler) of the Bottles in a Wine Rack problem: for a slanted rack, i.e., for a rack with both walls tilted to the same angle, there is, under certain conditions, a layer of the bottles with centers collinear on a horizontal line. Nathan's derivation shows that this should happen in layer 4N - 3, where N is the number of bottles in the bottom layer. It is also true that, under the same conditions, bottles in layer 2N - 1 are also collinear, although the line they are on is not horizontal unless the racks' walls are vertical.

A note about the applet: an important point about the problem is that the bottles are assumed to be in "layers", with alternating quantities of N and N-1 bottles. With a slanted rack, this condition may be easily violated: the order of bottle placement may affect the configuration and mix the layers. The applet does not make a serious attempt to resolve the configuration when layer mixing takes place. Judging the configuration unrelated to the problem as stated, it simply stops drawing subsequent layers. Do not be surprised or alarmed by this behavior.

What are the exact conditions under which the problem's statement is correct? It looks like, both the original problem and Nathan's extension need layer separation: bottles in layer K may only touch the bottles in layers K - 1, K, and K + 1. But I'll be ready to amend this assertion if warranted by a good argument.

### If you are reading this, your browser is not set to run Java applets. Try IE11 or Safari and declare the site https://www.cut-the-knot.org as trusted in the Java setup. What if applet does not run?

Suppose there are N bottles in the bottom layer. We will label the bottles in even layers (those containing N - 1 bottles) So for k < N let b(m, k) be the kth bottle from the left in layer 2m (because it will be useful later, we also include an imaginary layer 0 beneath layer 1). b(m, k) has two bottles resting on it from above, one on the left and one on the right. Let l(m, k) be the (directed) angle from the horizontal of the line joining the centre of b(m, k) to the centre of the bottle resting on it to the left. Define r(m, k) similarly on the right. Let a be the directed angle to the horizontal of the sides of the rack. Then:

 l(m + 1, k + 1) = l(m, k) for k < N-1 by considering a couple of rhombi r(m + 1, k - 1) = r(m, k) for k > 1 similarly r(m + 1, N - 1) = 2a - l(m, N) by considering a rhombus and an isosceles triangle l(m + 1, 1) = 2a - r(m, 1) similarly r(0, k) + l(0, k) = 0 since the bottom layer is horizontal.

We then deduce:

 l(2N - 2, k) = l(2N - k - 1, 1) = 2a - r(2N - k - 2, 1) = 2a - r(N - k, N - 1) = 2a - (2a - l(N - k - 1, N - 1)) = l(0, k)

Similarly, r(2N - 2, k) = r(0, k). In particular, then, l(2N - 2, k) + r(2N - 2, k) = l(0, k) + r(0, k) = 0 so that layer 4N - 3 is horizontal.

Note that a similar argument gives the original result in the case that the sides are vertical, since then

 l(N - 1, k) + r(N - 1, k) = 2a - r(0, N - k) + 2a - l(0, N - k) = 4a - 0 = 0.

For the middle layer, note from the above that the angle to the horizontal of the line joining a pair of successive centres in line 2N - 1 is 1/2·(4a - r(0, N - k) - l(0, N - k)) = 2a which gives exactly the claimed result.

### References

1. J. Konhauser, D. Velleman, S. Wagon, Which Way Did the Bicycle Go?, MAA, 1996  