Out of this Wordle! Can maths solve the popular puzzle?
Departments UOM life 2nd February 2022
Wordle: it’s the wordy word game, by Josh Wardle, that’s taken the world by storm*.
Now there’s a sentence to unjumble… and an illustration of the fun to be had with words. And, judging by the popularity of the all-conquering puzzle game, unjumbling words is something many of us relish.
Here in the Faculty of Science and Engineering we’re certainly no different – but, as logic lovers and problem solvers, we wanted to come at Wordle from a different *ahem* angle, and asked our experts in the Department of Mathematics whether we can solve the puzzle with maths…
*Note to self, ‘storm’ is a good five-letter word. Ooh, ‘world’ is too!
Hitting the target
We’re sure you all know what Wordle is by now (and probably, like us, play it every day), but by way of a brief description: it’s an online, daily brain teaser that challenges you to guess a five-letter target word. You have six chances, and when you get a correct letter but in the wrong place the letter’s tile turns orange, and when you get the correct letter in the correct place, that tile turns green.
It’s a simple concept – and one so popular that the New York Times recently acquired the game for an undisclosed seven-figure sum.
To solve the puzzle, a good grasp of English will certainly help. But could another subject – maths, for instance – be just as useful?
Well, according to our experts, it can certainly help.
Your first guess is all important, and you need to make it count. Without a dictionary, the total number of five-letter variations comes in at just under 12 million. To put that into perspective: you’d be about as likely to win the lottery as guess the correct combination on your first go.
Luckily, Wordle uses a dictionary – its own, in fact – and there are around 13,000 five-letter words in there. Of these, only around 2,300 are possible Wordle target words.
So, if you choose a word that includes more commonly used letters, you give yourself a better chance of learning more about your target word. The mathematical name for this is information entropy.
Guess what
The five most commonly used letters in the full dictionary are E A R O and T, and there are three words in the Wordle dictionary that comprise all of them: orate (to give a speech), oater (another word for a Western), and roate (an archaic spelling of roate, as in ‘learning by rote’).
Although E is the most common letter, it probably doesn’t make sense to include more than one in the first guess. Similarly, it is perhaps advisable to go for the word (roate) that begins with the letter R, as more than twice as many five-letter words begin with R as O – although this is not necessarily optimal mathematically.
Your second and third guess would likely vary based on what your first guess has revealed. However, you might then try using as many commonly used letters for your second guess that you didn’t pick for your first. The next most common letters are I, L, S and N.
What might be considered the ‘best’ first guess in a mathematical sense, however, depends on how we interpret ‘best’. You might, for instance, consider the best to be the guess that reveals the maximum information, on average, about the target word; or, you might wish to eliminate the most incorrect target words, on average.
Solving these problems mathematically is a type of optimisation. The precise solution can therefore vary depending on your objectives. For example, you might want to find the guess that minimises the average number of goes needed to identify the target word, or the guess that minimises the worst case number of guesses for the target word.
Whatever your strategy, be sure to have fun playing… and remember that all-important five-letter word: maths!
Be sure to subscribe on our homepage to keep up to date with all the latest posts from The Hub.
Words: Joe Shervin
Video: Kory Stout
Expert input: Dr Neil Morrison