  We simulate the transition from amplified spontaneous emission (ASE) to
lasing in random systems with varying degrees of mode overlap. This is
accomplished by solving the stochastic Maxwell-Bloch equations with the
finite-difference time-domain method. Below lasing threshold, the continuous
emission spectra are narrowed by frequency-dependent amplification. Our
simulations reproduce the stochastic emission spikes in the spectra.
Well-defined peaks, corresponding to the system resonances, emerge at higher
pumping and are narrowed by stimulated emission before lasing takes place.
Noise tends to distribute pump energy over many modes, resulting in multi-mode
operation. Well above the lasing threshold, the effects of noise lessen and
results become similar to those without noise. By comparing systems of
different scattering strength, we find that weaker scattering extends the
transition region from ASE to lasing, where the effects of noise are most
significant.
