Forgetful Burglar

A forgetful burglar wanders up and down one side of an infinitely long street to visit homes. He is so absorbed in his burgling that he forgets from which direction he entered a particular house and which houses on the street he has already entered. If he is so unfortunate as to re-enter a house, the already aroused occupants detain him to his permanent disadvantage.
Assume then that the burglar repeatedly takes, with equal probability, a step of length , , …, , , , , …, , or . If he visits a home again, his walking stops. The Demonstration shows sample paths of the forgetful burglar and relative frequencies of the length of his path over 1 million simulated paths, both for .


  • [Snapshot]
  • [Snapshot]
  • [Snapshot]
  • [Snapshot]


Snapshot 1: Most paths stop early. Here, , that is, the possible steps are , , , and . In this simulation, house 2 was visited at step 3 and also at step 6; thus the walk stops.
Snapshot 2: With a small probability, the walk can continue some time. In this case, house was visited at step 9 and also at step 11; thus the walk stops.
Snapshot 3: Here we see the relative frequencies of the length of the walk (they are based on one million simulations for each ). Two steps is the minimum. If the possible steps are , , , and , as in this snapshot, three steps is the most probable case and most walks do not continue more than, say, 10 steps, but one walk among the one million walks lasted 28 steps. The average is only 3.8 steps.
Snapshot 4: Here . Now the most probable length of the path is 5 and most walks do not continue more than, say, 20 steps, but one walk among the one million walks lasted 55 steps. The average is now about 8 steps.
This Demonstration is based on problem 9 in [2]. There, the case is considered. It is very difficult to calculate exact probabilities for the length of the walk. For , exact probabilities are derived in [1] for the cases that the walk continues 2, 3, 4, 5, 6, or 7 steps. With the recursive formulas derived in this article, more probabilities can easily be calculated with Mathematica; the relative frequencies based on our simulations agree very well with the exact probabilities.
The process considered in this Demonstration has the property that each newly visited location transforms into an absorbing location. Another example with absorbing states is the so-called gambler's ruin process (there we have two fixed absorbing states).
[1] C. Foster and A. Rapoport, "The Case of the Forgetful Burglar," The American Mathematical Monthly, 65(2), 1958 pp. 71–76.
[2] P. J. Nahin, Digital Dice: Computational Solutions to Practical Probability Problems, Princeton: Princeton University Press, 2008.
    • Share:

Embed Interactive Demonstration New!

Just copy and paste this snippet of JavaScript code into your website or blog to put the live Demonstration on your site. More details »

Files require Wolfram CDF Player or Mathematica.

Mathematica »
The #1 tool for creating Demonstrations
and anything technical.
Wolfram|Alpha »
Explore anything with the first
computational knowledge engine.
MathWorld »
The web's most extensive
mathematics resource.
Course Assistant Apps »
An app for every course—
right in the palm of your hand.
Wolfram Blog »
Read our views on math,
science, and technology.
Computable Document Format »
The format that makes Demonstrations
(and any information) easy to share and
interact with.
STEM Initiative »
Programs & resources for
educators, schools & students.
Computerbasedmath.org »
Join the initiative for modernizing
math education.
Step-by-Step Solutions »
Walk through homework problems one step at a time, with hints to help along the way.
Wolfram Problem Generator »
Unlimited random practice problems and answers with built-in step-by-step solutions. Practice online or make a printable study sheet.
Wolfram Language »
Knowledge-based programming for everyone.
Powered by Wolfram Mathematica © 2018 Wolfram Demonstrations Project & Contributors  |  Terms of Use  |  Privacy Policy  |  RSS Give us your feedback
Note: To run this Demonstration you need Mathematica 7+ or the free Mathematica Player 7EX
Download or upgrade to Mathematica Player 7EX
I already have Mathematica Player or Mathematica 7+