| Literature DB >> 25973764 |
Akimasa Kitajima1, Macoto Kikuchi2.
Abstract
How rare are magic squares? So far, the exact number of magic squares of order n is only known for n ≤ 5. For larger squares, we need statistical approaches for estimating the number. For this purpose, we formulated the problem as a combinatorial optimization problem and applied the Multicanonical Monte Carlo method (MMC), which has been developed in the field of computational statistical physics. Among all the possible arrangements of the numbers 1; 2, …, n(2) in an n × n square, the probability of finding a magic square decreases faster than the exponential of n. We estimated the number of magic squares for n ≤ 30. The number of magic squares for n = 30 was estimated to be 6.56(29) × 10(2056) and the corresponding probability is as small as 10(-212). Thus the MMC is effective for counting very rare configurations.Entities:
Mesh:
Year: 2015 PMID: 25973764 PMCID: PMC4431883 DOI: 10.1371/journal.pone.0125062
Source DB: PubMed Journal: PLoS One ISSN: 1932-6203 Impact factor: 3.240
Fig 1Semi-log plot of the appearance probability P of magic squares (•).
P decreases faster than exponentially with the size n. Two fitted functions are also shown: exp((An + B)ln(n) + Cn + D) (solid line) and exp((En + F)ln(n + G) + H) (dotted line) with A = −4.99 and E = −4.88. We used P of n ≥ 10 for the fitting. Enlarged plot for n < 6 is shown in the inset, in which difference of two functions are visible.
Estimated number and qppearance probability of magic squares.
|
|
|
| Trump’s estimates (* exact) |
|---|---|---|---|
| 3 | 2.204(35) × 10−5 | 0.999(16) | 1 * |
| 4 | 3.3645(15) × 10−10 | 8.7995(39) × 102 | 880 * |
| 5 | 1.42011(88) × 10−16 | 2.7534(17) × 108 | 275305224 * |
| 6 | 3.8182(15) × 10−22 | 1.77543(73) × 1019 | 1.775399(42) × 1019 |
| 7 | 4.9955(92) × 10−28 | 3.7983(70) × 1034 | 3.79809(50) × 1034 |
| 8 | 3.2931(91) × 10−34 | 5.223(14) × 1054 | 5.2225(18) × 1054 |
| 9 | 1.0831(30) × 10−40 | 7.848(22) × 1079 | 7.8448(38) × 1079 |
| 10 | 2.069(14) × 10−47 | 2.414(17) × 10110 | 2.4149(12) × 10110 |
| 11 | 2.312(12) × 10−54 | 2.339(12) × 10146 | 2.3358(14) × 10146 |
| 12 | 1.645(10) × 10−61 | 1.1417(72) × 10188 | 1.1424(10) × 10188 |
| 13 | 7.564(61) × 10−69 | 4.036(32) × 10235 | 4.0333(54) × 10235 |
| 14 | 2.376(27) × 10−76 | 1.509(17) × 10289 | 1.5057(24) × 10289 |
| 15 | 5.082(66) × 10−84 | 8.00(10) × 10348 | 8.052(22) × 10348 |
| 16 | 7.933(98) × 10−92 | 8.50(11) × 10414 | 8.509(27) × 10414 |
| 17 | 8.898(61) × 10−100 | 2.313(16) × 10487 | 2.314(9) × 10487 |
| 18 | 7.500(66) × 10−108 | 2.146(19) × 10566 | 2.047(8) × 10566 |
| 19 | 4.657(86) × 10−116 | 8.37(15) × 10651 | 8.110(35) × 10651 |
| 20 | 2.216(50) × 10−124 | 1.773(40) × 10744 | 1.810(8) × 10744 |
| 21 | 8.34(24) × 10−133 | 2.589(73) × 10843 | |
| 22 | 2.503(73) × 10−141 | 3.189(93) × 10949 | |
| 23 | 5.88(21) × 10−150 | 3.92(14) × 101062 | |
| 24 | 1.099(38) × 10−158 | 5.85(20) × 101182 | |
| 25 | 1.640(44) × 10−167 | 1.258(34) × 101310 | |
| 26 | 2.098(43) × 10−176 | 4.94(10) × 101444 | |
| 27 | 2.150(62) × 10−185 | 3.86(11) × 101586 | |
| 28 | 1.804(74) × 10−194 | 7.18(29) × 101735 | |
| 29 | 1.276(61) × 10−203 | 3.77(18) × 101892 | |
| 30 | 7.78(35) × 10−213 | 6.56(29) × 102056 |
Numbers in the parentheses indicate the statistical errors (3 times the standard error) in the last digits.
Fig 2The ratio of the appearance probability P to two fitted functions.
P /exp{(An + B)ln(n) + Cn + D}} (•) and P /exp{(En + F)ln(n + G) + H} (×) with A = −4.99 and E = −4.88. Both functions seem to express P equally well.