  The inverse problem of finding the optimal network structure for a specific
type of dynamical process stands out as one of the most challenging problems in
network science. Focusing on the susceptible-infected-susceptible type of
dynamics on annealed networks whose structures are fully characterized by the
degree distribution, we develop an analytic framework to solve the inverse
problem. We find that, for relatively low or high infection rates, the optimal
degree distribution is unique, which consists of no more than two distinct
nodal degrees. For intermediate infection rates, the optimal degree
distribution is multitudinous and can have a broader support. We also find
that, in general, the heterogeneity of the optimal networks decreases with the
infection rate. A surprising phenomenon is the existence of a specific value of
the infection rate for which any degree distribution would be optimal in
generating maximum spreading prevalence. The analytic framework and the
findings provide insights into the interplay between network structure and
dynamical processes with practical implications.
