##
Card Magic Square

Remove the all the cards A,2,3,4,5,6,7,8,9 from a deck of cards. There
are four of each value for a total of 36 cards. Can you place the cards
into a 6x6 grid such that each row, column, and main
diagonal has the same sum, and no card value is repeated in any sum. (Let Ace be a value of 1.)

Perhaps this is too unrestrictive? Can it be solved if we also require
that each marked 3x2 rectangle also have the same sum?

Source: Original.

I received a very nice solution from Claudio Baiocchi which solves all
aspects of the
problem. Instead of just solving for the 2x3 rectangles, he found a
solution where every line of three cards has a sum of 15. This of
course meets the requirements for both the 2x3 **and** the 3x2
rectangles.
A68 249
924 735
573 68A
68A 924
249 573
735 A68
==================================================
A) The magic sum must be 30. This is immediate. [KD: (Sum of all cards)/6 = 30]
B) The strings with 6 distinct elements and with sum 30 are the permutations
of one of the 8 strings, here down denoted by letters from "a" to "i"; the
easy proof can be shortened by looking at their complements
(strings of length 3 with sum 15):
a = 234678, say all but 159
b = 234579, say all but 168
c = A35678, say all but 249
d = A34679, say all but 258
e = A34589, say all but 267
f = A25679, say all but 348
g = A24689, say all but 357
h = A23789, say all but 456
C) The global restriction on the board (exactly 4 cards of each type) can be
accomplished only in 3 ways:
- C1) the 6 rows are, in some order, permutations of the strings a,b,c,e,f,g;
- C2) the 6 rows are, in some order, permutations of the strings a,a,e,e,f,f;
- C3) the 6 rows are, in some order, permutations of the strings b,b,c,c,g,g.
In particular the strings d and h can appear only as diagonals. Here again the
proof simplifies by looking at the complements (they must give twice each number).
D) If we look for a solution of type (C2), then columns must be of type (C3);
the restrictions killing a lot of permutations, the number of possibilities
becomes very low; and we end up with the solution:
h f a e f a e d
\ | | | | | | /
\ | | | | | | /
g-- A 6 8 2 4 9 --g
b-- 9 2 4 7 3 5 --b
c-- 5 7 3 6 8 A --c
g-- 6 8 A 9 2 4 --g
b-- 2 4 9 5 7 3 --b
c-- 7 3 5 a 6 8 --c
/ | | | | | | \
/ | | | | | | \
d f a e f a e h

Mail to Ken