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

>The system only has 25^5 states

Not true. The problem is in one-to-one correspondence with the non-negative solutions to

a + b + c + d + e = 25

which is in one-to-one correspondence with the positive solutions to

a + b + c + d + e = 30

which is a simple counting problem---(29 choose 4) = 23751.

In my opinion, you should really try to prove your math to yourself before answering with such an authoritative tone.



I guess what sounds authoritative is that I'm using jargon while trying to explain the jargon at the same time, as if I knew what I was talking about. I've since edited my comment. I know it's stars and bars, but I keep messing up the count. Anyway, it's a finite amount, it's not huge, and your count is wrong too by a sister comment. :-)


I agree with your point. :-)

Why is my solution incorrect, though?

* Oh, I see why my solution is wrong. It's never the case that one person has all the money. I should take some of my own advice.


Counting is just very difficult. You can easily be off by orders of magnitude and not even recognize it.


One player can't get all the money as they have to hand out a dollar every turn and they can't receive all the money on the same turn.

23751 - 5 = 23746




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

Search: