TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: The Case of the Mixed-Up Hats

1 pointsby Errorcod3almost 10 years ago
There&#x27;s a baseball team that consists of 20 kids. At the end of the season, they all go to the coach&#x27;s house to have a barbecue. The coach says, &quot;You can&#x27;t wear your hats at the barbecue.&quot; So, all the kids take their hats and throw them in a big pile. They fill their little faces with hot dogs and corn on the cob. At the conclusion of the evening, they all reach in at random, grab a hat and put it on their heads.<p>What&#x27;s the probability that 19 out of 20 of these kids get their correct hat?

2 comments

tlbalmost 10 years ago
Zero, there&#x27;s no permutation where only one kid has the wrong hat.
loganualmost 10 years ago
If 19 get their hat, won&#x27;t the 20th also? There won&#x27;t be another hat to get mixed up with... So... 1&#x2F;(20!) ? It&#x27;s been awhile since I&#x27;ve mathed. Could be way off. Is this your homework?