B3 Given the following 4 by 4 square grid of points, determine the number of ways we can label ten different points $A, B, C, D, E, F, G, H, I, J$ such that the lengths of the nine segments
$$
A B, B C, C D, D E, E F, F G, G H, H I, I J
$$
are in strictly increasing order.
Solution: The answer is 24 .

First, we count the number of possible lengths of the segments. By the Pythagorean Theorem, the different lengths are $\sqrt{0^{2}+1^{2}}=1, \sqrt{0^{2}+2^{2}}=2, \sqrt{0^{2}+3^{2}}=3, \sqrt{1^{2}+1^{2}}=$ $\sqrt{2}, \sqrt{1^{2}+2^{2}}=\sqrt{5}, \sqrt{1^{2}+3^{2}}=\sqrt{10}, \sqrt{2^{2}+2^{2}}=\sqrt{8}, \sqrt{2^{2}+3^{2}}=\sqrt{13}, \sqrt{3^{2}+3^{2}}=\sqrt{18}$. These nine lengths are all different. Therefore, all nine lengths are represented among $A B, B C, C D, D E, E F, F G, G H, H I, I J$. Furthermore, these nine lengths in increasing order are:
$$
\begin{array}{c}
\sqrt{0^{2}+1^{2}}<\sqrt{1^{2}+1^{2}}<\sqrt{0^{2}+2^{2}}<\sqrt{1^{2}+2^{2}}<\sqrt{2^{2}+2^{2}} \\
\quad<\sqrt{0^{2}+3^{2}}<\sqrt{1^{2}+3^{2}}<\sqrt{2^{2}+3^{2}}<\sqrt{3^{2}+3^{2}} .
\end{array}
$$

Hence, the longest length must be a segment that goes from one corner to the diagonallyopposite corner.

We will construct the ten points in the order $J, I, H, G, F, E, D, C, B, A$.

For simplicity, we place the points on the coordinate plane, with the bottom left corner at $(0,0)$ and the top right corner at $(3,3)$.

Note that $J$ must be a corner of the grid, and there are four such corners. Furthermore, $I$ must be the diagonally opposite corner from $J$. Without loss of generality, suppose $J=(0,0)$. Then $I=(3,3)$.

The point $H$ has the property that $H I=\sqrt{3^{2}+2^{2}}$, i.e. $H$ is a point which is distance three horizontally from $I$ and distance two vertically from $I$, or vice versa. By symmetry along the diagonal $J I$, there two choices for $H$, namely $(0,1)$ or $(1,0)$. Without loss of generality, suppose $H=(1,0)$.

The segment $G H$ has length $\sqrt{3^{2}+1^{2}}$. Hence, $G$ is either $(0,3)$ or $(2,3)$. But if $G=(0,3)$ then $F$ is a point such that $F G=3=\sqrt{0^{2}+3^{2}}$. Then $F=(0,0)$ or $(3,3)$, which are already occupied by $J, I$, respectively. Therefore, $G$ cannot be $(0,3)$, and thus must be $(2,3)$. Consequently, $F=(2,0)$.
$E F$ has length $\sqrt{8}=\sqrt{2^{2}+2^{2}}$. Hence, $E=(0,2)$. $D E$ has length $\sqrt{5}=\sqrt{2^{2}+1^{2}}$. Hence, $D=(2,1)$.
Then $C=(0,1)$ and $B=(1,2)$.
From $B$, there are three remaining points $A$ such that $A B=1$, namely $(1,1),(1,3),(2,2)$.

By our construction, the points $J, H$ and $A$ were the only points where there was more than one choice. Every other point was determined from our construction. There were 4 choices for $J, 2$ choices for $H$ and 3 choices for $A$. Hence, the number of ways to select 10 points that satisfy the condition given in the problem is $4 \times 3 \times 2=24$. The answer is 24 .