Home > Numbers
Squaring a Square Grid (Posted on 2009-10-10) |
|
Place 16 nonzero base ten digits in the cells of a 4x4 square grid, with each digit occurring in a cell exactly once. The digits can be considered as forming eight 4-digit numbers, read left to right and top to bottom, each of which is a perfect square. Since there are more than nine cells, there will be an obvious repetition of digits.
Computer solution
|
Comment 4 of 4 |
|
I’m assuming that the 8 numbers do not need to be different. Then the only grid I could find looks like this:
2 1 1 6 1 2 2 5 1 2 9 6 6 5 6 1
As Jim remarked, digits in the 4th row and column need to belong to {1,4,5,6,9} which limits the possibilities to three squares only, all ending in different digits, so the 4th row and column must be the same. This fact could lead to much more subtle programming, but I chose the sledge-hammer approach below.
Incidentally, if zeros are allowed, I found six possible grids and all of them were symmetric.
A := []: for i from 32 to 99 do v := convert(i^2,base,10): if member(0,v)=false then A:=[op(A),Reverse(v)]:end if: end do: B:=permute(A,4): for b in B do cols:= convert(Transpose(b),set): if intersect(cols,convert(A,set))=cols then print(convert(b,Array)):end if: end do:
|
Posted by Harry
on 2009-10-10 23:25:32 |
|
|
Please log in:
Forums (0)
Newest Problems
Random Problem
FAQ |
About This Site
Site Statistics
New Comments (3)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On
Chatterbox:
|