1

I have a mini project to create a Sudoku solver using these 2 approaches below:

  1. Algorithm X which is Donald Knuth's basic solution to the exact cover problem.
  2. The Dancing Links Approach(which is based/motivated by Algorithm X)

Most examples I've searched through seems to show Algorithm X implemented with Dancing links. My problem now is in creating the solution for the non dancing links approach for Algorithm X.

Appreciate if someone could provide examples of Algorithm X(without Dancing Links) to help me tackle task 1 that I've listed above.

William M
  • 19
  • 2

1 Answers1

2

I found this Zendoku writeup from another post. It's super helpful. Go to section 4.2 and you'll find a clear explanation of how Algorithm X works.

Also, I created this Sudoku Solver Visualizer that implements Dancing Links and several other algorithms including Greedy Best First Search and Backtracking. Maybe you'll find it helpful.

The code can be found here, although it is quite messy. I recommend checking out the visualizer only.

Tran Anh Minh
  • 196
  • 2
  • 12