Solving Sudoku efficiently with Dancing Links

University essay from KTH/Skolan för datavetenskap och kommunikation (CSC); KTH/Skolan för datavetenskap och kommunikation (CSC)

Author: Mattias Harrysson; Hjalmar Laestander; [2014]

Keywords: ;

Abstract: With this thesis, we hope to motivate software developers to seek out already existing solving algorithms instead of attempting to use a bruteforce algorithm or specialized solving algorithms.The reason for choosing the Sudoku puzzle as a platform to demonstrate this is because it is well known around the world and easy to understand, while the reduction to an exact cover problem provides a challenge. Because of the challenge in the reduction and because we did not find any earlier research which explained in detail how the reduction from a Sudoku puzzle to an exact cover problem is done, we decided to focus on that subject in this thesis. Using our previous knowledge in reduction and the information found during our research, the reduction was eventually solved.Our conclusion is that Dancing Links is an effective solver for the exact cover problem and that a good reduction algorithm can greatly lower the solving time. The benchmarks also indicate that the number of clues in a Sudoku puzzle may not be the deciding factor of its difficulty rating. Since the reduction to an exact cover problem was arguably the hardest part in this thesis, future research can hopefully make use of our detailed explanation of the reduction and use the time saved to explore other topics in more depth, such as the difficulty rating of Sudoku puzzle.

  AT THIS PAGE YOU CAN DOWNLOAD THE WHOLE ESSAY. (follow the link to the next page)