# 無限猴子定理

## 证明

### 直接证明

(1/50) × (1/50) × (1/50) × (1/50) × (1/50) × (1/50) = (1/50)6,

$X_n=\left(1-\frac{1}{50^6}\right)^n\,$

### 无限长的字符串

• 给定一个无限长的字符串，其中的每一个字符都是随机产生的，那么任意有限的字符串都会作为一个子字符串出现在其中（事实上要出现无限多次）。
• 给定一个序列，其中有无限多个无限长的字符串，其中每一个字符串中的每一个字符都是随机产生的，那么任意有限的字符串都会出现在其中某些字符串的开头（事实上是无限多个字符串的开头）.

$\sum_{i=1}^\infty P(E_k) = \sum_{i=1}^\infty p = \infty,$

## 注釋

1. ^ This shows that the probability of typing "banana" in one of the predefined non-overlapping blocks of six letters tends to 1. In addition the word may appear across two blocks, so the estimate given is conservative.
2. ^ Isaac, Richard E. The Pleasures of Probability. Springer. 1995: 48–50. ISBN 038794415X. Isaac generalizes this argument immediately to variable text and alphabet size; the common main conclusion is on p.50.
3. ^ The first theorem is proven by a similar if more indirect route in Gut, Allan. Probability: A Graduate Course. Springer. 2005: 97–100. ISBN 0387228330.
4. ^ Using the Hamlet text from gutenberg, there are 132680 alphabetical letters and 199749 characters overall
5. ^ For any required string of 130,000 letters from the set a-z, the average number of letters that needs to be typed until the string appears is (rounded) 3.4 × 10183,946, except in the case that all letters of the required string are equal, in which case the value is about 4% more, 3.6 × 10183,946. In that case failure to have the correct string starting from a particular position reduces with about 4% the probability of a correct string starting from the next position (i.e., for overlapping positions the events of having the correct string are not independent; in this case there is a positive correlation between the two successes, so the chance of success after a failure is smaller than the chance of success in general). The figure 3.4 × 10183,946 is derived from n = 26130000 by taking the logarithm of both sides: log10(n) = 1300000×log10(26) = 183946.5352, therefore n = 100.5352 × 10183946 = 3.429 × 10183946.
6. ^ 26 letters ×2 for capitalisation, 12 for punctuation characters = 64, 199749×log10(64) = 4.4 × 10360,783.
7. ^ Charles Kittel and Herbert Kroemer. Thermal Physics (2nd ed.). W. H. Freeman Company. 1980: 53. ISBN 0-7167-1088-9.