  We study a weighted eigenvalue problem with anisotropic diffusion in bounded
Lipschitz domains $\Omega\subset \mathbb{R}^{N} $, $N\ge1$, under Robin
boundary conditions, proving the existence of two positive eigenvalues
$\lambda^{\pm}$ respectively associated with a positive and a negative
eigenfunction. Next, we analyze the minimization of $\lambda^{\pm}$ with
respect to the sign-changing weight, showing that the optimal eigenvalues
$\Lambda^{\pm}$ are equal and the optimal weights are of bang-bang type, namely
piece-wise constant functions, each one taking only two values. As a
consequence, the problem is equivalent to the minimization with respect to the
subsets of $\Omega$ satisfying a volume constraint. Then, we completely solve
the optimization problem in one dimension, in the case of homogeneous Dirichlet
or Neumann conditions, showing new phenomena induced by the presence of the
anisotropic diffusion. The optmization problem for $\lambda^{+}$ naturally
arises in the study of the optimal spatial arrangement of resources for a
species to survive in a heterogeneous habitat.
