http://www.perlmonks.org?node_id=1052767


in reply to Re: Not A Magic Square But Similar (Finite Geometry)
in thread Not A Magic Square But Similar

For the 3² square, you are correct; we have 6 constraints, as opposed to the magic square's 8 (or really 5 as opposed to 7, given arbitrary normalization). However, for 4², we have 24 constraints as opposed to a magic square's 10; in general, constraint count grows factorially as opposed to the magic square's linear. Of course, I'm out of my depth w.r.t. geometry here, so maybe there's another mapping I'm missing.

#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 (Finite Geometry)

Replies are listed 'Best First'.
Re^3: Not A Magic Square But Similar (Finite Geometry)
by LanX (Saint) on Sep 06, 2013 at 21:37 UTC
    Nope I was too lazy to update the cases of non-parallel "sections"¹, only mentioned it in reply to hdb (whose solution makes mine obsolete).

    But I think that hdb's solution resp. your generalization already describe the complete solution room and that all possible magic square can be found there by mapping rows to diagonals.

    So since the other way round works you will always find a back-projection from magic to "limbic" square.

    Too tired to dig into proving it, but looking into the literature for magic squares should show it's trivial.

    (unproven opinion)

    Cheers Rolf

    ( addicted to the Perl Programming Language)

    update

    ¹) and I'm still not sure if L~R really wants them.