Featured Postings

In Memoriam 2015

January 1: Donna Douglas: Played daughter Elly May Clampett in The Beverly Hillbillies. (Age 82). 1: Mario Cuomo: Governor of New York (1983 to 1994) (Age 82). 2: James Cecil Dickens: Known as Little Jimmy Dickens, best known for his song May the Bird of Paradise Fly Up ...

Read More

The disappearance of misc.activism.progressive and the emergence of Thought Crime Radio

Almost four years ago, the articles in the USENET newsgroup misc.activism.progressive ground to a halt, and moderator Rich Winkel has all but disappeared from the USENET, whom I learn resided in Harrisburg (up until 2010, at least), a half hour or so drive from his ...

Read More

Sounding off on the end of CanCon and the CRTC

I guess with the recent decision to axe all cancon requirements for daytime programming in Canada, the CRTC is crawling toward its own irrelevance. Let's not be naive, Canadian culture is that much more weakened without the protection it partially enjoyed from American influence. With ...

Read More

Eldred, Saskatchewan on the map … barely

Eldred, Saskatchewan on the map ... barely

I've written about obscure Saskatchewan communities before. Here is another community far to the north of Unity. My ancestors from France settled here. Many of my ancestors were pioneers that broke new farming ground nearest to a community called Eldred, Saskatchewan. Eldred was about 10 km ...

Read More

Zero

Once upon a time, around the year 525 during the reign of Pope John I, a monk named Dionysius invented the idea of Anno Domini by producing a calendar which marked the time since the birth of Christ. The numbering of the years was adopted ...

Read More

Fortune Cookies for Human Rights

Fortune Cookies for Human Rights

You know, I was minding my own business in this classy Chinese restaurant, engorging myself on their copious buffet, had my fill, and was handed the bill with an accompanying fortune cookie. This fortune cookie (the one to the left) really existed, and I never saw ...

Read More

Getting f(x) notation to work in Maple

Getting f(x) notation to work in Maple

Maple is a robust math environment which can graph, solve equations, and solve for the unknown with the aid of its computer algebra solver (CAS), which is capable of computing exact roots of cubic functions, for example. I wanted to demonstrate for myself that Maple could ...

Read More

Kudos to the 1050 CHUM Memorial Blog

Kudos to the 1050 CHUM Memorial Blog

Recently, I've been hit (my website that is) by someone possibly checking his plethora of links from his/her website, and when I back-traced it, I find this cool blog which acts as a convincing historical shrine to the late great 1050 CHUM Radio in Toronto. ...

Read More

The Obfuscation of Electronics: The Behringer Xenyx 502

The Obfuscation of Electronics: The Behringer Xenyx 502

This is more like a meta-review. I have gone to Canada Computes where nearly the entire Behringer line is sold, and was impressed by the specs. But does it do what I want, the way I want it? I face a number of obstacles, being a ...

Read More

Twitter

  • Follow strider_sj on TwitterNew posts and updates will be announced on my twitter account.Follow strider_sj on Twitter
  • Follow me on Twitter

The SJ Wayback Machine

Lava Lamp Clock

Blogs in Canada

See blogs and businesses for Canada

Recreational Math I: Magic Squares: the “really good” kind

Introduction

ONE OF THE few things you see on the web these days is how to do a really good magic square. There are many websites that tell you about how spiralling arrangements of sequential numbers on a square matrix is magic, but for me, that’s dull. You are limited to doing seemingly less than a dozen such magic squares, so I don’t find them too interesting.

Recall that magic squares are numbers arranged in a square matrix such that each of its rows and columns, and normally both diagonals add up to the same number. Usually, a square of n numbers to a side which has numbers total, will be populated with the entire set of numbers from 1 to n inclusive, in some quasi-random order. These numbers would be arranged in such a manner that the total of each of its rows, columns, and both diagonals equal the same “magic number”, which is different depending on the dimensions of the square. By using random methods suggested in this article, the number of magic squares possible, when n is odd, is equal to (n!)2.

For the 5×5 square, you apparently have to start by moving from the current position to the “top right” square (wrapping to the opposite edge if necessary), and if that square is occupied, move down by 1 square. This non-random, deterministic method apparently works for all squares greater than 5×5 (with odd dimensions).

I read from an old book on recreational math (The Fascination of Numbers, by W. J. Reichmann (1958)), that

  1. Squares of even dimensions (4×4, 6×6) have to be arranged by a different algorithm than squares of odd prime dimension (5×5, 7×7, 11×11, …).
  2. A randomly-generated 5×5 magic square can be made which uses the sum of two matrices.

The number of possible permutations of 5×5 matrices is equal to (5!)2.

Reichmann’s book was the only place where I could find such an algorithm. This seems to be a rare algorithm, even on an internet search. But it is the only method that leads to “magic” results in a variety of ways. These squares seem to be the most robust in terms of the number of ways their “magic” qualities can be determined. They have inspired my writing computer programs that generate such squares as a way of practicing programming several years ago. I have written magic square programs following Reichmann’s algorithm (not sure if he originated it) in VB5, Visual Basic .NET, VB for applications (in Excel), and in Microsoft Quick Basic 4.5. The 16-bit QB 4.5 version does not run on my 64-bit machine, and for similar reasons, neither does the VB5 version, whose runtime DLL is no longer supported by MS Windows 7.

In the next instalments, starting this coming Saturday, I will begin to discuss the making of 3×3 and 5×5 squares, and discuss their magic properties.

Share

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>