Back to Search
Start Over
The effect of guess choices on the efficiency of a backtracking algorithm in a Sudoku solver
- Source :
- IEEE Long Island Systems, Applications and Technology (LISAT) Conference 2014.
- Publication Year :
- 2014
- Publisher :
- IEEE, 2014.
-
Abstract
- There are several possible algorithms to automatically solve Sudoku boards; the most notable is the backtracking algorithm, that takes a brute-force approach to finding solutions for each board configuration. The performance of the backtracking algorithm is usually said to depend mainly on two implementation aspects: finding the next available empty cell in the board and finding the options of available legal number that are relevant to the given cell. While these pieces of the backtracking algorithm can vary in efficiency based on their implementation, tests show that the algorithm itself also relies on the statistical distribution of the guesses that it attempts to “plug in” to the board in every given cell. The backtracking algorithm uses an array of the legal numbers in the cell to attempt a solution before it moves on to the next cell. If a solution cannot be found, it backtracks and attempts to solve the board again with a different guess choice. The more errors the solver makes, the more backtracks it must perform, which decreases its overall efficiency and increases its effective runtime. Tests of the solving algorithm were performed using 195 base solutions with multiple initial board configurations were performed to analyze the difference in the algorithm performance by comparing the number of recursive backtracks between sequential and randomly distributed guesses. Analysis show that using values that are given in a shuffled array significantly reduces the number of backtracks done by the solver and, as a result, improve the total effective efficiency of the algorithm as a whole.
Details
- Database :
- OpenAIRE
- Journal :
- IEEE Long Island Systems, Applications and Technology (LISAT) Conference 2014
- Accession number :
- edsair.doi...........9177939ba88eb79431071e43031c2eec
- Full Text :
- https://doi.org/10.1109/lisat.2014.6845190