### by Mark Dawes (May 2023)

It started with __Wordle__.

This interactive daily game appeared during lockdown and captured the imagination of the world. Dozens of articles and blogposts explained what made it great, and mathematicians described the different strategies that could be deployed.

Wordle spawned lots of derivative games. Some were very similar to the original, with versions in other languages, or just for specific types of vocabulary (my favourite was __Byrdle____ __which, in a pun on the name of the English church music composer who died 400 years ago, involves only church music related vocabulary). Other derivatives include listening to scraps of popular songs and trying to identify them, or finding words that are connected to others, either by meaning or semantics. The maths-based ones were not (for me) as exciting as Wordle.

Now there is a worthy maths/logic/probability game that comes close to Wordle: Digit Party. Co-created by the author of Byrdle, it involves a daily puzzle, a simple rule-set, an easy interface, and a neat coloured diagram to post on Twitter.

This article explains the game and the scoring system, and then explores some of the maths that is involved.

#### The game

The website for the game is digit.party

Here is a screenshot of a game in progress.

In the bottom right of the screen it says which number is now available. When you click on an empty square on the board it will put the 2 in that square. It also lets us know that the following number will be a 3. The digits from 1 to 9 are used and seem to appear at random within a particular game.

Points are scored by getting connections between the same digit. At the moment, in the game above, we can see one connection between two adjacent number 8s (this is shown on the board in colour and by the line joining the 8s). That gives us a score of 8, which is then shown in the bottom left of the screen (in the diagram above).

The game has continued.

Can you see why we now have 34 points?

The three number 8s all link up, so that makes 3 connections, giving 8 x 3 = 24 points.

The three number 2s only make 2 connections, however. Digits can only join to a digit in one of the eight squares that surrounds it. This gives 2 x 2 = 4 points.

The number 6s have 1 connection, so that is another 6 points. This gives a total of 24 + 4+ 6 = 34 points.

Here is the final board for this game:

Now, in the bottom right, it shows “65% of max”. This tells me that had I placed the numbers optimally in the grid I could have got a higher total, and that the amount I actually scored was 65% of the highest possible score. [The percentage is the key measure: depending on the numbers that appear, a score of 120 might be excellent, or might be rather ordinary.]

Where could I have picked up more points?

There are two unconnected 9s. There are two separate groups of 3s. There are two more 2s that are not connected to the others. Had I connected all of these together I would have scored more points. I could have rearranged the 4s to score more points too.

Why didn’t I do this in the game? I didn’t know in advance which numbers would appear during the game (you only get to know the current number and the one that is coming next, so I didn’t save a space next to the first 9 for the second one to slot into).

#### What maths is involved?

Some of the maths could be used with students. For example, if I show them the board above (and only the board), can they calculate the score?

If they know the score and the percentage of maximum, can they calculate the best score? In this scenario we could do 83/0.65 to get 127.692. This suggests that 128 is the maximum score. Here is a screenshot showing that this is indeed correct:

[How have I managed to play the same game more than once? There is a new puzzle each day which is the same for everyone. You can then click on the dice symbol to get a random different puzzle. These have their own web address and can be repeated. The one I have used above is https://digit.party/#5422218235 ]

There is some informal probability and reasoning involved in trying to decide where to place the digits. In the game below I want to join the new number 5 to the existing 5s, and will put it in the square above the right-hand 5, in case I get another 2 in future.

The most interesting part is perhaps deciding what shapes to make with the digits.

Here (drawn in different software) are some ways to link up 4 of the same digit:

The red digits have 3 joins, the green have 5 joins and the blue have 6 joins. Can students find a way to have 4 joins?

Before reading on, you might want to consider 5 digits. What arrangement gives the most connections for 5 digits?

I was surprised to find two very different looking arrangements:

What about for 6 digits?

Again, two versions:

Then there is the question of how to get to a particular version. The pink-6 diagram can only be reached from the orange-5, whereas the purple-6 diagram could come from either the orange-5 or the green-5. In practice, though, it will always come from orange-5. Why?

Orange-5 can be reached from blue-4, but green-5 can’t. Blue-4 is the best-scoring arrangement of 4 digits, so purple-6 (which includes a blue-4 within it) will have appeared via orange-5.

What if we have got pink-6 and another one of the same digits appears?

There are several positions it could go in, for example:

The green version is better than the turquoise position, as shown by the number of additional lines.

Can you find the other high-scoring version for 7 of them? What about for 8 or for 9?

Finally, there is the question of whether they will all actually fit together on the grid. For example, here are two sets of 4 digits:

They are in a square, which maximises the number of points. Two more squares like this will fit next to them, but a further set of 4 after that would not, even though there will be plenty of blank squares left.

There is even the opportunity to do some binomial probability with this. I have only had nine of the same digit in one game. How likely is it that this will occur?

#### Strategy

Finally, what strategy is the best one to maximise your potential score? I don’t want to spoil it for you! I suggest you play the game and try different things.

Enjoy!

## Comments