View Single Post
  #14  
Old 10-27-2005, 01:09 PM
EverettKings EverettKings is offline
Member
 
Join Date: Jun 2004
Location: Williamsburg, VA
Posts: 86
Default Re: Riddle -- Probability of Expectation

Check if this works....

There are (36 choose 4) ways to pick 4 letters in a line. The chance that a given set of 4 letters is some scrambled form of "hues" is (4*3*2*1)/(26^4). Same for "hews" so the chance that a given set of 4 letters matches either is 2*(4*3*2*1)/(26^4) (let's call this number P for simplicity). So the chance that a given set doesn't match either is 1-P. The chance that a line contains no instances of these words is (1-P)^(36 choose 4). (This is based on the assumption that knowing that one 4 letter combination does not contain "hues" or "hews" does not affect the chances of another combination containing them).

The chance that a line DOES contain at least one instance is:
(1 - (1-P)^(36 choose 4)).
So the chance that 14 lines contain one of the words is:
(1 - (1-P)^(36 choose 4))^14.
The chance that a monkey sonnet fails at least one line is therefore:
1 - (1 - (1-P)^(36 choose 4))^14
And the chance that one in 154 monkeys succeeds is:
1 - (1 - (1 - (1-P)^(36 choose 4))^14)^154)
Note that the bold section here is (hopefully) equal to the P that BruceZ used, if that makes the formula easier to read.

Theres a nonzero chance that some of my work is flawed but I *think* this works.

Everett
Reply With Quote