## Task 4 - 250934

The eight numbers 1, $2, \ldots, 8$ are to be distributed to the vertices of a cube in such a way that the following conditions are met:

(1) Each vertex of the cube is assigned exactly one of the eight numbers, and each of these numbers must appear in the distribution.

(2) If one adds the four numbers at the vertices of each face of the cube, the sum on all six faces is the same.

As many distributions of the eight numbers to the vertices should be compiled as possible, such that each of these distributions meets conditions (1), (2), and no two of these distributions are congruent to each other, i.e., can be transformed into each other by rotation or reflection.

Determine the number of distributions that appear in such a compilation!
The vertices of the cube are labeled $A$ to $H$, where $A, B, C,$ and $D$ are the vertices of one face in this order, and $E, F, G, H$ are the vertices of the parallel face, with $A$ connected to $E$, $B$ to $F$, $C$ to $G$, and $D$ to $H$ by an edge. We identify a vertex with the number that stands at that vertex, so we write, for example, $A=1$ if the number 1 stands at vertex $A$. (This is possible because, by condition (1), each of the eight numbers stands at exactly one vertex.)

If we sum the vertex numbers for all six faces and then sum these six sums, we obtain a sum that contains each vertex number exactly three times, once for each face. If $S$ is the sum of the vertex numbers for each face, which is the same for all faces by condition (2), then we have $6 \cdot S = 3 \cdot (A + B + \cdots + H) = 3 \cdot (1 + 2 + \cdots + 8) = 3 \cdot \frac{8 \cdot 9}{2} = 3 \cdot 36 = 108$, so $S = \frac{108}{6} = 18$.

Without loss of generality, we can assume through possible rotation that $A=1$.

Then $B$ cannot be 2, because otherwise both $C+D$ and $E+F$ would have to be $18 - 2 - 1 = 15$. This sum can only be achieved with the numbers 1 to 8 in the unique way $7 + 8$,

![](https://cdn.mathpix.com/cropped/2024_06_06_b85a894aa8dbf722a7b3g-1069.jpg?height=52&width=1596&top_left_y=2104&top_left_x=230)
$E=2$ from: 1 and 2 cannot be adjacent.

Case 1: The 2 is on the same face as 1. This is only possible if it is diagonally opposite to 1 on that face. Thus, we can assume through possible rotation that $C=2$. Then $B+D = 18 - 2 - 1 = 15 = 8 + 7$, so through possible reflection, we can assume $B=8$ and $D=7$. For $A + B + E + F = 18$ to hold, $E + F = 9$ and similarly $G + H = 9$, which can only be achieved with the remaining numbers as $4 + 5 = 9$ and $3 + 6 = 9$. Additionally, $B + C + F + G = 18$, so $F + G = 18 - 8 - 2 = 8$, which can only be achieved as $3 + 5$ with the remaining numbers.

Case 1.1: $F = 3$. Then $G = 5$, $E = 6$, and $H = 4$. One can quickly verify that this distribution satisfies both conditions. (Here, 1 has neighbors 6, 7, and 8.)

Case 1.2: $F = 5$. Then $G = 3$, $E = 4$, and $H = 6$. Here, too, one can quickly verify that it is a solution. (Here, 1 has neighbors 4, 7, and 8.)

Case 2: The 2 is not on the same face as 1. Then the only remaining vertex is $G$, which must be 2. It follows that 1 and 3 must be on the same face, so without loss of generality, after possible rotation around the space diagonal $A G$, we can assume $3 \in \{B, C, D\}$.

Case 2.1: $B = 3$ or $D = 3$. After possible reflection in the plane through $A, C, E,$ and $G$, we can assume $B = 3$. It follows, as above, that $C + D = E + F = 14$, which can only be achieved with different summands from $\{1, \ldots, 8\}$ as $14 = 8 + 6$, so $\{E, F\} = \{C, D\}$ would follow, contradicting (1). Therefore, there is no valid distribution in this case.

Case 2.2: $C = 3$. Then, analogously to Case 1, $B + D = 14$, so after possible reflection, $B = 8$ and $D = 6$. From $A + B + E + F = 18$, it follows that $E + F = 11$, which can only be achieved with the remaining numbers as $11 = 4 + 7$, so $F \in \{4, 7\}$. On the other hand, $B + C + F + G = 18$, so $F = 18 - 8 - 3 - 2 = 5$, which is a contradiction, so there is no valid solution in this case either.

In total, there are exactly two different arrangements. Since in these, 1 has different neighbors, they cannot be transformed into each other by rotation or reflection.