What’s theoretically a good Nerdle combination

arithmeticcombinatoricsinformation theoryprobabilityrecreational-mathematics

https://nerdlegame.com/

These are the rules of Nerdle:

  • There are eight spaces for operators/digits.
  • Each guess is a calculation.
  • You can use 0 1 2 3 4 5 6 7 8 9 + – * /or =.
  • It must contain one “=”.
  • It must only have a number to the right of the “=”, not another
    calculation.
  • Standard order of operations applies, so calculate * and / before +
    and -.

My goto is 3*54=162, so we can get information about the small/middle numbers, and see if multiplication is used. Just curious, is there any better combinations for guessing?

Best Answer

Let's first think about digit frequency. It is hard for me to see how to brute-force all possible Nerdles, but here are a couple possible cases to illustrate some ideas:

  • There are $3240$ possible equations of the form AB+CD=EF. Among these, the frequencies with which the digits $0$ through $9$ appear (that is, the number of equations that contain the digit at least once, not the total number of appearances) are: $$936, 1917, 1804, 1726, 1648, 1648, 1570, 1492, 1414, 1392$$ Equations EF-CD=AB will follow the same distribution.
  • There are $614$ possible equations of the form A*BC=DEF. Among these, the frequencies with which the digits $0$ through $9$ appear are: $$170, 279, 346, 305, 326, 272, 324, 272, 303, 245$$ Equations DEF/A = BC will follow the same distribution.

There are other forms that the equation can take, but they will be less common, and they will probably show a similar pattern. $0$ is the least common digit. Addition and subtraction problems are more common, and among them, smaller nonzero digits are more likely. In multiplication problems, even numbers get an additional boost over odd numbers: that's because if either factor is even, the product is even.

Based on this, it looks some good starting guesses are

6+4*-1=2    or    7+2*-3=1    or    5+3*-1=2

which test four common numbers as well as three of the four possible operations. (It is very unlikely to encounter an equation with multiple operations, and if we assume that only one operation is present, these guesses will tell us which one that is.)


But we can also ignore digit frequency entirely: the two guesses

2*53=106    and    9+8/-4=7

contain all $14$ possible non-= symbols exactly once.