JOVANA
Explore Library Glossary Getting Started Three Levels Fields How it works Mission
Join the mission
Back to the library
Information / CS 1953

Equation of State Calculations by Fast Computing Machines

N. Metropolis, A. W. Rosenbluth, M. N. Rosenbluth, A. H. Teller & E. Teller

Can't check every possibility? Wander among them at random — cleverly — and a plain average becomes the right answer.

Choose your version
In depth · the introduction

When a problem has too many possibilities to ever check them all, you can still get the right answer — by wandering through them at random, but cleverly.

The big idea

Many questions in science come down to an average over a staggering number of arrangements — for instance, the average pressure of a gas, taken over every possible arrangement of its molecules. There are far too many to add up, and almost all of them barely matter.

In 1953 a team at Los Alamos got a computer to explore the arrangements that do matter, by taking a guided random walk. From wherever you are, try a small random change. If it leads somewhere more likely, go there. If it leads somewhere less likely, go anyway — but only with a chance that shrinks the worse it is. Wander this way and you visit each arrangement just as often as it deserves, so a simple average of what you see along the way is the answer.

How it came about

It was born in the weapons labs and their first electronic computers. At Los Alamos, Nicholas Metropolis, the husband-and-wife physicists Marshall and Arianna Rosenbluth, and Edward and Augusta Teller put the idea to work on the MANIAC, one of the earliest stored-program machines. The name “Monte Carlo,” after the casino, had been coined a few years earlier by Stanislaw Ulam and John von Neumann for the broader notion of solving problems by chance.

Who did what on the 1953 paper is still disputed. Marshall Rosenbluth said late in life that he and Arianna did the real work — she wrote the program — while the algorithm carries Metropolis's name, and that Edward Teller supplied an early, crucial idea. Arianna Rosenbluth, who actually coded it, is the one history has remembered least.

Why it mattered

It turned “too many possibilities to count” from a dead end into a routine calculation, and helped make computer simulation a third way of doing science, beside theory and experiment. The same trick now sits inside the statistics behind clinical trials and election forecasts, the simulations behind weather and new materials, and a great deal of modern machine learning.

A way to picture it

Imagine mapping the busiest spots in a huge city, in the dark, on foot. You can't visit every street. So you stroll: step somewhere nearby; if it feels busier, keep going; if quieter, sometimes turn back and sometimes not. Each minute, mark where you stand. Walk long enough and your tally of marks traces the city's crowds — though you never saw the whole map. That is exactly how the algorithm samples the “crowded,” most-likely arrangements of a physical system.

Interactive Metropolis sampler: a target probability curve with two peaks, and bars showing where a guided random walk has been; pressing step runs the propose-and-accept rule and the bars climb to match the curve, while a slider for the proposal step changes the acceptance rate.

Where it sits

The idea rests on Markov chains — sequences where the next step depends only on where you are now, studied by Andrey Markov in 1913 — and on the probability foundations laid by Kolmogorov in 1933. It grew out of the Monte Carlo method of Ulam and von Neumann in the 1940s, was generalized by Hastings in 1970, and now underlies the Bayesian statistics and large-scale simulation woven through modern science. (See the Library's document on Markov.)

The original document
Original source text
N. Metropolis, A. W. Rosenbluth, M. N. Rosenbluth, A. H. Teller & E. Teller · J. Chem. Phys. 21 (1953): 1087–1092
The concrete problem is the equation of state of a two-dimensional fluid of rigid spheres (hard disks): the pressure as a function of density. Computing it means averaging an observable over the Boltzmann distribution on a configuration space whose dimension grows with the number of particles — far too vast to integrate directly, and almost every randomly drawn configuration (overlapping disks) carries essentially no weight.
Importance sampling instead of brute force
Rather than draw configurations uniformly and weight each by its Boltzmann factor, the paper draws configurations with frequency already proportional to that factor. Then a thermodynamic ensemble average is just an ordinary arithmetic mean over the sampled configurations — the heavy weighting is built into which states get visited.
The move-and-accept rule
Such a sample is generated as a Markov chain. Displace one particle by a small random amount and look at the change in energy ΔE. If ΔE ≤ 0, accept the move. If ΔE > 0, accept it only with probability exp(−ΔE/kT); otherwise reject it and count the current configuration again. Iterated, this visits configurations with exactly the Boltzmann frequency, because the rule obeys detailed balance — and time averages along the chain converge to the ensemble average.
Run on the Los Alamos MANIAC for a few hundred disks, the method produced an equation of state that agreed with free-volume theory at high density and with a virial expansion at low density — a hard statistical-mechanics problem solved by sampling, with no closed form and no laboratory.
[ … ]
Metropolis · A. Rosenbluth · M. Rosenbluth · A. Teller · E. Teller · Los Alamos Scientific Laboratory · 1953