Pepi needs to place all the numbers from 1 to 8 on the following board in such a way that the sum of the two numbers placed in each column is always the same value $S$.

|  |  |  |  |
| :--- | :--- | :--- | :--- |
|  |  |  |  |

a) Show Pepi one way to place the numbers.

b) Convince Pepi that the only possible value for $S$ is 9.

c) Calculate the number of ways in which Pepi can place the numbers.
Solution

a) One way to place the numbers is as follows

| 1 | 2 | 3 | 4 |
| :--- | :--- | :--- | :--- |
| 8 | 7 | 6 | 5 |

b) The sum of all the numbers placed on the board can be calculated by first adding the two numbers in each column and then adding the sums obtained. Since the sum in each column is equal to $S$, the sum of all the numbers is $4 \times S$. Therefore,

$$
4 \times S = 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8
$$

Thus, we obtain $S = 9$.

c) We know that the sum in each column must be $S = 9$. The pairs that sum to 9 are

$$
\{1,8\}, \quad\{2,7\}, \quad\{3,6\}, \quad\{4,5\}.
$$

The pair $\{1,8\}$ can be placed in any of the 4 columns. Once this is done, there would be 3 columns left for placing the pair $\{2,7\}$. After placing the first two pairs, there would be 2 columns left for the pair $\{3,6\}$, and finally, the pair $\{4,5\}$ would be placed in the only remaining column. Therefore, there are

$$
4 \times 3 \times 2 \times 1
$$

ways to associate each pair with each column. However, once the column for each pair is chosen, there are 2 ways to place each pair in the corresponding column cells. Thus, we would count

$$
2^4 \times (4 \times 3 \times 2) = 384
$$

ways in which Pepi can place the numbers on the board.