# Coiling Rope in a Box

What is the longest rope length L of radius r that can fit into a box? The rope is a smooth curve with a tubular neighborhood of radius r, such that the rope does not self-penetrate. For an open curve, each endpoint is surrounded by a ball of radius r. For a box of dimensions $1{\times}1{\times}\frac{1}{2}$ and rope with $r=\frac{1}{4}$, perhaps $L=\frac{1}{2}+\frac{\pi}{4} \approx 1.3$, achieved by a 'U':

I know packing circles in a square is a notoriously difficult problem, but perhaps it is easier to pack a rope in a cube, because the continuity of the curve constrains the options? (I struggle with this every fall, packing a gardening hose in a rectangular tub.) I am more interested in general strategies for how to best coil the rope, rather than specific values of L. It seems that if r is large w.r.t. the box dimensions (as in the above example), no "penny-packing" cross-sectional structure is possible, where one layer nestles in the crevices of the preceding layer.
This is a natural question and surely has been explored, but I didn't find much.

Edit 1. It seems a curvature constraint is needed to retain naturalness: The curve should not turn so sharply that the disks of radius r orthogonal to the curve that determine the tubular neighborhood interpenetrate.

Edit 3 (12Aug10). Here is an observation on the 2D version, where a $1 {\times} 1 {\times} 2r$ box may only accommodate one layer of rope. If $k=\frac{1}{2r}$ is an even integer, then I can see two natural strategies for coiling the rope within the box:
$\qquad \qquad \qquad \qquad \qquad$ Red is rope core curve, blue marks the rope boundary.

Interestingly, if I have calculated correctly, the length of the red rope curve is identical for the two strategies: $$L = 2 (k-1)[r \pi/2] + 2(k-1)^2 r \;.$$ For $r=\frac{1}{16}$, $k=8$ as illustrated, $L=\frac{7\pi}{16} + \frac{49}{8} \approx 7.5$. (As a check, for $r=\frac{1}{4}$, $k=2$, and $L$ evaluates to $\frac{\pi}{4}+\frac{1}{2}$ as in the first example above.)

-
arxiv.org/abs/1005.4609 – Steve Huntsman May 31 '10 at 2:50
Your example looks suboptimal to me — you can make it a little longer by pushing the parts with bigger radius into their corners and making the radius of the curved parts in these corners match the other curved parts (opening up a gap where the rope does not touch itself along the red semicircle). – David Eppstein May 31 '10 at 3:52
@David Eppstein: I believe the red segment indicates the center of the rope, rather than a place where a thinner rope touches itself. I was confused for a bit as well, since the "thin rope" interpretation was inconsistent with the length calculation. – S. Carnahan May 31 '10 at 6:58
Scott's interpretation of the figure is correct: the red is the centerline of the curve. The rope has diameter $\frac{1}{2}$; its outline is in blue. – Joseph O'Rourke May 31 '10 at 9:50
@David Eppstein: I see your point. Why not approach a right-angled 'U' of length $L=$1.5? This suggests a curvature constraint is needed. Now added. – Joseph O'Rourke May 31 '10 at 10:50

In 3 dimensions, one can speculate that the asymptotic density of the rope is $\sqrt{\pi}/12$, the same as the circle packing density in the plane. There is a theorem of Andras Bezdek and my dad, Włodzimierz Kuperberg, that the maximum density space packing with congruent circular cylinders of infinite length is attained when the cylinders are parallel. Their theorem includes the special case of the rope question in which most of the rope is parallel to itself. (On the other hand, it is not quite obvious that the entire theorem is a special case. Given a pile of stiff, straight spaghetti, can you always efficiently connect the ends to make one long noodle?) In any case, I asked my dad this asymptotic rope question, and in his opinion, it is an open problem. A rope seems much harder to control than straight cylinders.