Exploring A Better Way to Constraint Propagation Using Naked Pair
Sudoku is an NP-complete problem therefore developing various efficient algorithms is crucial. This paper presents an enhanced approach to solving sudoku puzzles by improving on recursive backtracking with constraint propagation and bitmask, focusing on the implementation of the naked pair technique...
Saved in:
Main Author: | |
---|---|
Format: | Article |
Language: | English |
Published: |
EDP Sciences
2025-01-01
|
Series: | ITM Web of Conferences |
Online Access: | https://www.itm-conferences.org/articles/itmconf/pdf/2025/01/itmconf_dai2024_04025.pdf |
Tags: |
Add Tag
No Tags, Be the first to tag this record!
|
_version_ | 1825206562556215296 |
---|---|
author | Chen Kaiqi |
author_facet | Chen Kaiqi |
author_sort | Chen Kaiqi |
collection | DOAJ |
description | Sudoku is an NP-complete problem therefore developing various efficient algorithms is crucial. This paper presents an enhanced approach to solving sudoku puzzles by improving on recursive backtracking with constraint propagation and bitmask, focusing on the implementation of the naked pair technique. This research aims to add constraints to reduce the backtracking steps in solving sudoku using naked pairs, which is a technique that eliminates candidates of a cell from other cells in the same row, column or sub-grid when two cells share the same candidate sets. This research uses a dataset of 1 million sudoku puzzlers from Kaggle to evaluate the proposed solver’s performance. The solver first processes the puzzle into bitmask vectors then uses the singles and naked pairs technique to minimize the candidates, and then uses depth-first search to backtrack and solve the puzzle. As a result, the naked pair strategy slightly increases the total steps, and it significantly reduces the computation of depth-first search steps, making the solver potentially more efficient in solving difficult puzzles. |
format | Article |
id | doaj-art-5c67e2bcb5ba4876bbe98be56d35da2a |
institution | Kabale University |
issn | 2271-2097 |
language | English |
publishDate | 2025-01-01 |
publisher | EDP Sciences |
record_format | Article |
series | ITM Web of Conferences |
spelling | doaj-art-5c67e2bcb5ba4876bbe98be56d35da2a2025-02-07T08:21:13ZengEDP SciencesITM Web of Conferences2271-20972025-01-01700402510.1051/itmconf/20257004025itmconf_dai2024_04025Exploring A Better Way to Constraint Propagation Using Naked PairChen Kaiqi0Faculty of Computer Sciences, Dalhousie UniversitySudoku is an NP-complete problem therefore developing various efficient algorithms is crucial. This paper presents an enhanced approach to solving sudoku puzzles by improving on recursive backtracking with constraint propagation and bitmask, focusing on the implementation of the naked pair technique. This research aims to add constraints to reduce the backtracking steps in solving sudoku using naked pairs, which is a technique that eliminates candidates of a cell from other cells in the same row, column or sub-grid when two cells share the same candidate sets. This research uses a dataset of 1 million sudoku puzzlers from Kaggle to evaluate the proposed solver’s performance. The solver first processes the puzzle into bitmask vectors then uses the singles and naked pairs technique to minimize the candidates, and then uses depth-first search to backtrack and solve the puzzle. As a result, the naked pair strategy slightly increases the total steps, and it significantly reduces the computation of depth-first search steps, making the solver potentially more efficient in solving difficult puzzles.https://www.itm-conferences.org/articles/itmconf/pdf/2025/01/itmconf_dai2024_04025.pdf |
spellingShingle | Chen Kaiqi Exploring A Better Way to Constraint Propagation Using Naked Pair ITM Web of Conferences |
title | Exploring A Better Way to Constraint Propagation Using Naked Pair |
title_full | Exploring A Better Way to Constraint Propagation Using Naked Pair |
title_fullStr | Exploring A Better Way to Constraint Propagation Using Naked Pair |
title_full_unstemmed | Exploring A Better Way to Constraint Propagation Using Naked Pair |
title_short | Exploring A Better Way to Constraint Propagation Using Naked Pair |
title_sort | exploring a better way to constraint propagation using naked pair |
url | https://www.itm-conferences.org/articles/itmconf/pdf/2025/01/itmconf_dai2024_04025.pdf |
work_keys_str_mv | AT chenkaiqi exploringabetterwaytoconstraintpropagationusingnakedpair |