Magic Square ------------ Give an n by n grid place the numbers 1 to n^2 in the grid such that every row, column and diagonal adds up to the same amount. Example: > mzn-gecode magic.mzn -D"n=3" 2 7 6 9 5 1 4 3 8 > mzn-gecode magic.mzn -D"n=4" 4 9 6 15 5 16 3 10 11 2 13 8 14 7 12 1 Question -------- (a) For n=3, is the middle square always 5? Suggest two ways to answer this question. (b) How long (in nodes & runtime) did it take you to find magic with n = 6? History & Fun ------------- Start here https://en.wikipedia.org/wiki/Magic_square Patrick