Hide code cell content
import mmf_setup;mmf_setup.nbinit()
from pathlib import Path
import os
FIG_DIR = Path(mmf_setup.ROOT) / '../Docs/_build/figures/'
os.makedirs(FIG_DIR, exist_ok=True)
import logging;logging.getLogger('matplotlib').setLevel(logging.CRITICAL)
%matplotlib inline
import numpy as np, matplotlib.pyplot as plt

This cell adds /home/docs/checkouts/readthedocs.org/user_builds/physics-521-classical-mechanics-i/checkouts/latest/src to your path, and contains some definitions for equations and some CSS for styling the notebook. If things look a bit strange, please try the following:

  • Choose "Trust Notebook" from the "File" menu.
  • Re-execute this cell.
  • Reload the notebook.

Chapter 6#

Coins#

Suppose a player starts with initial capital \(K\). With each play, with probability \(p\), the player wins, increasing his capital to \(K+1\). If the player looses (with probability \(q=1-p\)), then his capital shrinks to \(K-1\). Play continues until either the player loses all his capital (\(K=0\)), called “ultimate ruin”, or the player wins all of the bank’s capital (\(K=B\)).

Schroeder introduces the “probability of ultimate ruin” \(q_{K}\) which is the probability that the player will eventually lose all of his money. Schroeder describes this by a difference equation

\[\begin{gather*} q_{K} = pq_{K+1} + qq_{K-1}, \qquad 0 < K < B,\\ q_0 = 1, \qquad q_B = 0, \end{gather*}\]

where \(B\) is the total capital in the game (i.e. the capital of the bank). The initial conditions are:

  • \(q_0 = 1\): the player has already lost since he starts with no capital \(K=0\) – certain ruin – and

  • \(q_B = 0\): the player has all the money and has won – no chance of ruin.

Claude Shannon’s Outguessing Machine#

https://github.com/AnandChowdhary/claude