7.5. At each vertex of a cube lives a number, not necessarily positive. All eight numbers are distinct. If a number is equal to the sum of the three numbers living in the adjacent vertices, then it is happy. What is the maximum number of happy numbers that can live at the vertices of the cube?
Answer: 8.

Solution. See, for example, Fig. 7.5a. It is easy to verify that each vertex of the cube contains a lucky number.

There are other examples as well. Let's understand how they are structured (this was not required of the olympiad participants). Let's denote the numbers at the vertices of the cube (see Fig. 7.5b). First, write down two equations for the opposite vertices of the lower square: $a=a_{1}+b+d$ (1); $c=c_{1}+b+d$ (2). Subtracting equation (2) from equation (1), we get: $a-c=a_{1}-c_{1}$ (3).

Now, write down similar equations for two vertices of the vertical edge: $b=b_{1}+a+c$ (4); $b_{1}=b+a_{1}+c_{1}$ (5). Substituting $b_{1}$ from equation (5) into equation (4), we get: $a+c=-a_{1}-c_{1}$ (6). Combining equations (3) and (6) into a system, we get that $a=-c_{1}$; $c = -a_{1}$. Thus, the numbers in opposite vertices of the cube must be opposite (similar equations for the other two pairs of numbers follow from the symmetry of the cube).

Therefore, to construct any example, it is sufficient to choose one vertex of the cube and denote the numbers in the adjacent vertices, for example, as $x$, $y$, and $z$. To make the chosen vertex lucky, place the number $x+y+z$ in it. It is only required that the absolute values of the numbers $x$, $y$, $z$, and $x+y+z$ be pairwise distinct. Then, place the numbers $-x$, $-y$, $-z$, and $-x-y-z$ in the opposite vertices, respectively. It is easy to verify that all eight numbers are lucky.

Grading criteria.

“+" Correct answer and correct example provided

“-" Only the answer is provided

“-” Incorrect example or no example provided
![](https://cdn.mathpix.com/cropped/2024_05_06_9345244ec41b32b80e18g-2.jpg?height=942&width=464&top_left_y=1436&top_left_x=1458)