Randomness in computation presents a persistent tension: it can dramatically simplify algorithms and defeat worst-case inputs, yet it introduces uncertainty about correctness or running time. The history of randomized algorithms is the story of how computer scientists learned to harness this uncertainty as a deliberate resource—and then questioned whether it was truly needed at all. From a non-constructive proof technique to a family of practical design paradigms, the subfield has evolved through a series of frameworks that each redefined the role of randomness in algorithm design.
The story begins not with an algorithm but with a proof technique. In 1947, Paul Erdős introduced the Probabilistic Method to show the existence of combinatorial objects without constructing them. The idea was simple: if a randomly chosen object has a positive probability of satisfying a desired property, then such an object must exist. This method did not produce an algorithm—it was purely existential—but it established randomness as a legitimate reasoning tool in mathematics. Decades later, this same logic would inspire algorithmic techniques that turned existence proofs into constructive procedures. The Probabilistic Method remains active today as a foundational proof strategy, especially in combinatorics and graph theory, and it continues to influence algorithmic thinking by showing that randomness can guarantee existence even when deterministic construction is difficult.
By the late 1970s, researchers began asking whether randomness could be used not just to prove existence but to design efficient algorithms. This shift produced three frameworks that are still the workhorses of the subfield.
Monte Carlo Algorithms (1977) were the first computational paradigm to embrace randomness directly. A Monte Carlo algorithm runs in fixed polynomial time and outputs an answer that is correct with high probability; it may err, but the error probability can be made arbitrarily small by repetition. The classic example is the Miller–Rabin primality test, which quickly determines whether a number is composite with a tunable error bound. Monte Carlo algorithms differ fundamentally from the Probabilistic Method: they are constructive and terminate in a deterministic time, but they trade certainty for speed. This framework introduced the idea that a small probability of error is acceptable in many practical contexts.
Las Vegas Algorithms (1979) offered a different trade-off. A Las Vegas algorithm always produces a correct answer, but its running time is a random variable with a bounded expectation. The canonical example is randomized quicksort, which runs in expected O(n log n) time and never sorts incorrectly. Las Vegas algorithms share with Monte Carlo the use of randomness to avoid worst-case behavior, but they guarantee correctness—a crucial distinction. Where Monte Carlo sacrifices correctness for fixed time, Las Vegas sacrifices worst-case time guarantees for correctness. Both frameworks remain active; Monte Carlo is preferred when a small error is tolerable and deterministic time is essential, while Las Vegas is chosen when correctness is non-negotiable and average-case performance is acceptable.
Randomized Data Structures (1979) emerged from the same pressure to defeat adversarial inputs. Instead of randomizing the algorithm's control flow, these structures embed randomness into the data organization itself. Universal hashing, introduced by Carter and Wegman, is a prime example: by randomly choosing a hash function from a universal family, the structure guarantees good expected performance regardless of the input distribution. Randomized data structures are closely related to Las Vegas algorithms—both aim to avoid worst-case scenarios—but they operate at a different level of abstraction. A randomized hash table, for instance, provides expected O(1) operations while maintaining correctness. This framework has become ubiquitous in practice, appearing in everything from database indexing to network routing.
The 1980s saw the development of two powerful design techniques that turned the Probabilistic Method's existential logic into concrete algorithmic tools.
Randomized Rounding (1985) directly realizes the Probabilistic Method's spirit. Given a linear programming relaxation of an integer optimization problem, randomized rounding solves the relaxed problem and then rounds the fractional solution to an integer one using random choices. The probability that the rounded solution violates constraints can be bounded, yielding a provably good approximation algorithm. This technique transformed the Probabilistic Method from a proof technique into a constructive algorithmic paradigm. It differs from earlier Monte Carlo methods by targeting optimization rather than decision problems, and it remains a cornerstone of approximation algorithms today.
Randomized Incremental Algorithms (1989) addressed geometric problems by building solutions incrementally with random insertion orders. In computational geometry, algorithms for constructing convex hulls, Delaunay triangulations, and arrangements of lines achieve expected optimal time by processing elements in a random order. This framework shares with Las Vegas algorithms the goal of expected-time guarantees, but it specifically exploits randomness to avoid the worst-case insertion sequences that plague deterministic incremental methods. Randomized incremental algorithms coexist with deterministic geometric data structures; they are preferred when simplicity and expected efficiency are more important than worst-case guarantees.
Markov Chain Algorithms (1987) introduced a new way to use randomness: instead of randomizing a single computation, they construct a Markov chain whose stationary distribution corresponds to the desired probability distribution over a large state space. By simulating the chain until it mixes (reaches near-stationarity), one can sample from distributions that are otherwise intractable. This framework is a subtype of Monte Carlo algorithms—the output is approximate and the running time depends on the mixing time—but it addresses a fundamentally different class of problems: approximate counting and uniform generation. The landmark work of Jerrum, Valiant, and Vazirani showed how to count the number of perfect matchings in a graph by sampling from a carefully designed Markov chain. Markov Chain Algorithms differ from earlier Monte Carlo methods in that the randomness is used to explore a state space rather than to make a single decision; they also introduced the critical concept of mixing time analysis, which remains an active research area.
Running parallel to all these developments, Derandomization (1977) has persistently asked whether randomness is truly necessary for efficient computation. The program seeks to simulate randomized algorithms deterministically with only a polynomial slowdown. Early methods, such as the method of conditional expectations, showed that many randomized algorithms can be derandomized by carefully fixing random choices. Later work connected derandomization to circuit complexity and pseudorandom generators, leading to the conditional belief that BPP (the class of problems solvable by randomized polynomial-time algorithms) might equal P. Derandomization directly challenges the frameworks that rely on randomness: if every Monte Carlo algorithm can be derandomized, then the trade-off between time and correctness becomes moot. However, derandomization often comes at a cost—the deterministic algorithm may be more complex or slower in practice—so the debate remains unresolved. Today, derandomization coexists with randomized frameworks as a complementary research direction, not a replacement.
Today, the leading frameworks of randomized algorithms coexist in a productive division of labor. The Probabilistic Method remains a standard proof technique in combinatorics. Monte Carlo and Las Vegas algorithms are taught as fundamental paradigms, each with clear trade-offs. Randomized Data Structures are embedded in nearly every software system. Randomized Rounding is a staple of approximation algorithms. Markov Chain Algorithms underpin modern statistical sampling and machine learning. Derandomization continues to refine our understanding of when randomness is essential.
There is broad agreement that randomness simplifies algorithm design and often yields the most efficient known solutions for many problems. The main disagreement centers on the fundamental question: is randomness truly necessary for polynomial-time computation? While derandomization has shown that many specific randomized algorithms can be made deterministic, the general question of whether BPP equals P remains open. In practice, randomized algorithms are used routinely because they are simpler and faster than their deterministic counterparts, even when derandomization is theoretically possible. This tension between theoretical eliminability and practical indispensability defines the subfield's ongoing intellectual agenda.