[Community Puzzle] 25x25 Sudoku

DlxSolver does select the most constrained column by design, yes

Hi, sorry for asking, but how much complicated is it to solve the problem without backtracking ?
I could solve the first test in 8 steps with a simple algorithm (6 steps now), but even with some more advanced tricks I’m not confident anymore I can do other tests without brute force.

Are such sudoku problems doable without *any* backtracking ?

Thanks :slight_smile:

Same here. I can solve the first test case without backtracking. After that, it gets a lot harder. I found some techniques online that I haven’t had a chance to implement yet, so maybe … someday.

1 Like

I solve all the grids using the following algorithm (loop):

  1. There is only one possible letter left for a cell.
  2. In a group of cells (row, column, block), a letter is present only once.
  3. In a group, n cells have only n possible letters (so we eliminate these letters from the other cells).
  4. Make a hypothesis in the cell with the fewest possible letters.

With this algorithm, I solve all the grids with a maximum hypothesis depth of 25.

I coded it in JavaScript; there are no timeouts.

I finally made it in python using Timinator’s DLX algorithm, however I find it odd how the execution time spans… When running the 5th test case, I get times in a [900,5800+] ms range