  We consider the optimal arrangement of two diffusion materials in a bounded
open set $\Omega\subset \mathbb{R}^N$ in order to maximize the energy. The
diffusion problem is modeled by the $p$-Laplacian operator. It is well known
that this type of problems has no solution in general and then that it is
necessary to work with a relaxed formulation. In the present paper we obtain
such relaxed formulation using the homogenization theory, i.e. we replace both
materials by microscopic mixtures of them. Then we get some uniqueness results
and a system of optimality conditions. As a consequence we prove some
regularity properties for the optimal solutions of the relaxed problem. Namely,
we show that the flux is in the Sobolev space $H^1(\Omega)^N$ and that the
optimal proportion of the materials is derivable in the orthogonal direction to
the flux. This will imply that the unrelaxed problem has no solution in
general. Our results extend those obtained by the first author for the Laplace
operator.
