  Stability results for the Helmholtz equations in both deterministic and
random periodic structures are proved in this paper. Under the assumption of
excluding resonances, by a variational method and Fourier analysis in the
energy space, the stability estimate for the Helmholtz equation in a
deterministic periodic structure is established. For the stochastic case, by
introducing a variable transform, the variational formulation of the scattering
problem in a random domain is reduced to that in a definite domain with random
medium. Combining the stability result for the deteministic case with
regularity and stochastic regularity of the scattering surface, Pettis
measurability theorem and Bochner's Theorem further yield the stability result
for the scattering problem by random periodic structures. Both stability
estimates are explicit with respect to the wavenumber.
