The Monte Carlo Casino and radiation

It must be recognized that Stanislaw Ulam and John von Neumann had their moment of inspiration when they named it the Monte Carlo Method. And it was nothing more than a method of approximate resolution of particle transport by using random numbers. Actually the name was suggested by his colleague Nicholas Metropolis who related the random aspect of the method to the fact that Ulam had an uncle who used to ask the family for money because he "had to go to the Monte Carlo casino" in the Principality of Monaco. The name was so popular that it was generalized to all approximation methods based on the use of random numbers, not only to its application to the transport of particles. But many of you will say, and who are these characters? They were European-American physicists who worked together on the Manhattan Project during World War II and in the years after.

But strictly speaking they were not the inventors of the method. Perhaps the first documentation on the use of random sampling to find a solution to a problem is that of the French naturalist Georges Louis Leclerc, Comte de Buffon.

In 1777 he described the following experiment: a needle of length L is randomly thrown onto a sheet of paper lined with straight lines a distance d apart (with d greater than L). What is the probability P that a needle will fall across one of the lines? Leclerc carried out the experiment by throwing the needle many times to determine P. He also carried out the mathematical analysis to find that said probability was related to the length of the needle L and the distance between the lines d through the number π. It is therefore a way of determining the number π using the Monte Carlo method. But if you are ready to carry out the test, arm yourself with patience because many needles have to be thrown away for the result to begin to resemble the real value.

Lord Kelvin also used random sampling to evaluate some integrals of the kinetic theory of gases. In a 1901 publication, he described how he had numbered pieces of paper that he later removed from a bowl. But he himself revealed how little the method convinced him, given the difficulty of properly mixing the pieces or even how static electricity caused him to sometimes remove several pieces at once.

There are other documented examples of the use of random sampling before the 1940s, but we can consider Ulam and von Neumann the creators of the Monte Carlo method as we know it today, by making a complete description of the method and including an ingredient that gave it exceptional potential: the use of electronic computers.

At the end of World War II, the first electronic computer, ENIAC, was built at the University of Pennsylvania, with more than 17,000 vacuum tubes and as many resistors, diodes, and capacitors. His initial goal was to perform ballistic calculations for the US Army, which until then were carried out by a huge group of people with conventional calculators of the time. John von Neumann, who was a consultant to both the military and Los Alamos National Laboratory, which is involved in the Manhattan Project, convinced the military to give up ENIAC's computing power to test models of nuclear reactions.

What were those calculations?

An example is the diffusion of neutrons in a fissile material. Initial models considered a sphere of fissile material surrounded by a high-density material. An initial distribution of neutrons with different speeds was assumed. The idea was to follow the movement of large numbers of individual neutrons that can be scattered, absorbed, split nuclei, and escape from the sphere. First we take a particular neutron with a given position and speed. Then you have to decide at what point you are going to suffer a collision and of what nature it will be. If it has been determined that it is a fission, for example, the number of neutrons that will emerge must be decided, which must be followed as the one that caused the fission. On the other hand, if the collision is a scattering, its new speed must be determined. Once the first neutron and all those produced by fission have been followed until they are absorbed or leave the geometry, we would have concluded the "history" of that neutron. As a result, the medium has undergone a certain disturbance that we will have calculated. This disturbance can be, for example, the energy transferred to the environment by the neutrons. This same process is repeated as many times as necessary until it is appreciated that the average of that disturbance tends to a stable value.

But how do you decide which event each neutron undergoes and what will be the length traveled between consecutive events? This is where random numbers come into play. As we do know the probability functions of occurrence of the different possible events, it is only a matter of randomly sampling these functions each time it is required to determine the length of a trajectory, what event is going to take place and what characteristics the products are going to have. of said event, if any. From the simulation of numerous stories we obtain an average result. But this result changes as the number of stories increases. How can we know how close we are to the value we are looking for? For this we use the variance of the same. The lower this variance, the closer to the searched value we will find ourselves. As a general rule we can say that the variance is inversely proportional to the number of simulated stories. If we want to have a very precise result, it is necessary to simulate a high number of stories.

Before having ENIAC, these simulations were carried out with mechanical calculators. It is easy to see that so much time was required to achieve reliable results that this approach was unfeasible. Enrico Fermi, who had already made inroads into this world of statistical estimation in the thirties, without publishing his methods, designed a device that he called FERMIAC. It consisted of a series of wheels that adjusted according to the material in which the neutron was found and allowed trajectories to be drawn on a two-dimensional graph. This device was in use during a period of time when ENIAC was not operational due to a transfer of operations center.

stam ulam holding the fermiac

In the first years after the diffusion of the Monte Carlo method assisted by computers, it could be said that it had a limited application. Very few scientists had such computers and their programming was very complex. In 1954 Hayward and Hubbell simulated the trajectory of 67 photons using mechanical calculators and a list of random numbers. In the fifties there was a certain insistence on applying the method in solving any type of problem, turning out to be in many cases a less efficient method than other numerical analysis tools, which contributed to its discredit before the scientific community. .

It was from the sixties when it began to be considered better for various reasons. Better recognition was achieved for those problems where it was the best - and in some cases the only - technique available. There was also continuous progress in the construction of electronic computers that made them increasingly affordable and fast in their calculations.

The programming of the simulations was also considerably facilitated with the development of Monte Carlo codes that allow the simulation of radiation transport with the mere introduction of parameters that define the problem in question. Users of these codes do not have to worry about generating random numbers or defining event probability distribution functions. Among those codes we can find MCNP (developed by the Los Alamos laboratory itself), EGS4, Geant4, Fluka, and we even have a Spanish one! PENELOPE developed at the University of Barcelona, which enjoys great prestige, especially in the field of medical physics. Although initially there was great interest in the transport of neutrons, we can already find that these codes can be used for the transport of other types of particles such as photons, electrons, etc.

Currently, Monte Carlo methods are widely used in the study of problems as diverse as evaluation of integrals in mathematics, forest growth and pollution studies in environmental engineering, market analysis in economics, and much more.

Of course you can imagine the impact that the development of radiation transport simulation codes has had on the medical use of ionizing radiation. But its application in medicine is not only focused on the study of the interaction of radiation with matter. In processes in which we can find high variability, such as the response of tissues and tumors to radiotherapy treatments, obtaining results from trials with patients requires a disproportionate effort in many cases. It is here where the Monte Carlo simulation provides very valuable information that can serve as support in scientific progress.

As a curiosity, in 1971 Luke Rhinehart published the novel "The Dice Man". The Monte Carlo method is taken to its extreme by a psychiatrist who decides to become a "random man" making all of his decisions based on the results of rolling a pair of dice.

Access to the best

educational
resources

on Energy and Environment
Go to resources