Beyond the syllabus · Monte Carlo methods

A crowd of random walkers

Each walker takes a step north, south, east or west at random, again and again. No one of them gets anywhere in particular, yet the crowd spreads in a perfectly regular way: its width grows as the square root of the number of steps. This is diffusion.

or open it full screen → Free, in your browser, nothing to install. Topic: random walks and diffusion.

The textbook's answers

At the starting settings. As it runs, the simulation measures each of these and shows its value beside the textbook's.

Root mean square distance at the end, √N (steps)30
How far the middle of the crowd has moved (steps)0
Distance if every step were the same way (steps)900

What you can change

Every slider changes the physics, not just the picture: the engine works it all out again.

SettingRangeStarts at
Number of walkers100 to 5,0002,000
Steps each takes100 to 2,500900

More in Monte Carlo methods