802 research outputs found
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
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
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
Multiple-Edge-Fault-Tolerant Approximate Shortest-Path Trees
Let be an -node and -edge positively real-weighted undirected
graph. For any given integer , we study the problem of designing a
sparse \emph{f-edge-fault-tolerant} (-EFT) {\em -approximate
single-source shortest-path tree} (-ASPT), namely a subgraph of
having as few edges as possible and which, following the failure of a set
of at most edges in , contains paths from a fixed source that are
stretched at most by a factor of . To this respect, we provide an
algorithm that efficiently computes an -EFT -ASPT of size . Our structure improves on a previous related construction designed for
\emph{unweighted} graphs, having the same size but guaranteeing a larger
stretch factor of , plus an additive term of .
Then, we show how to convert our structure into an efficient -EFT
\emph{single-source distance oracle} (SSDO), that can be built in
time, has size , and is able to report,
after the failure of the edge set , in time a
-approximate distance from the source to any node, and a
corresponding approximate path in the same amount of time plus the path's size.
Such an oracle is obtained by handling another fundamental problem, namely that
of updating a \emph{minimum spanning forest} (MSF) of after that a
\emph{batch} of simultaneous edge modifications (i.e., edge insertions,
deletions and weight changes) is performed. For this problem, we build in time a \emph{sensitivity} oracle of size , that
reports in time the (at most ) edges either exiting from
or entering into the MSF. [...]Comment: 16 pages, 4 figure
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
ground penetrating radar the electromagnetic signal attenuation and maximum penetration depth
The use of high frequencies limits the penetration of the radar energy; this low penetration depends, at a parity of used frequencies, on the electromagnetic properties of the investigated material. The principal drawback is the elevated sensibility of the system to the variations of the EM properties of the environment immediately surrounds the antennas. The radar signals that arrive at the receiving antenna are attenuated and modified because of the selective absorption of the pulses by the ground, because of geometrical spreading, and because of an alteration of the actual amplitude due to the instrument amplification. In this paper, the absorption of the radar signal is taken into consideration and we determine, respectively, (i) the radar signal attenuation in the ground, (ii) the electrical conductivity (σ) and the relative dielectric permettivity (RDP) of the ground, and (iii) the maximum penetration depth of GPR in the ground
- …