SMC 2012 Q19
19. The numbers 2, 3, 4, 5, 6, 7, 8 are to be placed, one per square, in the diagram shown so that the sum of the four numbers in the horizontal row equals 21 and the sum of the four numbers in the vertical column also equals 21. In how many different ways can this be done?
- A 0
- B 2
- C 36
- D 48
- E 72

Senior Mathematical Challenge 2012, Question 19. © UK Mathematics Trust. Original paper on ukmt.org.uk
Answer: E 72
Note that the number represented by \(x\) appears in both the horizontal row and the vertical column. Note also that \(2 + 3 + 4 + 5 + 6 + 7 + 8 = 35\). Since the numbers in the row and those in the column have sum 21, we deduce that \(x = 2 \times 21 - 35 = 7\).
We now need two disjoint sets of three numbers chosen from 2, 3, 4, 5, 6, 8 so that the numbers in both sets total 14. The only possibilities are {2, 4, 8} and {3, 5, 6}. We have six choices of which number to put in the top space in the vertical line, then two for the next space down and one for the bottom space. That leaves three choices for the first space in the horizontal line, two for the next space and one for the final space. So the total number of ways is \(6 \times 2 \times 1 \times 3 \times 2 \times 1 = 72\).

Solution © UK Mathematics Trust, from the SMC 2012 solutions. Longer versions with investigations: Solutions and investigations (PDF).