## Balancing Rods

You are given a set of N rods of lengths 1 to N. Each rod weighs a number of ounces equal to its length (i.e. the rod of length 4 weighs 4 ounces.) A small [weightless] loop is attached to the end of each rod, letting it either support or hang from another rod. A small loop is also suspended from the ceiling. Build a mobile out of the rods, trying to maximize:
1. the longest horizontal distance from the original loop.
2. the horizontal distance from the furthest left to the furthest right point on the mobile.
Solve for N ranging from 1 to 6. What are the resulting distances in each case?

For example, I believe the following arrangement solves both questions above for N=4. (I'll let you determine the distances.)

```      |
444444X44
1
333333
2
2```

Source: Original. I've limited N to 6 to keep the problem simple to approach, but I'd be happy to accept and publish results for higher N.

Solutions were received from Philippe Fondanaiche and Joseph DeVincentis. They had some matching and some not matching solutions. Philippe's summary:
```Hereafter the distances that I have found according to the two cases:

N            case 1         case 2

1               1/2              1
2               4/3              2
3               9/4              4
4              16/5          61/10
5            191/42           17/2
6             85/14         183/16
7              61/8        1171/80

The attached JPG file 011003sol.jpg (750K) gives the corresponding
diagrams. The scales of the rods have been respected.
```

Joseph's solutions:
```For N = 1 or 2 there is no real choice.

For N = 1 you hang the rod horizontally at its middle.
Longest horizontal distance from the loop is 1/2.
Longest total horizontal distance is 1.

For N = 2, you have the 2 horizontally at a point so that it balances
with the 1 at its end.  Say it is hung X units from the end with the 1.
Then (2-X)(2-X)/2 = X*X/2 + 1*X,
2 - 2X + X^2/2 = X^2/2 + X,
2 - 2X = X
2 = 3X
X = 2/3.

The distance from the loop is thus 4/3, and the total distance is 2.

For N = 3, you maximize both distances by hanging the 3 horizontal,
hanging the 1 from its end, and hanging the 2 horizontal from the bottom
of the 1.  The 2 must be balanced at its middle, and the 3 is balanced
against the 3 units of weight hanging at its end, X units from that end.
(3-X)(3-X)/2 = X*X/2 + 3X
9/2 - 3X = 3X
9/2 = 6X
X = 3/4.

So the 3 extends 3/4 unit toward the other rods and 9/4 units the other
way.  The 2 extends an additional 1 unit beyond the end of the 3, for a
total of 7/4 on that side of the original loop.  Thus, the max distance
from the loop is 9/4 and the max total distance is 4.

For N = 4, the diagram given in the puzzle is best.
The balance of the 4 rod is as follows, with X units on the short end:
(4-X)(4-X)/2 = X*X/2 + 6X
8 - 4X = 6X
8 = 10X
X = 4/5.

4/5 unit of the rod hangs on one side, with 3 and 1/5 units protruding on
the other side.  Let X represent the short end of the 3 rod:
(3-X)(3-X)/2 = X*X/2 + 2X
9/2 - 3X = 2X
9/2 = 5X
X = 9/10.

So 2 and 1/10 units of the 3 rod protrudes beyond the short end of the 4 rod.
That makes 2 and 9/10 on that side of the main loop, 3 and 2/10 on the other
side, and 6 and 1/10 total width.

By this point I've solved the same algebra 4 times for different numbers.
Let's find a general solution.  For a rod of length L, with a weight W
hanging from one end, the distance X from the weight where the rod is
balanced is:
(L-X)(L-X)/2 = X*X/2 + WX
(L^2)/2 - LX = WX
(L^2)/2 = (L+W)X
X = (L^2)/[2(L+W)]

For the case of putting the long rod at the top and hanging all the weight
off one of its ends, L+W = the sum of 1 to L, or L*(L+1)/2.  This reduces
to X = L/(L+1) in this case, explaining the pattern which is evident in
the preceding results.

For 5 rods I think this is the best arrangement:
|
55555555X55
1
44444444
2
2
333X333

We know now that 5/6 unit of the 5 rod will be on the short side, and thus
4 and 1/6 units on the long side.  For the 4 rod, L=4 and W=5; X=16/18 = 8/9.
The 3 and 1/9 units of the 4 rod which sticks out here beats the 1.5 + 8/9 on
the other side of the 1, and beats the 2 + a very small bit of the 3 rod
you could get from hanging the rods in the order 5 2 3 1 4.

The total horizontal distance is 8 and 1/9; the longest horizontal distance
is that of the 5 rod, 4 and 1/6.

For 6 rods, the similar arrangement (with the 6 and 5 horizontal, and the
4 hanging as dead weight off the 3) gives 5 and 1/7 horizontal extension
on the 6 rod.  The short end of the 5 rod will be given by L = 5, W = 9,
X = 25/28.  So the 5 rod sticks out 4 and 3/28 past the short end of the 6,
making the total width 10 and 3/28.

However, there are several competing arrangements:

|
6666666666X66
2
2
44444444
1
5555555555
3
3
3

In this arrangement, the length of the short end of the 4 rod is given by
L=4, W=9, X = (L^2)/[2(L+W)] = 16/26 = 8/13.
The length of the short end of the 5 rod is given by L=5, W=3, X = 25/16.
This gives the total extension to the right of the 6 rod to be
8/13 + 5 - 25/16 = 4 + (8*16 - 9*13)/208 = 4 and 11/208.
Not as good as the original.

|
6666666666X66
2
2
44444444
3      1
3 55555X55555
3

In this case we have weights hanging from both ends of the 4.
This expanded equation looks like (using Z as the weight on the long end):
(L-X)(L-X)/2 + Z(L-X) = X*X/2 + WX
(L^2)/2 - LX + ZL - ZX = WX
(L^2)/2 + ZL = (W+L+Z)X
X = L*(L/2 + Z)/(W+L+Z)

So with L=4, W=6, Z=3, we get X = 20/13.
The end of the 5 rod is thus 2.5 + 20/13 = 4 and 1/26 units beyond the
end of the 6, still less than the first case.

|
6666666666X66
2
2
333333
1
5555555555
4
4
4
4

In this arrangement, the length of the short end of the 3 rod is given by
L=3, W=10, X = (L^2)/[2(L+W)] = 9/26.
The length of the short end of the 5 rod is given by L=5, W=4, X = 25/18.
This gives the total extension to the right of the 6 rod to be
9/26 + 5 - 25/18 = 4 + (9*18 - 7*26)/468 = 4 - 20/468 < 4.

There are some other arrangements, but each is clearly inferior to
one of these.  So we still have 10 and 3/28 total width and
5 and 1/7 horizontal extension as the best for N=6.

However, for longer N, maybe as soon as for N=7, there will be enough
extra dead weight around to make some of these other arrangements useful.
Eventually they should be able to pass the 2N+1 width limit that
arrangements in the pattern of these solutions for 4, 5, and 6 rods
are approaching.
```

Mail to Ken