# Monte Carlo Simulation of Markov Prisoner

Requires a Wolfram Notebook System

Interact on desktop, mobile and cloud with the free Wolfram Player or other Wolfram Language products.

This Demonstration is based on a homework problem that has been in numerous editions of [1] and [2]: A prisoner is in a dungeon with three doors. One door leads to freedom, one door leads to a long tunnel, and a third door leads to a short tunnel. The two tunnels return the prisoner to the dungeon. If the prisoner returns to the dungeon, he attempts to gain his freedom again, but his past experiences do not help him in selecting the door that leads to freedom, that is, we assume a Markov prisoner. The prisoner’s probability of selecting the doors are: 20% to freedom, 50% to the short tunnel, and 30% to the long tunnel. Assuming the travel times through the long and short tunnels are 3 and 2 hours, respectively, our goal is to determine the expected number of hours until the thief selects the door which leads to freedom.

[more]
Contributed by: Paul Savory (University of Nebraska-Lincoln) (March 2011)

Open content licensed under CC BY-NC-SA

## Snapshots

## Details

Which book?

[1] S. Ross, *Introduction to Probability Models*, ed., Burlington, MA: Academic Press, 2007.

[2] S. Ross, *A First Course in Probability*, Englewood Cliffs, NJ: Prentice Hall, 2010.

## Permanent Citation

"Monte Carlo Simulation of Markov Prisoner"

http://demonstrations.wolfram.com/MonteCarloSimulationOfMarkovPrisoner/

Wolfram Demonstrations Project

Published: March 7 2011