Can you partition the numbers 1, 2, 3, ... nē in n separate subsets, each with n numbers, all subsets having the same sum?
Here is the procedure with N = 4.
Fill a 4x4 array, say A, with the numbers 1-16:
A | 0| 1| 2| 3|
--+--+--+--+--+
0 | 1| 2| 3| 4|
--+--+--+--+--+
1 | 5| 6| 7| 8|
+--+--+--+--+
2 | 9|10|11|12|
+--+--+--+--+
3 |13|14|15|16|
+--+--+--+--+
Cycle row R left R places
A | 0| 1| 2| 3|
--+--+--+--+--+
0 | 1| 2| 3| 4|
--+--+--+--+--+
1 | 6| 7| 8| 5|
+--+--+--+--+
2 |11|12| 9|10|
+--+--+--+--+
3 |16|13|14|15|
+--+--+--+--+
34 34 34 34
The columns add up to 34 = [N^2*(N^2+1)/2]/N.
An element of the array A is
A(R,C) = N*R + mod(R+C,N) + 1
Summing a column,
sum(A(R,C),R=0 to N-1)
= sum(N*R + mod(R+C,N) + 1,R=0 to N-1)
= sum(N*R,R=0 to N-1) +
sum(mod(R+C,N),R=0 to N-1) +
sum(1,R=0 to N-1)
= N*sum(R,R=0 to N-1) +
sum(R,R=0 to N-1) +
N
= (N+1)*sum(R,R=0 to N-1) + N
= (N+1)*[N*(N-1)/2] + N
= [N^2*(N^2+1)/2]/N.
|
Posted by Bractals
on 2005-08-28 16:39:14 |