You are on page 1of 4

Problem Set 4

Thach
July 18, 2022

1 Row Magic and Column Magic


Let the position of number a be in row i and column j as ai,j In an n×n square,
the rows and columns can be expressed as
a1,1 a1,2 ... a1,n
a2,1 a2,2 ... a2,n
.. .. .. ..
. . . .
an,1 an,2 ... an,n
The sum of 1 row
a1,1 + a1,2 + ... + a1,n = R
so the sum of n rows will be
(a1,1 +a1,2 +...+a1,n )+(a2,1 +a2,2 +...+a2,n )+...+(an,1 +an,2 +...+an,n ) = R+R+R....+R = nR
The sum of 1 column
a1,1 + a2,1 + ... + an,1 = C
so the sum of n columns will be
(a1,1 +a2,1 +...+an,1 )+(a1,2 +a2,2 +...+an,2 )+...+(a1,n +a2,n +...+an,n ) = C+C+C....+C = nC
Notice that the sum of n columns is similar to the sum of n rows through
rearranging algebraically, which implies
nR = nC
Which gives R = C so the square S is magic

2 Construct a 6x6 or 7x7 Filled Magic Square


For the 6x6 square I followed the uniform step method of
j
xj ≡ 2 + 2j + 4[ ] (mod 6)
6
j
yj ≡ 0 + 2j + 1[ ] (mod 6)
6

1
34 25 0 18 5 23
7 16 27 9 32 14
2 20 31 22 6 24
29 11 4 13 33 15
30 21 8 26 1 19
3 12 35 17 28 10

With magic sum of


6(62 − 1)
= 105
2
And the 7x7 square I followed the uniform step method of
j
xj ≡ 3 + j + 6[ ] (mod 7)
7
j
yj ≡ 0 + j + 5[ ] (mod 7)
7
29 38 47 0 9 18 27
37 46 6 8 17 26 28
45 5 7 16 25 34 36
4 13 15 24 33 35 44
12 14 23 32 41 43 3
20 22 31 40 42 2 11
21 30 39 48 1 10 19

With magic sum of


7(72 − 1)
= 168
2

3 Regular Squares
Example regular square where n = 5 in base 5

31 43 00 12 24
42 04 11 23 30
03 20 22 34 41
14 21 33 40 02
20 32 44 01 13

Example regular square where n = 5 in decimal

16 23 0 7 14
22 4 6 13 15
3 5 12 19 21
9 11 18 20 2
10 17 24 1 8

The 5x5 regular square is magic with a magic sum of 60

2
4 Regular and Magic Squares
Example of 4x4 magic square that isn’t regular

0 14 13 3
11 5 6 8
7 9 10 4
12 2 1 15

In base 4
00 32 31 03
23 11 12 20
13 21 22 10
30 02 01 33
While this magic square has a magic sum of 30, it isn’t regular as there are
repitition of numbers in the units digit

5 Interchanging the Rows/Columns in Magic and


Regular Squares
As S is a magic square, switching the rows or columns will not change the magic
sum of T as it contains the same numbers, elements as before
Consider the magic square T after swapping the first and second row of
magic square S
a1,2 a1,1 ... a1,n
a2,2 a2,1 ... a2,n
.. .. .. ..
. . . .
an,2 an,1 ... an,n
We can clearly see the sum of each elements in each column will still be C
and the sum of each elements in each column n columns will still be nC
Applying the same logic, we can conclude that the sum of each elements in
each column n columns will still be nR.
Therefore, the square T is magic
As proved above, exchanging rows or columns in a magic square still result
in the newly created square being magic. This satisfies the first criteria for a
square to be regular. As each row and column have unique amounts of base-n
numbers from 0, 1, ..., n − 1 in the n’s position and units position.

a1,2 a1,1 ... a1,n


a2,2 a2,1 ... a2,n
.. .. .. ..
. . . .
an,2 an,1 ... an,n

3
If we consider the rows, exchanging the columns will just swap the position
of two numbers which were already accounted for in the rows when determining
if the square was regular

6 Systems of linear congruencies


a. Multiplying 17x + 23y ≡ 5 (mod 29) by 10 and 10x + 4y ≡ 11 (mod 29)
by 17 gives us
170x + 230y ≡ −50 (mod 29)
170x + 68y ≡ 187 (mod 29)
Subtracting the two congruences give

162y ≡ −137 (mod 29)

162y ≡ 8 (mod 29)


⇒y≡9 (mod 29)
We can substitute into one of the congruences,

10x + 4(9) ≡ 11 (mod 29)

10x ≡ −25 (mod 29)


10x ≡ 4 (mod 29)
⇒ x ≡ 12 (mod 29)
Which we get the general solution

x = 29c1 + 12

y = 29c2 + 9
b.
j
21 ≡ 16 + 17j + 23[ ] (mod 29)
29
j
20 ≡ 9 + 10j + 4[ ] (mod 29)
29
The equation to find the x value is similar to 17x + 23y ≡ 5 (mod 29) and
the equation to find the y value is similar to 10x + 4y ≡ 11 (mod 29)

7 Extra-credit

You might also like