Squaring The Bishop

May 3, 2011

Among the many other works of Charles Babbage is the game of word squares. A word square consists of a set of words written in a square grid in such a way that the same words can be read both horizontally and vertically. Some sample word squares are shown below; the one on the left, in Latin, was found in the ruins of Pompeii, the one in the middle is due to Doug McIlroy, and the one on the right is due to Babbage:

S A T O R    W A S S A I L    D E A N
A R E P O    A N T E N N A    E A S E
T E N E T    S T R I N G Y    A S K S
O P E R A    S E I Z U R E    N E S T
R O T A S    A N N U L A R
             I N G R A T E
             L A Y E R E D

Babbage, in his memoirs, proposed to find a word square based on BISHOP, but was unable to do so.

Your task is to write a program that, given a single word, creates a word square using that word in its top row, then use that program to find a word square for the starting word BISHOP. When you are finished, you are welcome to read or run a suggested solution, or to post your own solution or discuss the exercise in the comments below.

Pages: 1 2

Follow

Get every new post delivered to your Inbox.

Join 600 other followers