Monday, March 28, 2022

Xiddlerian Algorithm

The astronomers of Planet Xiddler are back at it. They have developed a new technology for measuring the radius of a planet by analyzing its cross sections.

And so, they launch a satellite to study a newly discovered, spherical planet. The satellite sends back data about three parallel, equally spaced circular cross sections which have radii $A$, $B$ and $C$ megameters, with $0 \lt A \lt B \lt C.$ Based on these values, the scientists calculate the radius of the planet is $R$ megameters. To their astonishment, they find that $A$, $B$, $C$ and $R$ are all whole numbers!

What is the smallest possible radius of the newly discovered planet?

Let's first discuss the method to the Xiddlerian algorithmic madness. Setting up a reference frame, let's assume that we rotate the newly discovered planet so that the cross sections are parallel to the $xy$-plane and that the smallest cross section has the largest value of $z$, at say $z = k.$ Let's additionally assume that the equal distance between each cross section is $h$ for some $0 \lt h \lt R.$ Then we have the following system of equations: \begin{align*} A^2 + k^2 &= R^2 \\ B^2 + (k-h)^2 &= R^2 \\ C^2 + (k-2h)^2 &= R^2\end{align*} where $0 \lt h \lt k \lt R$ are unknown.

By taking the difference between the first two equations we get the hyperbola $$(k-h)^2 - k^2 + B^2 - A^2 = h^2 - 2kh + B^2 - A^2 = 0$$ or equivalently $$h = k \pm \sqrt{k^2 - B^2 + A^2}.$$ Naturally, since we want $h \lt k,$ we need to choose the lower branch of the hyperbola, that is $$h_1(k) = k - \sqrt{k^2 - B^2 + A^2}.$$ Similarly, by taking the difference between the first and last equations, we get the hyperbola $$(k-2h)^2 - k^2 + C^2 - A^2 = 4h^2 -4kh + C^2 - A^2 = 0$$ or equivalently $$h = \frac{k \pm \sqrt{k^2 - C^2 + A^2}}{2}.$$ Here, again, we can safely choose the lower branch since otherwise we are not guaranteed to have $(k-2h)^2 \lt (k-h)^2$ (which is equivalent to $B \lt C$), that is $$h_2(k) = \frac{k - \sqrt{k^2 - C^2 + A^2}}{2}.$$

The intersection of these two curves occurs when $$k = 2 \sqrt{k^2 - B^2 + A^2} - \sqrt{k^2 - C^2 + A^2}.$$ Squaring both sides gives $$k^2 = 4(k^2 - B^2 + A^2) - 4\sqrt{k^2 - B^2 + A^2}\sqrt{k^2 - C^2 + A^2} + (k^2 - C^2 + A^2),$$ or equivalently $$4 \sqrt{k^2 - B^2 + A^2} \sqrt{k^2 - C^2 + A^2} = 4k^2 - 4(B^2-A^2) - (C^2 - A^2).$$ Squaring both sides again gives $$16 (k^2 - B^2 + A^2) (k^2 - C^2 + A^2) = (4k^2 - 4(B^2 - A^2) - (C^2 -A^2))^2$$ or equivalently \begin{align*}0 &= 16k^4 - 16((B^2 - A^2) + (C^2 - A^2)) k^2 + (A^2 - B^2)(C^2 - A^2) \\ \quad\quad & \quad\quad\quad -16 k^4 + 8(4(B^2 - A^2) + (C^2 - A^2)) k^2 + (4(B^2 - A^2) + (C^2 - A^2))^2 \\ &= 8(2(B^2 - A^2) - (C^2 - A^2)) k^2 - (4(B^2 -A^2) + (C^2 - A^2))^2 + 16(C^2-A^2)(B^2-A^2) \\ &= 8 (2(B^2 - A^2) - (C^2 - A^2))k^2 - (4(B^2 - A^2) - (C^2 - A^2))^2.\end{align*} That is, $$k^2 = \frac{(4(B^2 - A^2) - (C^2 - A^2))^2 }{ 8(2(B^2 - A^2) - (C^2 - A^2)) } = \frac{(4B^2 -3A^2 -C^2)^2}{8(2B^2 - A^2 - C^2)}$$ and hence \begin{align*}R^2 &= A^2 + k^2 = A^2 + \frac{(4B^2 - 3A^2 - C^2)^2}{8(2B^2 - A^2 - C^2)} \\ &= \frac{8A^2 (2B^2 - A^2 - C^2) + (4B^2 - 3A^2 - C^2)^2}{8(2B^2 - A^2 - C^2)} \\ &= B^2 + \frac{(C^2 - A^2)^2}{8(2B^2 - A^2 - C^2)}\end{align*} That is, $$R = R(A,B,C) = \sqrt{ B^2 + \frac{(C^2 - A^2)^2}{8(2B^2 - A^2 - C^2)}}.$$

So we can just about start hunting and pecking for suitable triples $(A, B, C) \in \mathbb{N}^3$ such that $R \in \mathbb{N},$ but we can narrow the search by including $0 \lt A \lt B \lt C \lt R.$ Additionally, since $k^2$ must be a positive integer we must additionally have $8 \mid (C^2 - A^2)^2$ and $2B^2 - A^2 - C^2 \gt 0.$ The first conclusion is equivalent to the condition that $A \equiv C \mod 2,$ while the second conclusion ensures that we must have $C \lt \sqrt{2B^2 - A^2}$. After a while of hunting an pecking, we see that $(2, 7, 8)$ yields $R(A,B,C) = 8.$ An exhaustive search of triples $A \lt B \lt C \lt 8$ with $A \equiv C \mod 2$ and $C \lt \sqrt{2B^2 - A^2}$ reveals only four valid competitors: \begin{align*} (1,4,5) &\Rightarrow R(1, 4, 5) = 4\sqrt{7} \\ (1,6,7) &\Rightarrow R(1,6,7) = \frac{6\sqrt{165}}{11} \\ (2,5,6) &\Rightarrow R(2,5,6) = \frac{5 \sqrt{22}}{4} \\ (3,6,7) &\Rightarrow R(3,6,7) = \frac{4\sqrt{154}}{7}\end{align*} Since each of the competitors does not produce a sufficiently whole numbered $R$, the smallest radius the newly discovered planet can be is $8 = R(2,7,8)$ megameters.

No comments:

Post a Comment