## Friday, June 15, 2018

### Minimizing Rotational Inertia of A Curve

In the rotating apparatus below, a curve connects the green points. Thinking of the curve as a rigid body with uniform mass per unit length, determine the shape of the curve that minimizes its rotational inertia about the center of rotation.

I haven't seen this problem in any textbooks, perhaps because it isn't valuable as a real-world application. (In such an apparatus most of the inertia will be in the two arms, not in the curve, making optimization a task of doubtful importance.) However, the problem would be a good exercise for a graduate student in physics.

The best curve I can find is the one defined in polar coordinates by r = f(θ), where

and c ≈ 6.82843. Then the moment of inertia is about 0.61592 (in units where the two straight segments have unit length). Here's what the extremal curve looks like:

Here it is standing still:

As one would expect, the curve bends inward so that points on the curve are closer to the axis of rotation; this decreases rotational inertia. However, the curve doesn't bend so far inward that it becomes overlong and therefore overly massive (which would increase rotational inertia).

My calculation is here. It isn't a proof—for example, I haven't ruled out curves that can't be written in the form r = f(θ). But I'd be surprised if a better shape exists. Now if the angle π/4 were replaced by a much larger angle, then the best solution might travel along the arms; for example, if the angle were π, a straight angle, then surely the best curve is just a straight line from one green point to the other.

My strategy was direct—just set up the integral for the moment of inertia and then solve the resulting Euler-Lagrange differential equation for minimizing the integral. This wasn't hard to do symbolically, but there is a final numerical step at the end because the solution to the differential equation has a free parameter in it. (I can't remember having had that happen in a variational problem before.)

One final point of interest is that when transformed into Cartesian coordinates the extremal curve r = f(θ) is pretty close to part of the cubic curve 2.61x3 − 7.84xy2 = 1. Here is a global picture; see the PDF for details.

## Wednesday, June 13, 2018

### A Few Old-School Math Problems

Here are some nice short exercises from Algebra and Trigonometry (1960), by Edward A. Cameron (c. 1906–1992). I found this book in a used bookstore last year and finally leafed through it tonight.

1. The sum of the digits of a three-digit number is 11. If 495 were subtracted from the number, the order of the digits would be reversed. If 27 were subtracted from the number, the units' digit and the tens' digit would be interchanged. Find the number.
2. If the altitude of a certain triangle were increased by 2 inches and the base by 4 inches, the area would be increased by 32 square inches and the new base would be equal to the new altitude. Find the altitude and base of the original triangle.
3. At the same instant two observers located 2 miles apart measure the angle of elevation of an airplane which is between them and directly over the line joining them. The two angles are 42°20' and 52°40'. Find the altitude of the airplane.

## Wednesday, June 6, 2018

### Crossing Strings - Another Look

In the original Crossing Strings problem, the attachment points for both of the strings and both of the posts were randomly chosen, and the resulting probability of crossing was ½. In a modified version of the problem, with the attachment points for one string biased in a certain way, the probability of crossing was 35/72.

In this post, I'll state a more general version of the problem and then provide an expression one can use to calculate the probability of a crossing when these more general conditions obtain. (Because, you know, you might need this someday.) We'll also consider an interesting special case. And if you stick with me to the end, there's a funny story about a mathematician.

Here's the more general version of the problem.
• Two posts are divided into N equal-length sections. The sections of the left post are labeled D1, …, DN. The sections of the right post are labeled E1, …, EN.
• On the left post, a green string has probability γLi of attaching to a point in section Di (and all attachment points in section Di are equally likely).
• On the left post, a red string has probability ρLj of attaching to a point in section Dj (and all attachment points in section Dj are equally likely).
• On the right post, a green string has probability γRk of attaching to a point in section Ek (and all attachment points in section Ek are equally likely).
• On the right post, a red string has probability ρR of attaching to a point in section E (and all attachment points in section E are equally likely).
What is the probability that the strings cross?

Here is a diagram showing all the symbols for the case N = 4.

In the diagram, the green string attaches to the left post at a point in section D4; the probability of this is γL4. Note that γL1 + γL2 + γL3 + γL4 = 1, and similarly for the γR quantities and the ρL,R quantities. (These are probability distributions.)

The calculation I gave here can be straightforwardly generalized to produce the crossing probability in the general problem as follows: Probability of crossing =
$2\left( \frac{1}{2}\sum_{n=1}^N{\gamma^{\rm L}_{n}\rho^{\rm L}_{n}} + \sum_{i < j}{\gamma^{\rm L}_{i}\rho^{\rm L}_{j}}\right)\left( \frac{1}{2}\sum_{m=1}^N{\gamma^{\rm R}_{m}\rho^{\rm R}_{m}} + \sum_{k>\ell}{\gamma^{\rm R}_{k}\rho^{\rm R}_{\ell}}\right)\,.$ I think this general expression is right…certainly it gives the correct results for the previous two versions of the problem. The problem in the original post corresponds to N = 1, γL1 = 1, ρL1 = 1, γR1 = 1, ρR1 = 1. Then the general expression becomes $2\left(\frac{1}{2}\cdot 1\cdot 1 + 0\right)\left(\frac{1}{2}\cdot 1\cdot 1 + 0\right) = \frac{1}{2}$ as expected. The modified problem from the previous post corresponds to N = 2, γL1 = ⅓, γL2 = ⅔, γR1 = ⅓, γR2 = ⅔, ρL1 = ρL2 = ρR1 = ρR2 = ½. Then the general expression becomes
$2\left(\frac{1}{2}\left(\frac{1}{3}\cdot\frac{1}{2}+\frac{2}{3}\cdot\frac{1}{2}\right) + \frac{1}{3}\cdot\frac{1}{2}\right)\left(\frac{1}{2}\left(\frac{1}{3}\cdot\frac{1}{2}+\frac{2}{3}\cdot\frac{1}{2}\right) + \frac{2}{3}\cdot\frac{1}{2}\right) = \frac{35}{72}$
as expected.

A special case is interesting. If the colors are treated the same way on each post (meaning that γLm = ρLm ≡ πLm and γRm = ρRm ≡ πRm), then the probability of a crossing is ½ regardless of the probability distributions {πLm, πRm}. To see how this follows from the general expression, note that under the stated assumptions, the general expression becomes

$2\left( \frac{1}{2}\sum_{n=1}^N{{\left[\pi^{\rm L}_{n}\right]}^2} + \sum_{i < j}{\pi^{\rm L}_{i}\pi^{\rm L}_{j}}\right)\left( \frac{1}{2}\sum_{m=1}^N{{\left[\pi^{\rm R}_{m}\right]}^2} + \sum_{k>\ell}{\pi^{\rm R}_{k}\pi^{\rm R}_{\ell}}\right)$
$= 2\left(\frac{1}{2}\left(\sum_{n=1}^N{\pi^{\rm L}_{n}}\right)^{\!\!2}\,\right)\left( \frac{1}{2}\left(\sum_{m=1}^N{\pi^{\rm R}_{m}}\right)^{\!\!2}\,\right)$
$= 2\left(\frac{1}{2}\cdot 1^2\right)\left( \frac{1}{2}\cdot 1^2\right)$
$= \frac{1}{2}\,.$

It wasn't obvious to me a priori that the probability of a crossing is ½ when colors are treated the same way (even when the posts are not treated the same way, and even when the probability distribution along a given post is non-uniform). Is it obvious in retrospect?*

I'm not sure "obvious" is the word I'd use, but I do believe it's possible to appreciate, without any algebra, why the answer to the color-symmetric problem has to be ½. Here's one way to explain it—you may have a better way.

To begin with, I think a natural way to imagine building a random configuration would be as follows:
• Draw a green line from a randomly chosen left-hand point to a randomly chosen right-hand point, choosing the left-hand point according to the probability distribution for the left post and choosing the right-hand point according to the probability distribution for the right post.
• Draw a red line from a randomly chosen left-hand point to a randomly chosen right-hand point, choosing the left-hand point according to the probability distribution for the left post and choosing the right-hand point according to the probability distribution for the right post.
But we don't have to do things in this order. We could instead do things like so:
• Mark a green endpoint on the left post, choosing randomly according to the probability distribution for the left post.
• Mark a red endpoint on the left post, choosing randomly according to the probability distribution for the left post.
• Mark a green endpoint on the right post, choosing randomly according to the probability distribution for the right post.
• Mark a red endpoint on the right post, choosing randomly according to the probability distribution for the right post.
• Draw segments connecting endpoints of the same color.
Nothing says green has to come before red. So another alternative would be:
• Mark a red endpoint on the left post, choosing randomly according to the probability distribution for the left post.
• Mark a green endpoint on the left post, choosing randomly according to the probability distribution for the left post.
• Mark a red endpoint on the right post, choosing randomly according to the probability distribution for the right post.
• Mark a green endpoint on the right post, choosing randomly according to the probability distribution for the right post.
• Draw segments connecting endpoints of the same color.
Yet another approach:
• Mark a red endpoint on the left post, choosing randomly according to the probability distribution for the left post.
• Mark a green endpoint on the left post, choosing randomly according to the probability distribution for the left post.
• Mark a green endpoint on the right post, choosing randomly according to the probability distribution for the right post.
• Mark a red endpoint on the right post, choosing randomly according to the probability distribution for the right post.
• Draw segments connecting endpoints of the same color.
Given the identical probabilities for green and red on either post, we could even do things this way (here is the version to pay attention to):
• Mark an endpoint on the left post, choosing randomly according to the probability distribution for the left post. Label this endpoint A.
• Mark another endpoint on the left post, choosing randomly according to the probability distribution for the left post. Label this endpoint B.
• Toss a fair coin to decide which endpoint is red and which is green. This is a valid approach because on the left post, red and green endpoints are drawn from the same distribution.
• Mark an endpoint on the right post, choosing randomly according to the probability distribution for the right post. Label this endpoint X.
• Mark another endpoint on the right post, choosing randomly according to the probability distribution for the right post. Label this endpoint Y.
• Toss a fair coin to decide which endpoint is red and which is green.  This is a valid approach because on the right post, red and green endpoints are drawn from the same distribution.
• Draw segments connecting endpoints of the same color.
Using this last method, I think it is apparent that following four configurations are equally likely:
• A green segment AX and a red segment BY
• A red segment AX and a green segment BY
• A green segment AY and a red segment BX
• A red segment AY and a green segment BX
Two of these configurations have a crossing, while two do not. So the probability of a crossing is 2 ÷ 4 or ½.

-----------------
*At Harvard they used to tell a story about Serge Lang, the mathematician (probably the identical story has been told in lots of places about lots of people). During a lecture, Lang was writing on the board. When making a transition from one equation to the next, Lang said, "… and so, it's obvious that …" whereupon he wrote the next equation. A student's hand went up. "Professor Lang, is that really obvious?" Lang paused and stared at his equation. He kept staring. After staring for some time, he placed his chalk in the tray and walked out of the lecture room. Some minutes later, Lang returned. "Yes," he said, "it's very obvious."

## Sunday, June 3, 2018

### Overrated/Underrated (According To My Kids)

A guest post from my kids

Underrated

Vegetables. Lots of people say that vegetables are gross because they're green and don't look appetizing. But when you actually think about it, it doesn't matter what they look like—it matters the texture and the taste. And regardless of what people think, most of them are really good.

Tofu. Because, I mean, it's not the most well known food, but if it's done right, and in the right amount and stuff, it can be sooooo good, especially with some salt.

Rain. People don't like rain but it's actually fine because it feels good to get wet, and rain is also good because if it's raining then it isn't as hot outside. Rain also helps things grow.

Bees. They make honey! Which is so good! And bumblebees don't even sting. Even if they're not bumblebees, it's not really guaranteed that they will sting you. If they sting you, then maybe you asked for it. Anyway they just do it for protection.

Cockroaches. Cockroaches are kind of cute. They don't bite, and they can survive anything. They're more interesting than scary. And if you hold one, they cling to your hand and it's so cute! They aren't even slimy.

Overrated

Fortnite. It's a video game that all the boys like but for no reason. I don't even know what it's about. Once when somebody asked William a question, he answered "Fortnite," because boys think about this game constantly. The question they asked him wasn't even about video games.

Candy. I hate to break it to everyone, but I think candy and chocolate are overrated. Even though they taste good, most of them aren't good for you. Editor's note: this view was not unanimous.

Dogs. Everybody in New York likes dogs, but they're more work than they're worth. You have to walk them every day. They have barking fits. The world is their litter box—cats are potty-trained. Dogs need obedience lessons and can be unpredictable if they aren't trained. You can leave a cat at home for a while and they'll be fine. But to be fair, big dogs are mostly gentle and little dogs are cute.

Correctly Rated

Spiders. Lots of people are scared of them, and they are creepy so that makes sense. But it's more of a tingly feeling, like when you think about spiders in bed at night. Spiders are really cool and interesting, but it's freaky to see one in real life, especially if it's a jumping spider or a venomous one.

Grandparents. It depends. In books, one kind of grandparent is nice and fun, but the other kind is super-old and boring; strict and mean. In real life, grandparents are usually nice and let you have ice cream with Magic Shell.

Ice Cream. It is super great and people recognize that. Some people do prefer other things, and that's also fair because other things are good. For example, I like ice cream but would prefer brownies.

## Wednesday, May 30, 2018

### Crossing Strings - Reader Solutions

Readers submitted good contributions about the Crossing Strings problem: What is the probability that two strings cross when randomly attached to two posts?

One reader argued essentially as follows. Denote the heights of the four attachment points by A, B, C, D:

• A = height of point where the green string attaches to the left post
• B = height of point where the red string attaches to the left post
• C = height of point where the green string attaches to the right post
• D = height of point where the red string attaches to the right post

A crossing between the posts happens if and only if

(A > B and C < D) or (A < B and C > D).

The probability of this is ½ × ½ + ½ × ½ = ½. So there's a 50/50 chance of a crossing between the posts.

(Note that if A, B, C, D are randomly selected real numbers, then the possibilities A = B and/or C = D have zero probability. Neglecting these cases therefore doesn't affect the answer.)

Another reader described a way to visualize the space of possibilities as being composed of four shards of equal four-dimensional volume, two of which correspond to crossings, leading to the same conclusion as above.

A couple of readers gave arguments of a more "topological" sort, essentially as follows:
There is a symmetry between crossing and not crossing. Flipping one of the posts upside down interchanges them, therefore the probability is ½.
The argument was was given pictorial form by one reader as follows:

This is a lovely solution! One has to be careful with it—the symmetry that makes it work isn't only spatial. For example, consider the following variation of the problem:
There are two vertical posts of different heights. A red string is stretched from a randomly chosen point on the left post to a randomly chosen point on the right post. A green string is also stretched from the left post to the right post, but not in the same way. For each post, the attachment point for the green string is chosen as follows: with probability ⅓, the point is randomly chosen from the top half of the post, and with probability ⅔, the point is randomly chosen from the bottom half. What is the probability that the strings cross?
In this version of the problem, it remains the case that flipping the right post converts crossing configurations to non-crossing configurations, and vice versa. But it no longer follows that crossing configurations and non-crossing configurations are equally likely.

(And indeed, crossing configurations and non-crossing configurations are not equally likely in this case; but I was making a point about the sufficiency of the reasoning, not the correctness of the conclusion.)

Feel free to tackle the modified problem. Another variant you might like to try is to consider the case of more than two strings, and calculate the probabilities of various numbers of crossings.

Thanks to all who worked on the problem!

Update 6/2/2018: My solution to the modified problem is here.

## Thursday, May 24, 2018

### Crossing Strings

There are two vertical posts of different heights. A red string is stretched from a randomly chosen point on the left post to a randomly chosen point on the right post. Then, a green string is stretched from a randomly chosen point on the left post to a randomly chosen point on the right post.

Two different examples are shown below. In one, the strings don't cross. In the other, they do.

What is the probability that the strings will cross?

## Tuesday, May 1, 2018

### Another Note On The Even/Odd Puzzle

It's an interesting question how many numbers are consistent with a given list of letters, such as this list of letters from our Even/Odd puzzle:

a, b, d, f, f, h, h, i, i, i, i, i, i, l, l, l, l, m, n, n, n, o, o, o, o, o, o, r, r, r, s, s, t, t, t, t, t, u, u, w, x, y, y

Suppose we determine the words that gave rise to the list:

two, four, six, thirty, forty, thousand, million, billion.

Then we can ask, which number words can be assembled from these words (adding hyphens where necessary)? The answer will have to fit a frame like so:

_____ billion, _____ million, _____ thousand, _____.

Note that the fourth blank could be empty, as happens for example in forty-six billion, thirty-four million, two thousand.

To determine how many ways there are of filling in the frame, I picked up a pen and systematically listed 24 possibilities by hand—all the cases in which no blank is left empty and in which the decade words (thirty, forty) appear in the last two blanks. Now the decade words could also go in the first two blanks, or the first and third, or the first and fourth, or the second and third, or the second and fourth; considering those additional five groups of possibilities, there are 24 + 5 × 24 = 144 possibilities, assuming the final blank gets a word.

It remains to count the possibilities in which the final blank remains empty. There are three ways to choose the two blanks where thirty and forty will go. Having chosen those two blanks, there are two ways to place the two decade words. Having placed the words, there are three ways to choose which single-digit word doesn't get paired to thirty and forty with a hyphen. And finally, having made that choice, there are two ways to match the two remaining single-digit words with thirty and forty. So altogether there are 3 × 2 × 3 × 2 = 36 possibilities in which the final blank remains empty.

Together this is 144 + 36 = 180 possible numbers that, when alphabetized, match the list of letters given in the original puzzle.

I didn't try to list all the possibilities by hand, but I wrote a computer program to list them. The logic of the program differs from the counting analysis sketched above. The output was the 180 numbers shown below, all of which yield an alphabetized list of letters identical to the one given in the original puzzle.

Update 5/16/2018: Reader Sue pointed out that I neglected to say which number generated the original puzzle! Sorry! It was 4,036,002,040 (indicated below by an asterisk).

2,004,030,046
2,004,036,040
2,004,040,036
2,004,046,030
2,006,030,044
2,006,034,040
2,006,040,034
2,006,044,030
2,030,004,046
2,030,006,044
2,030,044,006
2,030,046,004
2,034,006,040
2,034,040,006
2,034,046,000
2,036,004,040
2,036,040,004
2,036,044,000
2,040,004,036
2,040,006,034
2,040,034,006
2,040,036,004
2,044,006,030
2,044,030,006
2,044,036,000
2,046,004,030
2,046,030,004
2,046,034,000
4,002,030,046
4,002,036,040
4,002,040,036
4,002,046,030
4,006,030,042
4,006,032,040
4,006,040,032
4,006,042,030
4,030,002,046
4,030,006,042
4,030,042,006
4,030,046,002
4,032,006,040
4,032,040,006
4,032,046,000
4,036,002,040*
4,036,040,002
4,036,042,000
4,040,002,036
4,040,006,032
4,040,032,006
4,040,036,002
4,042,006,030
4,042,030,006
4,042,036,000
4,046,002,030
4,046,030,002
4,046,032,000
6,002,030,044
6,002,034,040
6,002,040,034
6,002,044,030
6,004,030,042
6,004,032,040
6,004,040,032
6,004,042,030
6,030,002,044
6,030,004,042
6,030,042,004
6,030,044,002
6,032,004,040
6,032,040,004
6,032,044,000
6,034,002,040
6,034,040,002
6,034,042,000
6,040,002,034
6,040,004,032
6,040,032,004
6,040,034,002
6,042,004,030
6,042,030,004
6,042,034,000
6,044,002,030
6,044,030,002
6,044,032,000
30,002,004,046
30,002,006,044
30,002,044,006
30,002,046,004
30,004,002,046
30,004,006,042
30,004,042,006
30,004,046,002
30,006,002,044
30,006,004,042
30,006,042,004
30,006,044,002
30,042,004,006
30,042,006,004
30,044,002,006
30,044,006,002
30,046,002,004
30,046,004,002
32,004,006,040
32,004,040,006
32,004,046,000
32,006,004,040
32,006,040,004
32,006,044,000
32,040,004,006
32,040,006,004
32,044,006,000
32,046,004,000
34,002,006,040
34,002,040,006
34,002,046,000
34,006,002,040
34,006,040,002
34,006,042,000
34,040,002,006
34,040,006,002
34,042,006,000
34,046,002,000
36,002,004,040
36,002,040,004
36,002,044,000
36,004,002,040
36,004,040,002
36,004,042,000
36,040,002,004
36,040,004,002
36,042,004,000
36,044,002,000
40,002,004,036
40,002,006,034
40,002,034,006
40,002,036,004
40,004,002,036
40,004,006,032
40,004,032,006
40,004,036,002
40,006,002,034
40,006,004,032
40,006,032,004
40,006,034,002
40,032,004,006
40,032,006,004
40,034,002,006
40,034,006,002
40,036,002,004
40,036,004,002
42,004,006,030
42,004,030,006
42,004,036,000
42,006,004,030
42,006,030,004
42,006,034,000
42,030,004,006
42,030,006,004
42,034,006,000
42,036,004,000
44,002,006,030
44,002,030,006
44,002,036,000
44,006,002,030
44,006,030,002
44,006,032,000
44,030,002,006
44,030,006,002
44,032,006,000
44,036,002,000
46,002,004,030
46,002,030,004
46,002,034,000
46,004,002,030
46,004,030,002
46,004,032,000
46,030,002,004
46,030,004,002
46,032,004,000
46,034,002,000