a) Show a way to separate all the numbers from 1 to 16 into four sets with four numbers each, so that each set has the same sum.

b) Show that there are at least 1024 ways to write the numbers from 1 to 16 in each of the cells of a $4 \times 4$ board so that the sum of the numbers in each row is equal.
Solution

a) First, form eight pairs of numbers by choosing opposite numbers around the "middle" of the sequence, that is, $(1,16),(2,15), \ldots,(7,10)$ and $(8,9)$. Notice that each pair has a sum of 17. Now, group the pairs into four groups, each with a sum of 34, for example: $(1,16,2,15)$, $(3,14,4,13)$, $(5,12,6,11)$, and $(7,10,8,9)$.

b) See that the numbers obtained in the previous item provide an example of how to place the numbers in each row. We will show that there are at least 1024 distinct variations of this example. In each row, we can "rotate" the numbers four times to the left, resulting in the sequences: $(1,16,2,15)$, $(16,2,15,1)$, $(2,15,1,16)$, and $(15,1,16,2)$. Additionally, we can "rotate" the rows four times from top to bottom. Thus, by only rotating the "example" constructed, we have at least 4 variations within each row and 4 more for rotations between the rows. Therefore, in total, we will have

$$
\underbrace{(4 \times 4 \times 4 \times 4)}_{\text {variations within the rows }} \times \underbrace{4}_{\text {rotations between the rows }}=1024
$$

ways to accomplish this task. The figure below shows some examples of boards that can be obtained by the described rotation operations:

| 1 | 16 | 2 | 15 |
| :---: | :---: | :---: | :---: |
| 3 | 14 | 4 | 13 |
| 5 | 12 | 6 | 11 |
| 7 | 10 | 8 | 9 |


| 16 | 2 | 15 | 1 |
| :---: | :---: | :---: | :---: |
| 3 | 14 | 4 | 13 |
| 12 | 6 | 11 | 5 |
| 10 | 8 | 9 | 7 |


| 10 | 8 | 9 | 7 |
| :---: | :---: | :---: | :---: |
| 16 | 2 | 15 | 1 |
| 3 | 14 | 4 | 13 |
| 12 | 6 | 11 | 5 |