Suppose you want to fill the 5x5 square below with the following restrictions:
(1) The numbers 1-5 must appear in every row and column;
(2) The sum of the numbers in gray boxes is 2 (mod 6).
What number must go in the center square?
Don't care about the white squares, just care about the grey squares.
We can fill the horizontal grey row with 1 2 3 4 5
The remaining four grey squares will contain 4 numbers from the list 1 2 3 4 5
Since is 2 (mod 6)
we just guess and check
1 + 2 + 3 + 4 + 5 = 15
That is the sum of the center horizontal row.
We then can guess and check the sum of the vertical row plus 15 to see if it fits 2 mod ( 6)
Lets say the center square is 1?
Then 29 / 6 remainder is 5
center square is 2?
Then 28 / 6 remainder is 4
Center square is 3?
then 27/6 remainder is 3
Center square is 4?
then 26/6 remainder is 2
Center squar eis 5?
25/6 remainder is 1
We see by guess and checking that the answer is 4, four should go into the center square
I actually used guess and check in this problem XD XD, I only understood the format meaning of modulus I actually barely even know how to apply it.
Suppose you want to fill the 5x5 square below with the following restrictions:
(1) The numbers 1-5 must appear in every row and column;
(2) The sum of the numbers in gray boxes is 2 (mod 6).
What number must go in the center square?
Let the number go in the center square =x
Let the sum of the numbers 1+2+3+4+5=15
Let the sum of the numbers in gray boxes =15+(15−x)
Then:
15+(15−x)≡2(mod6)30−x≡2(mod6)|30(mod6)=00−x≡2(mod6)−x≡2(mod6)|⋅(−1)x≡−2(mod6)x≡−2+6(mod6)x≡6−2(mod6)x≡4(mod6)
The number 4 must go in the center square.