错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

Efficient SAT-Based Approach for Solving Juosan Puzzles

  • Muhammad Tsaqif Ammar,
  • Muhammad Arzaki,
  • Gia Septiana Wulandari

摘要

Juosan is a single-player paper-and-pencil puzzle introduced in 2014 and shown to be NP-complete in 2018. This NP-completeness implies that the Juosan puzzle is polynomial-time reducible to the Boolean satisfiability (SAT) problem, thereby allowing us to transform the puzzle into SAT problems. This paper introduces an efficient SAT-based approach for solving the Juosan puzzles. We first discuss the rules and derived properties of Juosan puzzles and translate them into Boolean formulas in Conjunctive Normal Forms (CNF). We show that the number of clauses and propositional variables used in the encoding is polynomially proportional to the puzzle’s size. Using this encoding, we successfully implement a declarative program with no search algorithm using MiniSAT in C++ to solve any Juosan puzzle with up to \(1350\) cells in less than one second on a standard personal computer. Experimental results show that our SAT-based approach outperforms the optimized backtracking algorithm for larger puzzles.