Here's another puzzle, kindly given to us by Adrian Torchiana, creator of the brilliant app Probability Maths Puzzles.

Post solutions below!

If you would like to be sent a list of our interviews and puzzles each week, sign up to Black Swans here.

3

Here's another puzzle, kindly given to us by Adrian Torchiana, creator of the brilliant app Probability Maths Puzzles.

Five foxes and seven hounds run into a foxhole. While they're inside, they get all jumbled up, so that all orderings are equally likely.
The foxes and the hounds run out of the hole in a neat line. On average, how many foxes are immediately followed by a hound?

Post solutions below!

If you would like to be sent a list of our interviews and puzzles each week, sign up to Black Swans here.

Puzzle

·
·
2 comments
1

Here's my pythonic way of doing it:

- Create a list of 5 foxes and 7 hounds (i.e.,
`[FFFFFHHHHHHH]`

) and randomly shuffle it. - For each letter in the shuffled list, check whether it is an
`F`

followed by an`H`

. If it is, add $1$ to a variable called`successes`

. - Repeat this process $1000$ times.
- Divide
`successes`

by $1000$ to get the average, which is approximately $2.91$ foxes are followed by a hound.

0

Nice answer simon!

jdry1729
·

1

This can be solved using linearity of expectations. If we label the foxes from $1$ to $5$ and let $x_i$ denote whether the $i\text{th}$ fox is followed by a hound or not, then the probability of any one fox being followed by a hound is $\mathbb{E}(x_1 + x_2 +...+x_5) = \sum_{i=1}^5 \mathbb{E}(x_i) = \sum_{i=1}^5 \mathbb{P}(x_i)$.

Since the probability of any individual fox being followed by a hound is the same, the above simplifies to $\sum_{i=1}^5 \mathbb{E}(x_i) = 5 \times \mathbb{E}(x_1)$, and since $\mathbb{E}(x_1) = \frac{7}{12}$, $\mathbb{E}(x_i) = \frac{35}{12} = 2.91$.

1

A note for people trying to understand the problem, the probability of 7/12 doesn't come from 'pick from 7 hounds out of 12 total animals'. That wouldn't make sense, since we've conditioned on a fox already in the lineup (only 11 animals left to pick from).

It's 7/12 because there are 11 out of 12 positions that a fox can be in that allow it to be followed by a hound. Given that position, 7/11 of the following animals can be a fox. That means: 11/12 x 7/11 = 7/12.

James
·