Résumé

We found the magic square a simple problem with a very rich combinatorics : for a magic square of order n, there are n²! manners to fill tbe nxn matrix with integers between 1 and n2, without repetitions, but only very few of them are magic squares (Ball, 1963).

For order 4 there are exactly 7040 magic squares. So we use the magic square as a benchmark to compare mathematical programming, namely mixed integer programming (MIP), with Genetic Algorithms (GAs), that we will show are much more powerful to solve these kind of discrete combinatorial explosive problems. Finally we developed an artificial intelligence randomized minimax algorithm that imitates a human solving the magic square and we showed that in most cases its performance, in terms of number of changes of pairs of numbers, is better than the performance of the GA algorithm.

Texte

Version Fac-similé [PDF, 2.9M]

Citer cet article

Référence papier

J. Barahona da Fonseca, « The Magic Square as a Benchmark », CASYS, 18 | 2006, 27-33.

Référence électronique

J. Barahona da Fonseca, « The Magic Square as a Benchmark », CASYS [En ligne], 18 | 2006, mis en ligne le 30 July 2024, consulté le 20 September 2024. URL : http://popups.lib.uliege.be/1373-5411/index.php?id=2201

Auteur

J. Barahona da Fonseca

Department of Electrical Engineering and Computer Science, Faculty of Sciences and Technology, New University of Lisbon, Monte de Caparica, 2829-516 Caparica, Portugal

Articles du même auteur

Droits d'auteur

CC BY-SA 4.0 Deed