Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^2: Not A Magic Square But Similar

by kennethk (Abbot)
on Sep 06, 2013 at 20:04 UTC ( #1052761=note: print w/ replies, xml ) Need Help??


in reply to Re: Not A Magic Square But Similar
in thread Not A Magic Square But Similar

Also:

1 2 3 4 5 6 8 9 10 1 2 3 5 6 7 9 10 11 1 2 4 5 6 8 9 10 12
Any additive offset to a row or column from a valid state that doesn't cause a value collision also satisfies the permutation condition.
3 6 9 2 5 8 1 4 7 1 2 3 7 8 9 4 5 6 2 1 3 5 4 6 8 7 9
Rotations, row swaps and column swaps also yield valid results. Of course, these are actually a subset of the additive transformation. If you think about it, the 1 .. 9 square is just the all 1's square subjected to 9 row additions and 3 column additions; the minimum necessary number to achieve element uniqueness.

The real question for me is are there valid results which are not mappable via addition to the base square.


#11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.


Comment on Re^2: Not A Magic Square But Similar
Select or Download Code
Re^3: Not A Magic Square But Similar
by Limbic~Region (Chancellor) on Sep 08, 2013 at 22:55 UTC
    kennethk,
    The real question for me is are there valid results which are not mappable via addition to the base square

    Yes and I am kicking myself for not including this in the list of trivial cases I had considered (as this is not my intent). In any event, if I had to make this work I could but I isn't what I was hoping for.

    Cheers - L~R

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1052761]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (11)
As of 2015-07-07 09:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (88 votes), past polls