  We study hedonic coalition formation games in which cooperation among the
players is restricted by a graph structure: a subset of players can form a
coalition if and only if they are connected in the given graph. We investigate
the complexity of finding stable outcomes in such games, for several notions of
stability. In particular, we provide an efficient algorithm that finds an
individually stable partition for an arbitrary hedonic game on an acyclic
graph. We also introduce a new stability concept -in-neighbor stability- which
is tailored for our setting. We show that the problem of finding an in-neighbor
stable outcome admits a polynomial-time algorithm if the underlying graph is a
path, but is NP-hard for arbitrary trees even for additively separable hedonic
games; for symmetric additively separable games we obtain a PLS-hardness
result.
