Hacker News new | ask | show | jobs
by nramanand 1353 days ago
Not sure I followed what you meant by >= $26 in 2a. The max profit one can make is $26, by drawing 26 red cards in a row, never more.

You are correct though that you'd never want to stop on a negative number, as you always can execute 3b

2 comments

Looking back, I think I got my numbers mixed up (thanks, beer!). $12 or $13 is probably the number I'm looking for, not $26.

Anyway, my logic is if I am at or higher than the median after I have drawn half the deck, then that means there are more black cards than reds in the remaining deck and I have a greater chance each draw of losing a buck than gaining.

So it is in my best interest to pull out at that point, than to try my luck against ever worsening odds.

For the same reason, you’d never intentionally stop at $0 (unless the deck is exhausted). You can always get back to $0 by drawing the rest of the deck, and there’s a 50% chance of going up a dollar on the next card.
If your sum is currently positive, then the chance of going up a dollar is below 50%.