Live data from Hacker News

Ask HN: A random maths problem we started discussing at work

news.ycombinator.com

1–10 of 16 posts

Re: Ask HN: A random maths problem we started discussing at work

#3
I have no answer for you. I mean... the solution seems to be 2121 or 2122 (no, it isn't, see below) determined by brute force, but I don't know why.

But, it's worth noting that if this interests you, Project Euler almost certainly will as well and is worth checking it out if you don't already know about it:

http://projecteuler.net/

EDIT: So if you're wondering why I got a different brute force result from other users, it's because I had a stupid bug. I was looking at the ratio of meeting the criteria to the ratio of not meeting it, not the ratio of meeting it to total.

Re: Ask HN: A random maths problem we started discussing at work

#6

Here's a link to the wikipedia entry on the birthday problem. http://en.wikipedia.org/wiki/Birthday_problem

This isn't the birthday problem. OP is asking how many people to hit every possible birthday at least once. I thought Wikipedia might cover this on their birthday problem page, but they don't.

Re: Ask HN: A random maths problem we started discussing at work

#7

This solves the problem for you. http://en.wikipedia.org/wiki/Birthday_problem 23 people is a 50% chance, 57 is a 99% chance, 367 is 100% chance (including leap years).

His question isn't related to the 'Birthday Problem'. Read the whole post...

Re: Ask HN: A random maths problem we started discussing at work

#10
post #8

This is the coupon collector's problem. http://en.wikipedia.org/wiki/Coupon_collector%27s_problem The formula in the article (1/2 + n*gamma + n log n) gives 2365 for the expected number, but this is different than "at least 50% chance".

Well... you made my day complete. My brute force approach got me 2364.646, glad to know my math intuition isn't entirely broken.

Thanks for the link!

Post reply on HN