A $4$ x $4$ square board is called $brasuca$ if it follows all the conditions: • each box contains one of the numbers $0, 1, 2, 3, 4$ or $5$; • the sum of the numbers in each line is $5$; • the sum of the numbers in each column is $5$; • the sum of the numbers on each diagonal of four squares is $5$; • the number written in the upper left box of the board is less than or equal to the other numbers the board; • when dividing the board into four $2$ × $2$ squares, in each of them the sum of the four numbers is $5$. How many $"brasucas"$ boards are there?
Problem
Source: Cono Sur Math Olympiad 2020
Tags: combinatorics
27.12.2020 16:59
First, if the box in the upper left corner is 1, we have a total of 6 boards. Now suppose it's 0. Consider the following boxes with 1s in it: 0*** **11 *1** 11** Realize that they (together with the box in the upper left corner) define the whole board. With that in mind, see all values missing and find the inequalities enough to solve them. The answer for this case is 252 leading to a total of 258 boards.
13.03.2021 23:15
Solution from Twitch Solves ISL: Let $S = 5$. Let's first consider the case where the upper-left number is $0$. Then there is a bijection between ordered $6$-tuples of nonnegative integers $(a,b,c,d,x,y)$ with sum $S$, and brasuca boards, given as follows: \[ \begin{array}{cc|cc} 0 & a+b & c+x & d+y \\ c+d & x+y & {\color{red}a} & {\color{red}b} \\ \hline a+y & {\color{red}c} & b+d & {\color{red}x} \\ b+x & {\color{red}d} & {\color{red}y} & a+c \end{array} \]Indeed, the six numbers written can be checked to uniquely determine the board; conversely, the board is obviously valid. Hence, the number of boards with $0$ in the upper-left hand corner is exactly $\binom{S+5}{5} = 252$ by sticks-and-stones. For the case where the upper-left number is $1$ is the same, one subtracts $1$ from every number on the board to arrive at the same problem with $S = 1$ instead. The answer then is $\binom{S+5}{5} = 6$. Hence the final answer is $258$. Remark: In general, if $5$ is replaced by a target $T$, the answer would simply be \[ \binom{T+5}{5} + \binom{T+1}{5} + \binom{T-3}{5} + \cdots. \]