Abstract

Sudoku is a puzzle game that arranges numbers from one to nine on a board consisting of 9x9 squares. This game has a rule: the numbers arranged on a board cannot be the same in each row or column. The main goal of this Sudoku game is to complete the board and win by entering numbers into each empty box. Therefore, in this Sudoku game, there is only one valid solution. At the start of the game, several numbers are provided, which serve as clues for players to fill in the next box. The number of clues at the start of the game determines whether the Sudoku game level is difficult. The fewer the clues given, the more difficult it is to solve Sudoku. Solving Sudoku problems cannot be done manually, so several algorithms are needed, which require a lot of repetition and search functions. In this research, we will compare concepts in solving Sudoku using the Backtracking algorithm and the backtracking algorithm using the brute force technique. This comparison is seen from the effectiveness of solving Sudoku. The results of this research conclude that to solve Sudoku logic quickly and efficiently, the backtracking algorithm can be used compared to the Brute Force algorithm. This is because the backtracking algorithm has better complexity, and the solution steps are fast and “smart”. In contrast, the brute algorithm takes longer to complete because the brute force algorithm has to search for all the possibilities. The average time required to complete 10 9 x 9 puzzle tests with backtracking is 10910.96 ms, while the brute force algorithm takes longer, around 15871.90 ms.

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.