Solution

(related to Problem: The Wrong Hats)

The number of different ways in which eight persons, with eight hats, can each take the wrong hat, is $14,833.$

Here are the successive solutions for any number of persons from one to eight:— $1 = 0$ $2 = 1$ $3 = 2$ $4 = 9$ $5 = 44$ $6 = 265$ $7 = 1,854$ $8 = 14,833$

To get these numbers, multiply successively by $2,$ $3,$ $4,$ $5,$ etc. When the multiplier is even, add $1;$ when odd, deduct $1.$ Thus, $3 \times 1- 1 = 2,$ $4 \times 2 + 1 = 9;$ $5 \times 9- 1 = 44;$ and so on. Or you can multiply the sum of the number of ways for $n-1$ and $n-2$ persons by $n-1,$ and so get the solution for $n$ persons. Thus, $4(2 + 9) = 44;$ $5(9 + 44) = 265;$ and so on.


Thank you to the contributors under CC BY-SA 4.0!

Github:
bookofproofs
non-Github:
@H-Dudeney


References

Project Gutenberg

  1. Dudeney, H. E.: "Amusements in Mathematics", The Authors' Club, 1917

This eBook is for the use of anyone anywhere in the United States and most other parts of the world at no cost and with almost no restrictions whatsoever. You may copy it, give it away or re-use it under the terms of the Project Gutenberg License included with this edition or online at http://www.gutenberg.org. If you are not located in the United States, you'll have to check the laws of the country where you are located before using this ebook.