Answer
(a) $4.1\times10^{-16}\;\text{atoms}$
(b) $68.576\;J$
Work Step by Step
(a) The naturally occurring population ratio $\frac{N_x}{N_0}$ of the two states is due to thermal agitation of the gas atoms
$\frac{N_x}{N_0}=e^{-\frac{(E_x-E_0)}{kT}}$
where, $(E_x-E_0)$ is the energy separation between the two states.
Substituting the given values:
$(E_x-E_0)=\frac{ch}{\lambda}=\frac{3\times10^{8}\times 6.63\times 10^{-34}}{580\times10^{-9}}\;J=3.429\times10^{-19}\;J=2.143\;eV$
$N_0=4\times 10^{20}\;\text{atoms}$ and $T=300\;K$
$\frac{N_x}{4\times 10^{20}}=e^{-\frac{2.143}{8.62\times10^{-5}\times 300}}$
$N_x\approx4.1\times10^{-16}\;\text{atoms}$
Therefore, the number of atoms in upper state is $4.1\times10^{-16}$
(b) The total photon energy in ground state is
$E_0=1\times10^{20}\times\frac{ch}{\lambda}=1\times10^{20}\times2.143\;eV$
The total photon energy in excited state is
$E_1=3\times10^{20}\times\frac{ch}{\lambda}=3\times10^{20}\times2.143\;eV$
Therefore, the maximum energy that could be released by the atoms in a single laser
pulse is
$E_1-E_0=(3-1)\times10^{20}\times 2.143\;eV=4.286\times10^{20}\;eV=68.576\;J$