UPDATE: The solution to the puzzle and more comments from Jon have been added at the bottom of the post.
On the long flight to the recent
Wolfram Technology Conference, I ended up on the puzzle page of a newspaper. My attention was drawn to a
word ladder puzzle, where you must fill in a sequence of words from clues, but each word differs from the previous by only a single letter. Here, for example, is a simple puzzle already solved:
best |
from a position of superiority or authority |
bast |
strong woody fibers obtained especially from the phloem of from various plants |
bash |
a vigorous blow |
bath |
a vessel containing liquid in which something is immersed (as to process it or to maintain it at a constant temperature or to lubricate it) |
math |
a science (or group of related sciences) dealing with the logic of quantity and shape and arrangement |
I wasn't going to do a blog entry on this, as it is a very similar task to my "
Exploring Synonym Chains" post that I wrote some time ago, but that changed with a chance conversation at the (excellent) Technology Conference. Proving that one never stops learning, Charles Pooh, one of our graph theory developers, pointed out to me that my synonyms item could have been done much better. I had broken one of the very rules that I wrote about in my "
10 Tips for Fast Mathematica Code" entry—"Use built-in functions." I had effectively re-implemented the built-in Mathematica commands
GraphPeriphery and
GraphDiameter.
So, armed with these two new functions, let's find the longest word ladder puzzle that can be made using Mathematica's English dictionary.