5. The nonahedron ABCDEFGHV was formed by gluing a cube ABCDEFGH and a regular quadrilateral pyramid EFGHV. We wrote a number on each face of this nonahedron. Four of the written numbers are 25, 32, 50, and 57. For each vertex of the nonahedron ABCDEFGHV, we sum the numbers on all faces that contain it. This gives us nine identical sums. Determine the remaining five numbers written on the faces of this solid.
SOLUTION. Since two adjacent vertices always lie in two common faces, we will mainly focus on such pairs of vertices.

Vertices $A$ and $B$ ($B$ and $C$) lie in the common faces $A B F E$ and $A B C D$ ($B C G F$ and $B C D A$). Therefore, by comparing the numbers assigned to them, we get that the numbers on the faces $A D H E$ and $B C G F$ ($A B F E$ and $C G H D$) are the same. Let's denote this number as $x(y)$.

Similarly, vertices $E$ and $F$ ($F$ and $G$) lie in the common faces $E F B A$ and $E F V$ ($F G C B$ and $F G V$), and we already know that the faces $A D H E$ and $F B C G$ ($A B F E$ and $G H D C$) have the same numbers. Therefore, by comparing the numbers assigned to them, we get that the numbers on the faces $H E V$ and $F G V$ ($E F V$ and $G H V$) are the same. Let's denote this number as $z$ ($t$, Fig. 3).

![](https://cdn.mathpix.com/cropped/2024_04_17_a1cfd24a7401c7f386afg-08.jpg?height=457&width=399&top_left_y=1625&top_left_x=837)

Fig. 3

By comparing the numbers assigned to vertices $A$ and $E$ (they have the common faces $E A B F$ and $E A D H$), we further get that the face $A B C D$ has the number $s = z + t$.

Finally, by comparing the vertices $E$ and $V$ (they have the common faces $E F V$ and $H E V$), we get $z + t = x + y$.

When we summarize all of this, we find that the individual faces must be numbered with the numbers $x$ (faces $B C G F$ and $D A E H$), $z$ (faces $F G V$ and $E H V$), $s$ (face $A B C D$), $s - x$ (faces $A B F E$ and $C D H G$), $s - z$ (faces $E F V$ and $G H V$). And we can easily verify that such numbering always has the required property (all vertices are assigned the number $2s$).

We know four different numbers out of nine numbers $x, x, z, z, s, s-x, s-x, s-z, s-z$, i.e., four numbers out of five numbers $x, z, s, s-x, s-z$.

a) If the unknown fifth number is $s$, the known numbers form two pairs with the same sum: $x + (s - x) = z + (s - z)$. For the given numbers, we have the only possibility $25 + 57 = 32 + 50 = 82$. The sought numbers are then $25, 32, 50, 57$, and 82.

b) If the unknown fifth number is not $s$, one known number (and that is $s$) is the sum of the other two known numbers: $s = x + (s - x)$, or $s = z + (s - z)$. For the given numbers, the only possibility is $25 + 32 = 57$. Then $s = 57$ and the sought quintuple consists of the numbers 7, 7, 25, 32, and 50.

Answer. The sought numbers are either $25, 32, 50, 57$, and 82, or the numbers $7, 7, 25, 32$, and 50.

We will also outline how a purely algebraic approach might look - solving nine equations with ten unknowns.

For clarity, we need to be careful about labeling the individual numbers written on the faces. Let's denote the numbers on the faces $A B F E, B C G F, C D H G, D A E H, E F V, F G V, G H V, H E V$, and $A B C D$ as $a_{1}, a_{2}, a_{3}, a_{4}, b_{1}, b_{2}, b_{3}, b_{4}, c$ respectively, and let the common sum of the numbers on the faces at each vertex be $s$. We then get the following nine equations:

\[
\begin{aligned}
a_{1} + a_{2} + b_{1} + b_{2} & = s, \\
a_{2} + a_{3} + b_{2} + b_{3} & = s, \\
a_{3} + a_{4} + b_{3} + b_{4} & = s, \\
a_{4} + a_{1} + b_{4} + b_{1} & = s, \\
a_{1} + a_{2} + c & = s, \\
a_{2} + a_{3} + c & = s, \\
a_{3} + a_{4} + c & = s, \\
a_{4} + a_{1} + c & = s, \\
b_{1} + b_{2} + b_{3} + b_{4} & = s.
\end{aligned}
\]

By comparing equations (B) and (C), we get $a_{1} = a_{3}$. By comparing equations (D) and (C), we get $a_{2} = a_{4}$.

Using these relationships, we further get: by comparing equations (F) and (G), we get $b_{1} = b_{3}$; by comparing equations (G) and (H), we get $b_{2} = b_{4}$.

This means that for the numbers $a_{1}, a_{2}, b_{1}, b_{2}$, and $c$, we are left with the equations

\[
\begin{aligned}
a_{1} + a_{2} + b_{1} + b_{2} & = s, \\
a_{1} + a_{2} + c & = s, \\
b_{1} + b_{2} & = \frac{1}{2} s.
\end{aligned}
\]

From this, we easily get that $c = a_{1} + a_{2} = b_{1} + b_{2} = \frac{1}{2} s$.