← Complete problem index

PROJECT EULER · #0213

Flea Circus

Statement only · SolvedOriginal problem ↗

A 30×30 grid of squares contains 900 fleas, initially one flea per square.
When a bell is rung, each flea jumps to an adjacent square at random (usually 4 possibilities, except for fleas on the edge of the grid or at the corners).

What is the expected number of unoccupied squares after 50 rings of the bell? Give your answer rounded to six decimal places.

Write-up coming later

The complete problem is available here. An approach, code, and answer will be added later.