It took Scheherazade quite a bit of time to get the king to accept the correct answer to the last problem, but she finally succeeded."I have thought of a related problem," said Scheherazade. "Suppose we have now ten chests instead of three, and each chest has three drawers. Each of the thirty drawers contains either a diamond, an emerald, or a ruby. They are dispersed in the following manner:[Of course, D stands for diamond; E for emerald; and R for ruby. So for example, Chest 4 contains one diamond and two emeralds; Chest 7 contains two emeralds and one ruby. There are ten jewels of each of the three types, and they are distributed in all ten possible ways.]
- D D D
- D D E
- D D R
- D E E
- D E R
- D R R
- E E R
- E R R
- E E E
- R R R
"You open one of the thirty drawers at random and find a diamond. Then you open another drawer of the same chest. What is the probability that it also contains a diamond?"
I will use the power of simulation to attain a nearly perfect answer, like so:
The most recent run outputting 0.5020185586888407 was extremely close to the analytical solution given by the author of ½. Monte Carlo simulations are really something else.
No comments:
Post a Comment