All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Numbers
Squaring a Square Grid (Posted on 2009-10-10) Difficulty: 3 of 5
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.

No Solution Yet Submitted by K Sengupta    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution 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:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (9)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2017 by Animus Pactum Consulting. All rights reserved. Privacy Information