# A chess board with numbers

A 8x8 chess board is marked with the numbers from 1 to 64 sequentially from left to right, row by row and top to bottom. Now a minus sign is added to 32 of those numbers such that in each row and in each column there are exactly 4 positive and 4 negative numbers. All 64 numbers are now added up.

What is the smallest sum, which can be achieved? • Smallest as in smallest absolute value (closest to zero) or absolute smallest (most negative number)? – Rand al'Thor Feb 19 '20 at 16:25
• I see what you did there with the second tag. – Nautilus Feb 19 '20 at 18:40

The smallest sum that can be achieved is

$$0$$

Because

This will always be the sum

Reasoning

The entries in the $$n$$th row in the given grid may be written as $$\{8n -7, 8n -6, 8n-5, 8n-4, 8n-3, 8n -2, 8n-1, 8n \}$$ Notice that when we negate four entries in a single row and take the row sum, the parts containing $$n$$ all cancel out. Since the total sum is just the sum of row sums, the problem is thus equivalent to one in which each row is $$\{1,2,3,4,5,6,7,8\}$$ But, in this version of the problem, each column contains the same entry, so if we negate four entries in each column then the sum of the elements in each column is $$0$$ and hence, the overall sum is $$0$$

This is one of the first on puzzling.SE that I can actually do! :)

There are many ways to get $$0$$. Note that each row has precise $$4$$ or each $$+/-$$, so we can translate so that it's just eight copies of $$\{1, ..., 8\}$$. By symmetry, we have $$1 + 8 - 2 - 7 = 0 \quad\text{and}\quad 3+6 - 4-5 = 0.$$ So we can easily make each row sum to $$0$$. Other combinations work. Simply alternate these down each row, eg $$\begin{matrix} 1 & -2 & -3 & 4 & 5 & -6 & -7 & 8 \\ -1 & 2 & 3 & -4 & -5 & 6 & 7 & -8 \\ 1 & -2 & -3 & 4 & 5 & -6 & -7 & 8 \\ -1 & 2 & 3 & -4 & -5 & 6 & 7 & -8 \\ 1 & -2 & -3 & 4 & 5 & -6 & -7 & 8 \\ -1 & 2 & 3 & -4 & -5 & 6 & 7 & -8 \\ 1 & -2 & -3 & 4 & 5 & -6 & -7 & 8 \\ -1 & 2 & 3 & -4 & -5 & 6 & 7 & -8 \end{matrix}$$ There are loads of similar combinations.

If the summation cannot be a negative number, the minimum sum that can be achieved is 0. If the summation can be a negative number, then, the minimum that can be achieved is -107 (if the greatest numbers in each row is negated)

• Each column must have 4 +s and 4 -s though too, so your latter suggestion doesn't fit. – Ben Reiniger Feb 20 '20 at 20:38
• @BenReinger: Say row 1 has 1,2,3,4,5,6,7,8 - the lowest sum can be achieved if the numbers are 1,2,3,4,-5,-6,-7,-8.. Similarly if all the largest numbers within every row are made negative numbers, the smallest sum is achieved. Which is -107. – Manoj Balu Feb 20 '20 at 20:47
• @ManojBalu - remember you're not adding a row, but all 64 numbers – SeanC Feb 20 '20 at 21:15
• @ManojBalu more importantly (I think) remember there has to be 4(+) and 4(-) in each column besides each row – TCooper Feb 21 '20 at 1:07