1,141 research outputs found
Bejeweled, Candy Crush and other Match-Three Games are (NP-)Hard
The twentieth century has seen the rise of a new type of video games targeted
at a mass audience of "casual" gamers. Many of these games require the player
to swap items in order to form matches of three and are collectively known as
\emph{tile-matching match-three games}. Among these, the most influential one
is arguably \emph{Bejeweled} in which the matched items (gems) pop and the
above gems fall in their place. Bejeweled has been ported to many different
platforms and influenced an incredible number of similar games. Very recently
one of them, named \emph{Candy Crush Saga} enjoyed a huge popularity and
quickly went viral on social networks. We generalize this kind of games by only
parameterizing the size of the board, while all the other elements (such as the
rules or the number of gems) remain unchanged. Then, we prove that answering
many natural questions regarding such games is actually \NP-Hard. These
questions include determining if the player can reach a certain score, play for
a certain number of turns, and others. We also
\href{http://candycrush.isnphard.com}{provide} a playable web-based
implementation of our reduction.Comment: 21 pages, 12 figure
Trainyard is NP-Hard
Recently, due to the widespread diffusion of smart-phones, mobile puzzle
games have experienced a huge increase in their popularity. A successful puzzle
has to be both captivating and challenging, and it has been suggested that this
features are somehow related to their computational complexity \cite{Eppstein}.
Indeed, many puzzle games --such as Mah-Jongg, Sokoban, Candy Crush, and 2048,
to name a few-- are known to be NP-hard \cite{CondonFLS97,
culberson1999sokoban, GualaLN14, Mehta14a}. In this paper we consider
Trainyard: a popular mobile puzzle game whose goal is to get colored trains
from their initial stations to suitable destination stations. We prove that the
problem of determining whether there exists a solution to a given Trainyard
level is NP-hard. We also \href{http://trainyard.isnphard.com}{provide} an
implementation of our hardness reduction
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
The Max-Distance Network Creation Game on General Host Graphs
In this paper we study a generalization of the classic \emph{network creation
game} in the scenario in which the players sit on a given arbitrary
\emph{host graph}, which constrains the set of edges a player can activate at a
cost of each. This finds its motivations in the physical
limitations one can have in constructing links in practice, and it has been
studied in the past only when the routing cost component of a player is given
by the sum of distances to all the other nodes. Here, we focus on another
popular routing cost, namely that which takes into account for each player its
\emph{maximum} distance to any other player. For this version of the game, we
first analyze some of its computational and dynamic aspects, and then we
address the problem of understanding the structure of associated pure Nash
equilibria. In this respect, we show that the corresponding price of anarchy
(PoA) is fairly bad, even for several basic classes of host graphs. More
precisely, we first exhibit a lower bound of
for any . Notice that this implies a counter-intuitive lower
bound of for very small values of (i.e., edges can
be activated almost for free). Then, we show that when the host graph is
restricted to be either -regular (for any constant ), or a
2-dimensional grid, the PoA is still , which is proven to be tight for
. On the positive side, if , we show
the PoA is . Finally, in the case in which the host graph is very sparse
(i.e., , with ), we prove that the PoA is , for any
.Comment: 17 pages, 4 figure
Specializations and Generalizations of the Stackelberg Minimum Spanning Tree Game
Let be given a graph whose edge set is partitioned into a set
of \emph{red} edges and a set of \emph{blue} edges, and assume that red
edges are weighted and form a spanning tree of . Then, the \emph{Stackelberg
Minimum Spanning Tree} (\stack) problem is that of pricing (i.e., weighting)
the blue edges in such a way that the total weight of the blue edges selected
in a minimum spanning tree of the resulting graph is maximized. \stack \ is
known to be \apx-hard already when the number of distinct red weights is 2. In
this paper we analyze some meaningful specializations and generalizations of
\stack, which shed some more light on the computational complexity of the
problem. More precisely, we first show that if is restricted to be
\emph{complete}, then the following holds: (i) if there are only 2 distinct red
weights, then the problem can be solved optimally (this contrasts with the
corresponding \apx-hardness of the general problem); (ii) otherwise, the
problem can be approximated within , for any .
Afterwards, we define a natural extension of \stack, namely that in which blue
edges have a non-negative \emph{activation cost} associated, and it is given a
global \emph{activation budget} that must not be exceeded when pricing blue
edges. Here, after showing that the very same approximation ratio as that of
the original problem can be achieved, we prove that if the spanning tree of red
edges can be rooted so as that any root-leaf path contains at most edges,
then the problem admits a -approximation algorithm, for any
.Comment: 22 pages, 7 figure
Improved Purely Additive Fault-Tolerant Spanners
Let be an unweighted -node undirected graph. A \emph{-additive
spanner} of is a spanning subgraph of such that distances in
are stretched at most by an additive term w.r.t. the corresponding
distances in . A natural research goal related with spanners is that of
designing \emph{sparse} spanners with \emph{low} stretch.
In this paper, we focus on \emph{fault-tolerant} additive spanners, namely
additive spanners which are able to preserve their additive stretch even when
one edge fails. We are able to improve all known such spanners, in terms of
either sparsity or stretch. In particular, we consider the sparsest known
spanners with stretch , , and , and reduce the stretch to , ,
and , respectively (while keeping the same sparsity).
Our results are based on two different constructions. On one hand, we show
how to augment (by adding a \emph{small} number of edges) a fault-tolerant
additive \emph{sourcewise spanner} (that approximately preserves distances only
from a given set of source nodes) into one such spanner that preserves all
pairwise distances. On the other hand, we show how to augment some known
fault-tolerant additive spanners, based on clustering techniques. This way we
decrease the additive stretch without any asymptotic increase in their size. We
also obtain improved fault-tolerant additive spanners for the case of one
vertex failure, and for the case of edge failures.Comment: 17 pages, 4 figures, ESA 201
No truthful mechanism can be better than approximate for two natural problems
This work gives the first natural non-utilitarian problems for which the
trivial approximation via VCG mechanisms is the best possible. That is, no
truthful mechanism can be better than approximate, where is the number
of agents. The problems are the min-max variant of shortest path and (directed)
minimum spanning tree mechanism design problems. In these procurement auctions,
agents own the edges of a network, and the corresponding edge costs are
private. Instead of the total weight of the subnetwork, in the min-max variant
we aim to minimize the maximum agent cost.Comment: to appear in Games and Economic Behavio
- …
