## Task A-3.2.

Four cubes with edge lengths 1, 2, 3, and 4 are placed next to each other as shown in the figure. Determine the length of the segment $\overline{X Y}$ that lies within the cube with an edge length of 3.

![](https://cdn.mathpix.com/cropped/2024_05_30_a897c7e1109e2574c8d7g-16.jpg?height=349&width=711&top_left_y=1987&top_left_x=981)
## Solution.

Let $A B C D$ denote the vertices of the bottom face of a cube with edge length 4, where $A$ is the bottom left vertex of the front face, and $D$ is the bottom left vertex of the back face.

By the Pythagorean theorem for triangle $A Y D$, we have

$$
|A Y|^{2}=|A D|^{2}+|D Y|^{2}=4^{2}+(1+2+3+4)^{2}=116
$$

and from triangle $A Y X$, we get

$$
|X Y|^{2}=|A X|^{2}+|A Y|^{2}=16+116=132
$$

thus $|X Y|=2 \sqrt{33}$.

The planes along which the cubes are joined divide triangle $A Y D$ into similar triangles as shown in the figure. The lengths of the segments parallel to $A D$ are in the ratio $10: 6: 3: 1$, so they are 4, $\frac{12}{5}$, $\frac{6}{5}$, and $\frac{2}{5}$, respectively. Since $\frac{12}{5}<3$, the line $X Y$ intersects the cube with edge 3 at its left and right sides.

![](https://cdn.mathpix.com/cropped/2024_05_30_a897c7e1109e2574c8d7g-17.jpg?height=705&width=1602&top_left_y=944&top_left_x=181)

Similarly, triangle $A Y X$ is divided into similar triangles as shown in the figure, and the diagonal $\overline{X Y}$ is also divided by the planes along which the cubes are joined into segments whose lengths are in the ratio $4: 3: 2: 1$.

![](https://cdn.mathpix.com/cropped/2024_05_30_a897c7e1109e2574c8d7g-17.jpg?height=705&width=1602&top_left_y=1875&top_left_x=181)

Therefore, the portion of the segment $\overline{X Y}$ inside the cube with edge 3 is $\frac{3}{10}|X Y|$.

Thus, the desired portion of the segment $\overline{X Y}$ is $\frac{3}{10} \cdot 2 \sqrt{33}=\frac{3 \sqrt{33}}{5}$.

Note: Instead of triangles $A Y D$ and $A Y X$, we can consider only triangle $D Y X$.

![](https://cdn.mathpix.com/cropped/2024_05_30_a897c7e1109e2574c8d7g-18.jpg?height=500&width=979&top_left_y=458&top_left_x=470)

If $T$ is the point where the line $X Y$ intersects the plane along which the cubes with edges 4 and 3 are joined, then

$$
|T C|=\frac{6}{10}|X D|=\frac{6}{10} \cdot 4 \sqrt{2}<3 \sqrt{2}
$$

This implies that the line $X Y$ intersects the cube with edge 3 at its left and right sides. We can directly see that the portion of the segment $\overline{X Y}$ inside the cube with edge 3 is $\frac{3}{10}|X Y|$.