Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

That number seems wrong. The number of combinations should be 54 x 53 x 52 x 51 x 50 x 49. Which is 18.6 billion-ish.

What am I missing here?



You're overcounting by a factor of 6! = 720, because you're counting different orderings of the same numbers multiple times. "1,2,3,4,5,6" and "6,5,4,3,2,1" are not different tickets.


Mathematically, what you need is the binomial coefficient ("n choose k"): https://en.wikipedia.org/wiki/Binomial_coefficient


Shit, I see what you're getting at.

With 54 x 53 x 52 ... you get all of the permutations of all the sequences. It generates 1,2,3..., 2,1,3..., 3,1,2..., etc.

Yeah, I missed that. And each sequence has 6! permutations. Etc.


Divide by 6!=720 because the order doesn’t matter.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: