Algorithm for Calculating All Fifth-order Magic Square Arrangements
Overview
Calculating all fifth-order magic square (5MS) arrangements with a high-performance computer (HPC) was performed in 156 minutes in 2014. My aim in the present research was to develop and implement an algorithm that is able to calculate them more efficiently. An outline of the developed algorithm is as follows. Step 1: We generate 5MS using distinct non-negative integers less than or equal to 24 which fulfill the condition that the 5 integers in each rows and the 5-digit integers of each columns line up in ascending order. Let us define such a 25-digit 25-adic number as M. Step 2: Keeping integers in the top row and replacing integers in each of other row, we make each column sum to 60. Step 3: 5MSs are constructed on the basis of preservation of the sum of each row and column in the replacement of rows and columns. Moreover, we constructed a new 5MS, M’, by taking a known 5MS, M, and replacing each cell value, N, by 24 - N. I defined the pair M and M' as “twins.” The algorithm adds M (or M’) to its list of found 5MSs if it is not already present in this list. The time required for the optimized parallel calculation on 176 cores is 44 seconds without using twins. Using twins, we calculated all the 5MS arrangements in 28 seconds. Taking advantage of twins, my goal is to calculate all 6MS arrangements that have not yet been calculated.
In context
- 54 Systems Software projects at ISEF 2016. 14 placed in the Grand Awards. See the winners
- Nothing else at ISEF is close to this one.
Competition history
- ISEF 2016
Resources
Related projects
CSEF · 2002
Rotational Symmetry of Third Order Magic Cubes
ISEF · 2018
New Explicit Solution to the N-Queens Problem and the Millennium Problem
JSHS · 2020
Classifying Magic Squares and Their Associated Symmetries Using a Chord Diagram Approach
CSEF · 2008
Writing a Rubik's Cube Solver using Mathematica
ISEF · 2019
Classifying Magic Squares and Their Associated Symmetries Using a Chord Diagram Approach
CSEF · 2008
Which Algorithm Is the Most Efficient in Solving Alexander's Star?
CSEF · 2012
The Table of Secrets
CSEF · 2014
Speedsolving a Rubik's Cube: Which Algorithms First?
Closest projects by meaning, across every fair and year in the corpus.
Browse more like this
Source: Regeneron International Science and Engineering Fair