Randomized algorithm whose output may be incorrect with a certain (typically small) probability

In computing, a Monte Carlo algorithm is a randomized algorithm whose output may be incorrect with a certain (typically small) probability. Two examples of such algorithms are Karger–Stein algorithm and Monte Carlo algorithm for minimum Feedback arc set.
The name refers to the grand casino in the Principality of Monaco at Monte Carlo, which is well-known around the world as an icon of gambling. The term "Monte Carlo" was first introduced in 1947 by Nicholas Metropolis.
A Monte Carlo algorithm is a type of resource-restricted algorithm that returns answers based on probability. As a result, the solutions produced by the Monte Carlo algorithm may or may not be correct within a certain margin of error. Mathematicians, scientists and developers use Monte Carlo algorithms to make observations based on input.
One of the best ways to describe Monte Carlo algorithms is to contrast them with a different class of algorithms called Las Vegas algorithms. In a Las Vegas algorithm, the result will always be correct, but the system may use more than the anticipated amount of resources or time. In the words of some experts, the Las Vegas algorithm “gambles” with resource usage while always returning a precise result.
On the contrary, the Monte Carlo algorithm uses a finite resource path to generate the above-mentioned “fuzzy” results with a margin of error. Monte Carlo algorithms often rely on repeated random sampling – they get general random numbers, and look for probability in order to provide results.
Some experts use the example of a square within a circle, and describe the process of the Monte Carlo algorithm as a series of “hits” that will land either in the interior circle, or in the outer edges of the square beyond the circle’s boundaries. Visual demonstrations show how more repeated sampling gives the Monte Carlo algorithm a more precise result. Monte Carlo algorithms, as well as things like a Monte Carlo tree search or Monte Carlo simulator, rely on this foundational mathematical idea that repeated sampling yields logical intelligence results.
Monte Carlo: Produce correct or optimum result with some probability. These algorithms have deterministic running time and it is generally easier to find out worst case time complexity. For example this implementation of Karger’s Algorithm produces minimum cut with probability greater than or equal to 1/n2 (n is number of vertices) and has worst case time complexity as O(E). Another example is Fermet Method for Primality Testing.
For a Monte Carlo algorithm with one-sided errors, the failure probability can be reduced (and the success probability amplified) by running the algorithm k times. Consider again the Solovay–Strassen algorithm which is ​1⁄2-correct false-biased. One may run this algorithm multiple times returning a false answer if it reaches a false response within k iterations, and otherwise returning true. Thus, if the number is prime then the answer is always correct, and if the number is composite then the answer is correct with probability at least 1−(1−​1⁄2)k = 1−2−k.
For Monte Carlo decision algorithms with two-sided error, the failure probability may again be reduced by running the algorithm k times and returning the majority function of the answers.
Regards
Sarah Rose
Managing Editoe
International Journal of Swarm Intelligence and Evolutionary Computatio