You are previewing Digital Dice.
O'Reilly logo
Digital Dice

Book Description

Some probability problems are so difficult that they stump the smartest mathematicians. But even the hardest of these problems can often be solved with a computer and a Monte Carlo simulation, in which a random-number generator simulates a physical process, such as a million rolls of a pair of dice. This is what Digital Dice is all about: how to get numerical answers to difficult probability problems without having to solve complicated mathematical equations.

Popular-math writer Paul Nahin challenges readers to solve twenty-one difficult but fun problems, from determining the odds of coin-flipping games to figuring out the behavior of elevators. Problems build from relatively easy (deciding whether a dishwasher who breaks most of the dishes at a restaurant during a given week is clumsy or just the victim of randomness) to the very difficult (tackling branching processes of the kind that had to be solved by Manhattan Project mathematician Stanislaw Ulam). In his characteristic style, Nahin brings the problems to life with interesting and odd historical anecdotes. Readers learn, for example, not just how to determine the optimal stopping point in any selection process but that astronomer Johannes Kepler selected his second wife by interviewing eleven women.

The book shows readers how to write elementary computer codes using any common programming language, and provides solutions and line-by-line walk-throughs of a MATLAB code for each problem.

Digital Dice will appeal to anyone who enjoys popular math or computer science.

Table of Contents

  1. Cover
  2. Title
  3. Copyright
  4. Contents
  5. Introduction
  6. The Problems
    1. 1. The Clumsy Dishwasher Problem
    2. 2. Will Lil and Bill Meet at the Malt Shop
    3. 3. A Parallel Parking Question
    4. 4. A Curious Coin-Flipping Game
    5. 5. The Gamow-Stern Elevator Puzzle
    6. 6. Steve’s Elevator Problem
    7. 7. The Pipe Smoker’s Discovery
    8. 8. A Toilet Paper Dilemma
    9. 9. The Forgetful Burglar Problem
    10. 10. The Umbrella Quandary
    11. 11. The Case of the Missing Senators
    12. 12. How Many Runners in a Marathon?
    13. 13. A Police Patrol Problem
    14. 14. Parrondo’s Paradox
    15. 15. How Long Is the Wait to Get the Potato Salad?
    16. 16. The Appeals Court Paradox
    17. 17. Waiting for Buses
    18. 18. Waiting for Stoplights
    19. 19. Electing Emperors and Popes
    20. 20. An Optimal Stopping Problem
    21. 21. Chain Reactions, Branching Processes, and Baby Boys
  7. Matlab Solutions To The Problems
    1. 1. The Clumsy Dishwasher Problem
    2. 2. Will Lil and Bill Meet at the Malt Shop?
    3. 3. A Parallel Parking Question
    4. 4. A Curious Coin-Flipping Game
    5. 5. The Gamow-Stern Elevator Puzzle
    6. 6. Steve’s Elevator Problem
    7. 7. The Pipe Smoker’s Discovery
    8. 8. A Toilet Paper Dilemma
    9. 9. The Forgetful Burglar Problem
    10. 10. The Umbrella Quandary
    11. 11. The Case of the Missing Senators
    12. 12. How Many Runners in a Marathon?
    13. 13. A Police Patrol Problem
    14. 14. Parrondo’s Paradox
    15. 15. How Long is the Wait to Get the Potato Salad?
    16. 16. The Appeals Court Paradox
    17. 17. Waiting for Buses
    18. 18. Waiting for Stoplights
    19. 19. Electing Emperors and Popes
    20. 20. An Optimal Stopping Problem
    21. 21. Chain Reactions, Branching Processes, and Baby Boys
  8. Appendix 1. One Way to Guess on a Test
  9. Appendix 2. An Example of Variance-Reduction in the Monte Carlo Method
  10. Appendix 3. Random Harmonic Sums
  11. Appendix 4. Solving Montmort’s Problem by Recursion
  12. Appendix 5. An Illustration of the Inclusion-Exclusion Principle
  13. Appendix 6. Solutions to the Spin Game
  14. Appendix 7. How to Simulate Kelvin’s Fair Coin with a Biased Coin
  15. Appendix 8. How to Simulate an Exponential Random Variable
  16. Appendix 9. Index to Author-Created MATLAB m-Files in the Book
  17. Glossary
  18. Acknowledgments
  19. Index