5,973 research outputs found
The complexity of Solitaire
AbstractKlondike is the well-known 52-card Solitaire game available on almost every computer. The problem of determining whether an n-card Klondike initial configuration can lead to a win is shown NP-complete. The problem remains NP-complete when only three suits are allowed instead of the usual four. When only two suits of opposite color are available, the problem is shown NL-hard. When the only two suits have the same color, two restrictions are shown in AC0 and in NL respectively. When a single suit is allowed, the problem drops in complexity down to AC0[3], that is, the problem is solvable by a family of constant-depth unbounded-fan-in {and, or, mod3 }-circuits. Other cases are studied: for example, “no King” variant with an arbitrary number of suits of the same color and with an empty “pile” is NL-complete
Zielonka's Recursive Algorithm: dull, weak and solitaire games and tighter bounds
Dull, weak and nested solitaire games are important classes of parity games,
capturing, among others, alternation-free mu-calculus and ECTL* model checking
problems. These classes can be solved in polynomial time using dedicated
algorithms. We investigate the complexity of Zielonka's Recursive algorithm for
solving these special games, showing that the algorithm runs in O(d (n + m)) on
weak games, and, somewhat surprisingly, that it requires exponential time to
solve dull games and (nested) solitaire games. For the latter classes, we
provide a family of games G, allowing us to establish a lower bound of 2^(n/3).
We show that an optimisation of Zielonka's algorithm permits solving games from
all three classes in polynomial time. Moreover, we show that there is a family
of (non-special) games M that permits us to establish a lower bound of 2^(n/3),
improving on the previous lower bound for the algorithm.Comment: In Proceedings GandALF 2013, arXiv:1307.416
Solving Mahjong Solitaire boards with peeking
We first prove that solving Mahjong Solitaire boards with peeking is
NP-complete, even if one only allows isolated stacks of the forms /aab/ and
/abb/. We subsequently show that layouts of isolated stacks of heights one and
two can always be solved with peeking, and that doing so is in P, as well as
finding an optimal algorithm for such layouts without peeking.
Next, we describe a practical algorithm for solving Mahjong Solitaire boards
with peeking, which is simple and fast. The algorithm uses an effective pruning
criterion and a heuristic to find and prioritize critical groups. The ideas of
the algorithm can also be applied to solving Shisen-Sho with peeking.Comment: 10 page
Large Peg-Army Maneuvers
Despite its long history, the classical game of peg solitaire continues to
attract the attention of the scientific community. In this paper, we consider
two problems with an algorithmic flavour which are related with this game,
namely Solitaire-Reachability and Solitaire-Army. In the first one, we show
that deciding whether there is a sequence of jumps which allows a given initial
configuration of pegs to reach a target position is NP-complete. Regarding
Solitaire-Army, the aim is to successfully deploy an army of pegs in a given
region of the board in order to reach a target position. By solving an
auxiliary problem with relaxed constraints, we are able to answer some open
questions raised by Cs\'ak\'any and Juh\'asz (Mathematics Magazine, 2000). To
appreciate the combinatorial beauty of our solutions, we recommend to visit the
gallery of animations provided at http://solitairearmy.isnphard.com.Comment: Conference versio
- …