Skip to content

Python simulations of probability riddles to help gain an intuitive understanding beyond the formulaic answer

Notifications You must be signed in to change notification settings

dannyrabiz/pyGrok

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

pyGrok

Python simulations of probability riddles to help gain an intuitive understanding beyond the formulaic answer

Riddle #1 - 100 prisoner problem

The director of a prison offers 100 death row prisoners, who are numbered from 1 to 100, a last chance. A room contains a cupboard with 100 drawers. The director randomly puts one prisoner's number in each closed drawer. The prisoners enter the room, one after another. Each prisoner may open and look into 50 drawers in any order. The drawers are closed again afterwards. If, during this search, every prisoner finds his number in one of the drawers, all prisoners are pardoned. If just one prisoner does not find his number, all prisoners die. Before the first prisoner enters the room, the prisoners may discuss strategy — but may not communicate once the first prisoner enters to look in the drawers. What is the prisoners' best strategy?

About

Python simulations of probability riddles to help gain an intuitive understanding beyond the formulaic answer

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published