Claim Missing Document
Check
Articles

Found 2 Documents
Search
Journal : International Journal of Computing Science and Applied Mathematics-IJCSAM

Elementary Algorithmic Methods for Solving Suguru Puzzles Butrahandisya Butrahandisya; Muhammad Atzaki; Gia Septiana Wulandari
(IJCSAM) International Journal of Computing Science and Applied Mathematics Vol. 10 No. 1 (2024)
Publisher : LPPM Institut Teknologi Sepuluh Nopember

Show Abstract | Download Original | Original Source | Check in Google Scholar

Abstract

We discuss elementary algorithmic aspects of the Suguru puzzle---a single-player paper-and-pencil puzzle introduced in 2001 and confirmed NP-complete in 2022. We propose a backtracking algorithm with pruning optimizations for solving an $m \times n$ Suguru puzzles containing $R$ regions and $H$ hint cells in $O(R \cdot (mn-H+2)!)$ time. Despite this factorial asymptotic upper bound, a C++ implementation of our proposed algorithm successfully solved all Suguru instances with no more than $100$ cells using a personal computer in less than $0.5$ second. We also prove that any Suguru instance of size $m \times n$ with either $m = 1$ or $n = 1$ can be solved in linear time in terms of the puzzle size. Finally, we provide an upper bound for the number of solutions to such tractable instances.
Solving Yin-Yang Puzzles Using Exhaustive Search and Prune-and-Search Algorithms Made Indrayana Putra; Muhammad Arzaki; Gia Septiana Wulandari
(IJCSAM) International Journal of Computing Science and Applied Mathematics Vol. 8 No. 2 (2022)
Publisher : LPPM Institut Teknologi Sepuluh Nopember

Show Abstract | Download Original | Original Source | Check in Google Scholar

Abstract

We investigate some algorithmic and mathematical aspects of Yin-Yang/Shiromaru-Kuromaru puzzles. Specifically, we discuss two algorithms for solving arbitrary Yin-Yang puzzles, namely the exhaustive search approach and the prune-and-search technique. We show that both algorithms have an identical asymptotic running time of O(max{mn, 2^(mn−h)}) for finding all solutions of a Yin-Yang instance with h hints of size m x n. Nevertheless, our experiments show that the practical running time of the prune-and-search technique outperforms the conventional exhaustive search approach.