Brain Teasers
Magic Rectangles
A magic rectangle is an m × n array
of the positive integers from 1 to m × n such that the numbers
in each row have a constant sum and the numbers in each column have a constant
sum (although the row sum need not equal the column sum). Shown below is a 3 × 5
magic rectangle with the integers 1-15.
6
|
7
|
8
|
9
|
10
|
13
|
3
|
1
|
11
|
12
|
5
|
14
|
15
|
4
|
2
|
Two of three arrays at left can be
filled with the integers 1-24 to form a magic rectangle. Which one can’t, and
why not?
This brainteaser was written by
Patrick Vennebush.
Solution: The first array,
which has 3 rows and 8 columns, cannot be filled to create a magic
rectangle.
The integers 1-24 have a sum of 300. This sum can
be determined by noticing that the numbers can be regrouped as 12 pairs of
numbers with a sum of 25 each:
(1 + 24) + (2 + 23) + (3 +
22) + … + (12 + 13) = 300
In general, the sum of the first n
positive integers is given by the following formula:
Because the sum of the integers 1-24 is 300, to be placed in the 3 ×
8 array to form a magic rectangle, the sum of each row would have to be 300 ÷ 3
= 100. This can be done in a number of ways. However, the sum of each column
would have to be 300 ÷ 8 = 37.5, which is impossible.
In general, a
magic rectangle can be created only if the number of rows and number of columns
are both even or both odd; that is, a magic rectangle cannot be created if one
is even and the other is odd.
The other arrays can be filled in many
different ways. One example of each is shown below.
More Brain Teasers