  The paper is devoted to optimization of resonances in a 1-D open optical
cavity. The cavity's structure is represented by its dielectric permittivity
function e(s). It is assumed that e(s) takes values in the range 1 <= e_1 <=
e(s) <= e_2. The problem is to design, for a given (real) frequency, a cavity
having a resonance with the minimal possible decay rate. Restricting ourselves
to resonances of a given frequency, we define cavities and resonant modes with
locally extremal decay rate, and then study their properties. We show that such
locally extremal cavities are 1-D photonic crystals consisting of alternating
layers of two materials with extreme allowed dielectric permittivities e_1 and
e_2. To find thicknesses of these layers, a nonlinear eigenvalue problem for
locally extremal resonant modes is derived. It occurs that coordinates of
interface planes between the layers can be expressed via arg-function of
corresponding modes. As a result, the question of minimization of the decay
rate is reduced to a four-dimensional problem of finding the zeroes of a
function of two variables.
