## Monte Carlo Method

The Monte Carlo method is a class of computational algorithms mainly used for optimization, numerical integration, and/or probability distribution. It originated in the context of the Second World War and the Manhattan project – the development of the first atomic bomb – where two mathematicians, John von Neuman and Stanislaw Ulam, working at the Los Alamos Laboratory on methods of simulating outcomes based on random sampling, named the method they were using after the gambling games at the famous Monte Carlo Casino.

For example, you could apply the Monte Carlo method to determine complex areas delimited by unconventional polygons or curves with great precision. You would typically frame this area with the shape of a known area like a square and randomly generate points within that square. Then, you would calculate the ratio of points figuring inside the area to be determined to the number of total points generated within the square, as shown above. This ratio will express the area of the shape in comparison to the area of the square. The more you generate points, the more this ratio will approach the area sought after. A typical application would be to numerically approximate unsolvable integrals.

Concretely, the Monte Carlo method consists of studying the evolution of a model without observing how it actually works. It allows the estimation of a numerical quantity, be it a probability or a fixed outcome, using pseudo-random numbers. The numerical quantity to determine would have been the area bound by a complex shape in the example above.

The algorithm will simulate a large number of possible outcomes to the studied situation using random numbers generated within an interval to simulate the behavior of and be able to work out a numerical value describing the outcome. In the studied example, the randomly generated numbers would be bound by the interval of the known area of the square.

These algorithms are based on repeated computations and random sampling. Their validity relies on the computer’s ability to simulate vast numbers of outcomes in a short time interval. Today the Monte Carlo method is applied in several fields, including physics, telecommunications, biology, and finance.

The underlying principle, which explains why the Monte Carlo method becomes valid as the number of random numbers generated increases, is the law of large numbers. This principle asserts that the mean of the outcomes of randomly generated samples converges towards the system’s actual behavior when the size of the sample tends to infinity. Therefore, for a sample considered “large enough,” this mean can be equated to the expectation of a system’s behavior. For systems with outcomes that greatly diverge from each other, the sample should be larger (and the number of runs of the Monte Carlo simulation should be greater) than in a system where the outcomes seem to correlate closely.

Another example would be the determination of a specific outcome of rolling dice. For instance, if you wanted to determine the probability of obtaining a 6, you would generate random numbers between 1 and 6 many times to observe the ratio of outcomes, which are 6 to the number of total outcomes. This result should give you the probability of obtaining a 6 when rolling. The more times you simulate dice rolls by generating random numbers between 1 and 6, the more accurate the outcome is due to the law of large numbers. Of course, Monte Carlo would not be instrumental in this case because we already know a dice’s behavior.

## Applications in Particle Physics

To simulate high-energy particle events such as collisions or decays, scientists use event generators (various software libraries) that can simulate particle interactions by randomly generating events in an attempt to mirror the events in particle accelerators and colliders. For example, if a software wanted to determine the outcome of a particle collision using Monte Carlo, it would simulate many possible outcomes within the laws of physics to observe any trends that might result.

The PYTHIA, amongst others, is one of the main hadronic event generators (hadrons are subatomic particles made of two or more quarks held together by the strong force – protons and neutrons are hadrons). PYTHIA is used to generate the outcomes of proton-proton and electron-positron collisions to determine the underlying physics of nuclear decay of fragmentation and calculate the efficiencies of particle collision detectors.

As such, the Monte Carlo method is a potent tool to simulate the behavior of systems that are too complex to be modelized/solved analytically. However, the limitations of this method lie in the limitation of computing power. The more variables or factors to take into account in predicting an outcome, the more the number of possibilities to simulate grows exponentially to cover a representative sample that is, as previously mentioned, “large enough.”

Before you go, make sure you also read:

### 1 thought on “Using Randomness to Determine a Solution: The Magic of the Famous Monte Carlo Algorithm.”

1. Andre van Putten

Thank you for explaning so clearly. So… the Monte Carlo method is usefull from particle physics to… astronomy/astrophysics anf maybe even cosmology. (Estimation of the number of stars in a distant galaxy and estimation of the number of galaxies in a certain region of the Universe? Estimation of the possible number of possible universes in the possible Multiverse? )

Scroll to Top