# What will be the last Sudoku number to be filled?

When I am completing a Sudoku puzzle, there are always two last numbers to fill. Maybe it is just my puzzle solving approach or maybe it is inherent to Sudoku.

I got wondering, would everyone who started the same puzzle be completing the same last two numbers that I did?

With what degree of accuracy can the last number to be filled on a Sudoku puzzle be pre-determined?

Note: This answer assumes that this is a usual sudoku where we are given around in the range of 18-25 in a 9x9 grid, and not 80 numbers already solved in which case, yes we can predict the final square.

Everyone has their own unique solving style. It is very unlikely you will be able to predict the final square solved. You may be able to protect 10 or so squares which will probably be solved last, but even then that's inaccurate.

Even with small sudokus it will be hard, as I will demonstrate now:

Take the following sudoku I randomly found online:

Looks simple right? In fact you could probably solve it in your head.

Well I'm going to solve it to completely valid ways, and end up on two squares which were some of the first solved in the other.

For the first I will solve the 4s first, and the 2s last. The second I will solve with the 2s first and the 4s last.

So start of 1 and 2:

From there you can follow different routes:

1s then 3s for the first, 3s then 1s for the second

And we end up with the final solution:

This example shows that it is almost impossible to predict how someone will solve a sudoku and which square they finish on.

Gifs of 1 and 2, completely different ways of solving:

There are a load more different ways to solve this sudoku, I can swap the 3s and the 1s for any other number, not do them sets of numbers at a time, start with one 2 one four etc.

If I'm right there are $8!$ different ways to solve this (someone confirm?) which is 40320. So there are 40320 different ways you could fill in these squares on just a 4x4 sudoku with 8 tiles to fill.

Imagine how many different ways there could be to fill in a 9x9 sudoku with quite a few more squares to fill!

True, not all of them will be possible as some squares do need to be solved later, but most paths will be possible. @Duncan makes the excellent point that harder sudokus have less information so at the start there will be less possible numbers to fill in first. But as I replied, as you progressed it will be like climbing a tree. Not many branches at the bottom, but more branches spreading outwards and more pathways you could go down as you climb and progress. Eventually you will reach the situation of two squares left. But even with your example of 2 squares left, you could fill in either of them first.

You could even solve it in your head and then fill it in randomly if it is a small sudoku.

I got wondering, would everyone who started the same puzzle be completing the same last two numbers that I did?

No, as shown above for a simple sudoku

With what degree of accuracy can the last number to be filled on a Sudoku puzzle be pre-determined?

Very, very little, practically 0

Hope that helps. If you want anything clarified just ask.

• Comments are not for extended discussion; this conversation has been moved to chat.
– Deusovi
May 9, 2017 at 6:24
• I am not sure your example is valid. When I solve it the first row is 1 2 3 4. I am not sure if there is name for a puzzle like this; homonym, mirror,??? but generally there is only one solution to the Sudoku puzzles I work. May 9, 2017 at 10:15
• @JamesJenkins hmm oops. I'll pick a different example when I get home tonight and fix May 9, 2017 at 13:03
• @JamesJenkins I'm working on it now, but do you still understand what I am saying here with the example if you imagined that the answer I've given is the unique answer? May 9, 2017 at 15:57