In my last post, I said:
“The Logical Journey of Zoombinis” was a computer game first released in 1996. The aim of the game is to get your Zoombinis from Zoombini Isle to Zoombiniville via a series of logical puzzles. Coincidentally (or maybe not) Rachael and I both spent significant amounts of our childhood playing this game – just ask our siblings! We both strongly attribute our interest in logical puzzles and maths to this game. It lead us to wonder: what maths does Zoombinis actually involve?
In this post I will describe another area of maths that arises in the Zoombinis puzzles: lexicographic ordering.
A useful thing to do is to put sequences of things in some order. For example
- We can put numbers in size order
- We can put letters in alphabetical order. The letters C, S, A, T go into the order A, C, S, T. But it gets more complicated if instead we want to order entire words, instead of just letters. We end up with dictionary order. We know how this works: first we order by the first letter of the word, then if two words have the same first letter we look at the second letter of the word, etc.
In maths language, this is described in the following way:
- For two words and we say if comes before in the dictionary
- We can express our words in letters, for example . In symbols, we have for some letters
- Consider two words and (which we assume to have the same number of letters). Then if for , for some , and then . For example since and and .
The Zoombinis level “The Lion’s Lair” uses this idea: you have to put the Zoombinis in the right order. If you get the order wrong your Zoombini is transported to the right location and you lose a life. Articles about this level of the game online say that hints to the right order are written on the walls, but I have never been able to find these clues…
Instead of letters, we have features, so a Zoombini word is given by ( Hair, Nose, Feet, Eyes) and an example is (Pony tail, Red nose, Roller skates, Glasses). The player has to guess which order the features come in. Examples of the two types of things to guess are:
- Whether you order by feet first, and then eyes or the other way around
- What is the order of the nose colours: does red come before blue, or blue before red?
A high level of the game might ask you to put a full lexicographic order on the Zoombinis. We could ask questions such as: What is the complexity of this game? With a perfect strategy, how many guesses would we have to make to ascertain the right order for the Zoombinis?