Computational Complexity of Swish
Takashi Horiyama, Takehiro Ito, Jun Kawahara, Shin-ichi Minato, Akira Suzuki, Ryuhei Uehara, Yutaro Yamaguchi
TL;DR
The paper resolves the open case of Swish with two symbols per card by showing polynomial-time solvability when no flips or rotations are allowed and NP-completeness when any transformation is allowed; it also extends NP-hardness to the full-Swish setting and to the rotation-only variant. The key technique for the tractable case is a reduction to a maximum-weight perfect matching on a bipartite graph, yielding a polynomial-time algorithm with complexity comparable to classic matching algorithms. Together with prior results for other symbol counts, the work provides a complete classification of Swish complexity across two axes: number of symbols per card and admissible symmetries, revealing a sharp boundary between tractable and intractable variants. The findings have implications for understanding the combinatorial structure of Swish and for evaluating the computational complexity of similar overlay puzzles in games and puzzles.
Abstract
Swish is a card game in which players are given cards having symbols (hoops and balls), and find a valid superposition of cards, called a "swish." Dailly, Lafourcade, and Marcadet (FUN 2024) studied a generalized version of Swish and showed that the problem is solvable in polynomial time with one symbol per card, while it is NP-complete with three or more symbols per card. In this paper, we resolve the previously open case of two symbols per card, which corresponds to the original game. We show that Swish is NP-complete for this case. Specifically, we prove the NP-hardness when the allowed transformations of cards are restricted to a single (horizontal or vertical) flip or 180-degree rotation, and extend the results to the original setting allowing all three transformations. In contrast, when neither transformation is allowed, we present a polynomial-time algorithm. Combining known and our results, we establish a complete characterization of the computational complexity of Swish with respect to both the number of symbols per card and the allowed transformations.
