Monte Carlo Methods
Monte Carlo Methods
Monte Carlo Methods
=
Undecayed Nuclei at time t : N(t) =
Probability P that a nucleus undergoes radioactive decay in time
=
The Monte Carlo Approach
In a given time step, each nucleus is given the opportunity to decay with probability
p. So for a given nucleus, we choose a random number in the range 0 to 1. If the
number is less than the probability p, then it decays. Here decay simply means that
the total number of nuclei is decrease by one. Note that this happens every time
step .
Pseudo code
1. Input initial number of parent nuclei
,
2. Input decay constant ,
3. Input the number of time steps ,
4. Input time step ,
5. Loop: t from 0 to ,
6. Loop: i from 0 to
,
7. Generate a random number R,
8. If R< then
1 &
+1
9. In case daughter nuclei also decay add steps 5 to 8 for
,
10. Output
and