Results 1 to 7 of 7

Math Help - an interesting magic square

  1. #1
    MHF Contributor
    Joined
    Apr 2008
    Posts
    1,092

    an interesting magic square

    Given a 4x4 matrix with numbers a_1, a_2, ... a_{16}:

    \begin{bmatrix} a_1&a_2&a_3&a_4 \\ a_5&a_6&a_7&a_8 \\ a_9&a_{10}&a_{11}&a_{12} \\ a_{13}&a_{14}&a_{15}&a_{16} \end{bmatrix}

    Find numbers a_n such that each of the a_n is one of the numbers from 1 to 16 (each number is used exactly once), the sum of the numbers in each row and column sum to 34, and the sums of the following sets of numbers also equals 34: (a_1, a_4, a_{13}, a_{16}), (a_6, a_7, a_{10}, a_{11}), (a_2, a_3, a_{14}, a_{15}), (a_5, a_8, a_9, a_{12})
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Super Member

    Joined
    May 2006
    From
    Lexington, MA (USA)
    Posts
    11,707
    Thanks
    626
    Hello, icemanfan!

    This is a classic (very old) problem.


    Given a 4x4 matrix: . \begin{bmatrix} a_1&a_2&a_3&a_4 \\ a_5&a_6&a_7&a_8 \\ a_9&a_{10}&a_{11}&a_{12} \\ a_{13}&a_{14}&a_{15}&a_{16} \end{bmatrix}

    Find numbers a_n such that each of the a_n is one of the numbers
    from 1 to 16 (each number is used exactly once),
    the sum of the numbers in each row and column sum to 34,
    and the sums of the following sets of numbers also equals 34:

    . . \begin{bmatrix}*&\cdot&\cdot&* \\ \cdot&\cdot&\cdot&\cdot \\ \cdot&\cdot&\cdot&\cdot \\ *&\cdot&\cdot&*\end{bmatrix} . . \begin{bmatrix}\cdot&\cdot&\cdot&\cdot \\ \cdot&*&*&\cdot \\ \cdot&*&*&\cdot \\ \cdot&\cdot&\cdot&\cdot \end{bmatrix} . . \begin{bmatrix}\cdot&*&*&\cdot \\ \cdot&\cdot&\cdot&\cdot \\ \cdot&\cdot&\cdot&\cdot \\ \cdot&*&*&\cdot\end{bmatrix} . . \begin{bmatrix}\cdot&\cdot&\cdot&\cdot \\ *&\cdot&\cdot&* \\ *&\cdot & \cdot & * \\ \cdot&\cdot&\cdot&\cdot \end{bmatrix}

    The simplest solution:

    . . . \begin{array}{|c|c|c|c|} \hline<br />
1 & 15 & 14 & 4 \\ \hline<br />
12 & 6 & 7 & 9 \\ \hline\<br />
8 & 10 & 11 & 5 \\ \hline<br />
13 & 3 & 2 & 16 \\ \hline \end{array}



    This magic square satisfies the above requirements
    . . and has a sum of 34 in the followng positions:


    The two diagonals:

    . . . \begin{bmatrix}*&\cdot&\cdot&\cdot \\ \cdot&*&\cdot&\cdot \\ \cdot&\cdot&*&\cdot \\ \cdot&\cdot&\cdot&*\end{bmatrix} . . \begin{bmatrix}\cdot&\cdot&\cdot&* \\ \cdot&\cdot&*&\cdot \\ \cdot&*&\cdot&\cdot \\ *&\cdot&\cdot&\cdot\end{bmatrix}


    The corner 2x2's:

    . . . \begin{bmatrix}*&*&\cdot&\cdot \\ *&*&\cdot&\cdot \\ \cdot&\cdot&\cdot&\cdot \\ \cdot&\cdot&\cdot&\cdot \end{bmatrix} . . \begin{bmatrix}\cdot&\cdot&*&* \\ \cdot&\cdot&*&* \\ \cdot&\cdot&\cdot&\cdot \\ \cdot&\cdot&\cdot&\cdot \end{bmatrix} . . \begin{bmatrix}\cdot&\cdot&\cdot&\cdot \\ \cdot&\cdot&\cdot&\cdot\\ *&*&\cdot&\cdot \\ *&*&\cdot&\cdot \end{bmatrix} . . \begin{bmatrix}\cdot&\cdot&\cdot&\cdot \\ \cdot&\cdot&\cdot&\cdot \\ \cdot&\cdot&*&* \\ \cdot&\cdot&*&* \end{bmatrix}


    These two "rectangles":

    . . . \begin{bmatrix}\cdot&*&\cdot&\cdot \\ *&\cdot&\cdot&\cdot \\ \cdot&\cdot&\cdot&* \\ \cdot&\cdot&*&\cdot \end{bmatrix} . . \begin{bmatrix}\cdot&\cdot&*&\cdot \\ \cdot&\cdot&\cdot&* \\ *&\cdot&\cdot&\cdot \\ \cdot&*&\cdot&\cdot \end{bmatrix}


    Follow Math Help Forum on Facebook and Google+

  3. #3
    MHF Contributor
    Joined
    Dec 2007
    From
    Ottawa, Canada
    Posts
    3,100
    Thanks
    67
    With your restrictions only, Iceman, there are 8200 solutions
    (including mirrors) with 1 in top left corner
    Follow Math Help Forum on Facebook and Google+

  4. #4
    MHF Contributor
    Joined
    Dec 2007
    From
    Ottawa, Canada
    Posts
    3,100
    Thanks
    67
    Adding Soroban's, plus these 4 (x's = 34):
    x o x o : o x o x : o o o o : o o o o
    o o o o : o o o o: x o x o : o x o x
    o o o o : o o o o: x o x o : o x o x
    x o x o : o x o x : o o o o : o o o o

    Here's 2 solutions:
    01 06 12 15 : 01 07 12 14
    11 16 02 05 : 10 16 03 05
    14 09 07 04 : 15 09 06 04
    08 03 13 10 : 08 02 13 11
    Last edited by Wilmer; February 21st 2010 at 07:43 AM. Reason: none
    Follow Math Help Forum on Facebook and Google+

  5. #5
    Super Member

    Joined
    May 2006
    From
    Lexington, MA (USA)
    Posts
    11,707
    Thanks
    626
    . . . . For Your Information . . .


    You can easily reconstruct that Magic Square with this procedure.


    Draw a 4-by-4 grid and mentally note the cells on the two diagonals.

    . . \begin{array}{|c|c|c|c|}\hline<br />
* &\;\;&\;\;&* \\ \hline<br />
&*&*& \\ \hline<br />
 &*&* & \\ \hline<br />
*&&&* \\ \hline \end{array}


    Starting at the upper-left, write the numbers 1-to-16,
    . . in order, down the grid,
    . . but only in the diagonal cells.

    . . \begin{array}{|c|c|c|c|}\hline<br />
{\color{blue}1} &\;\;&\;\;&{\color{blue}4} \\ \hline<br />
& {\color{blue}6} & {\color{blue}7} & \\ \hline<br />
 & {\color{blue}10}& {\color{blue}11} & \\ \hline<br />
{\color{blue}13}&&& {\color{blue}16} \\ \hline \end{array}



    Starting at the lower-right, write the numbers 1-to-16
    . . in order, up the grid,
    . . but only in the unoccupied cells.

    . . \begin{array}{|c|c|c|c|}\hline<br />
1 &{\color{red}15}&{\color{red}14}&4 \\ \hline<br />
{\color{red}12}&6&7&{\color{red}9}\\ \hline<br />
{\color{red}8}&10&11 &{\color{red}5} \\ \hline<br />
13&{\color{red}3}&{\color{red}2}&16 \\ \hline \end{array}


    . . There!

    Follow Math Help Forum on Facebook and Google+

  6. #6
    MHF Contributor
    Joined
    Apr 2008
    Posts
    1,092
    Very nice solutions, Wilmer and Soroban.

    This was the first one I came up with:

    \begin{bmatrix}15 & 4 & 14 & 1 \\ 12 & 7 & 9 & 6 \\ 5 & 10 & 8 & 11 \\ 2 & 13 & 3 & 6 \end{bmatrix}

    Inspired by the smaller matrix

    \begin{bmatrix} 4 & 1 \\ 1 & 4 \end{bmatrix}

    I started with this:

    \begin{bmatrix} 16 & 4 & 13 & 1 \\ 12 & 8 & 9 & 5 \\ 5 & 9 & 8 & 12 \\ 1 & 13 & 4 & 16 \end{bmatrix}

    Then I either added one or subtracted one from the numbers in the starred positions:

    \begin{bmatrix} * & 4 & * & 1 \\ 12 & * & 9 & * \\ 5 & * & 8 & * \\ * & 13 & * & 16 \end{bmatrix}
    Follow Math Help Forum on Facebook and Google+

  7. #7
    Banned
    Joined
    Oct 2009
    Posts
    769

    Reply

    Assuming that a_{n} = n, then just reverse or flip the diagonals to get a magic square (further operations will produce the remaining 879 normal magic squares).
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Help with a 3-d magic square
    Posted in the Math Puzzles Forum
    Replies: 1
    Last Post: January 14th 2012, 11:24 PM
  2. A magic square?
    Posted in the Math Puzzles Forum
    Replies: 31
    Last Post: August 22nd 2010, 06:25 PM
  3. Basis of a 3x3 magic square
    Posted in the Advanced Algebra Forum
    Replies: 7
    Last Post: April 20th 2010, 09:26 AM
  4. Prime Magic Square
    Posted in the Math Challenge Problems Forum
    Replies: 2
    Last Post: April 24th 2008, 06:28 AM
  5. magic square
    Posted in the Number Theory Forum
    Replies: 18
    Last Post: September 29th 2006, 10:00 PM

Search Tags


/mathhelpforum @mathhelpforum