10217

# Umbrella Quandary

A man walks between home and work. Initially, he has some umbrellas at home and at work. If he is about to walk from home to work or from work to home and it is raining, he picks up an umbrella if such is available; if an umbrella is not available, he gets wet. To his disadvantage, the man does not take an umbrella if it is not raining; thus, it is likely that, sooner or later, all umbrellas will be at one of the locations, and so the man has a risk of getting wet. It is assumed that every time the man is about to walk, it is raining with a given probability, independently of history.
This Demonstration shows sample paths of the number of umbrellas at home and work. The red and blue points on the paths show which location the man currently is leaving; the paths start at home. The black points at the bottom show if it is raining. The man gets wet if it is raining and he has no umbrellas at his current location. The Demonstration also shows the average number of walks until the man first gets wet.

### DETAILS

Snapshot 1: Let us briefly explain the first few steps in this small sample path. Initially, the man has one umbrella at home and one umbrella at work. The process starts at home (the first red point at level 1). When the man is about to walk from home to work, it is not raining and so he does not take an umbrella with him. When he is about to go back to home, it also does not rain. The next day, when he is leaving home it is raining, and so he takes an umbrella with him; the number of umbrellas at home thus decreases to zero and the number of umbrellas at work increases to two. When he is about to go home, it rains again. The third day, when he is about to go home, it rains. The fourth day, when he is about to go home, it is raining but he does not have any umbrellas at work; thus he gets wet.
Snapshot 2: If the probability of rain is small, the numbers of umbrellas at home and work remain constant for relatively long time intervals, because the man most of the time does not need to take an umbrella with him.
Snapshot 3: If the probability of rain is large, the numbers of umbrellas at home and work change very often, because the man, in most cases, takes an umbrella with him.
Snapshot 4: The average number of walks before getting wet is plotted when the probability of rain varies from 0.01 to 0.99 (in steps of 0.01; 20000 simulations were done for each value of the probability). The average is, of course, infinite when the probability of rain is zero, and it is also infinite when the probability of rain is 1 (because the man always carries an umbrella with him). The average number of walks before getting wet is smallest when the probability of rain is not small or large. For example, when the man initially has one umbrella at home and at work and the probability of rain is somewhere between 0.5 to 0.7, he gets wet, on the average, in about 12 walks.
The Demonstration is based on problem 10 in [1].
Reference
[1] P. J. Nahin, Digital Dice: Computational Solutions to Practical Probability Problems, Princeton: Princeton University Press, 2008.

### PERMANENT CITATION

 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 » Download Demonstration as CDF » Download Author Code »(preview ») Files require Wolfram CDF Player or Mathematica.

#### Related Topics

 RELATED RESOURCES
 The #1 tool for creating Demonstrations and anything technical. Explore anything with the first computational knowledge engine. The web's most extensive mathematics resource. An app for every course—right in the palm of your hand. Read our views on math,science, and technology. The format that makes Demonstrations (and any information) easy to share and interact with. Programs & resources for educators, schools & students. Join the initiative for modernizing math education. Walk through homework problems one step at a time, with hints to help along the way. Unlimited random practice problems and answers with built-in Step-by-step solutions. Practice online or make a printable study sheet. Knowledge-based programming for everyone.