# Magic Square Mixups [Challenge]

This kind of puzzle is different than your normal magic square puzzles. Here are 3, in increasing difficulty. Some numbers have been switched, and you have to find them and swap them around to make the magic square valid again.

The zeros are for formatting placeholders.

1. The numbers in each of line of five squares across, down, and diagonally should add up to 58, but in every row across and column there is one number of out place. Swap these with one another to make the total correct.
16 16 11 09 14
17 09 29 13 01
15 05 06 16 15
07 03 17 11 12
14 17 03 08 06

2. The numbers in each of line of six squares across, down, and diagonally should add up to 122, but in every row across and column there is one number of out place. Swap these with one another to make the total correct.
21 05 14 31 44 15
30 29 21 09 22 20
36 29 20 10 06 22
06 30 22 30 13 17
10 26 23 17 12 22
27 12 20 13 21 27

3. The numbers in each of line of seven squares across, down, and diagonally should add up to 123, but in every row across and column there is one number of out place. Swap these with one another to make the total correct.
31 19 10 13 14 32 15
06 21 17 22 30 17 07
17 30 17 24 17 11 08
07 22 33 13 15 17 11
14 16 21 22 13 11 29
16 13 03 19 12 12 43
27 13 19 13 20 18 11

Have fun!!

• Feels like a 2 dimensional rubik square version. – kanchirk Jul 30 '15 at 20:33
• By swap, do you mean strictly switch each one only once? Also, could I post a partial answer?(Because I can only do the first) – AJL Jul 30 '15 at 20:49
• Eek, I meant the last number in the second ROW should be "20" not "02" – OpiesDad Jul 30 '15 at 21:00

The answer to the first one is:

16 16 03 09 14
06 09 29 13 01
15 05 06 17 15
07 11 17 11 12
14 17 03 08 16

The answer to the second one is:

13 05 14 31 44 15
30 20 21 09 22 20
36 29 20 10 06 21
06 30 22 30 17 17
10 26 23 29 12 22
27 12 22 13 21 27

The answer to the last one is:

31 08 10 13 14 32 15
06 21 20 22 30 17 07
17 30 17 24 17 11 07
12 22 33 13 15 17 11
14 16 21 19 13 11 29
16 13 03 19 12 17 43
27 13 19 13 22 18 11

To solve these, the easiest way is to:

Calculate the sum of each row and column. Where the column and row sums are equal, the intersection is the number that needs to be swapped. For instance, in the first puzzle, the original puzzle has a total of 69 for the first row and also for the second column. This means that the number in the first row and second column will need to be swapped (17) As the total in these columns is 69 and should be 58, it means that it needs to be 11 less, so should be 6. Note that the value of 6 is located in two places, but the one we want is in row 5, column 5 because these rows both have the same total of 48. Continue in this manner until the whole puzzle is solved.

• You might want to take a look at the first one, looks a bit off – AJL Jul 30 '15 at 21:02
• Thanks for the edit @AJL. I think I somehow copied these wrong, but I've fixed the second one to the correct answer. – OpiesDad Jul 30 '15 at 21:18
• Looks good, and that was(really) fast. However did you do it? – AJL Jul 30 '15 at 21:20
• I did it using the algorithm in the explanation. I put the numbers in Excel, got a sum of each row and column. Since there's one number different in each row/column, the intersection of the rows and columns that have the same sum must be the numbers that were changed. I then just picked the numbers that would make the sums correct. – OpiesDad Jul 30 '15 at 21:42
• This genius, truly genius. – warspyking Jul 30 '15 at 22:09

Partial Answer, but I got the Easy puzzle:

Original

16 16 11 09 14 = 66
17 09 29 13 01 = 69
15 05 06 16 15 = 57
07 03 17 11 12 = 50
14 17 03 08 06 = 48
69 50 66 57 48

Solved:

16 16 03 09 14 = 58
06 09 29 13 01 = 58
15 05 06 17 15 = 58
07 11 17 11 12 = 58
14 17 03 08 16 = 58
58 58 58 58 58

Solution:

Switch 11 in the first row with 03 in the fourth. Take the 06 in the last row, 17 in the second row, and 16 in the third row, and cycle them each once (or backwards twice), in that order. Then, the 06 is in the second row, the 17 is in the third row, and the 16 is in the last row

• Aww snap, that's the only one I can manage too – AJL Jul 30 '15 at 21:13