Drawing Blanks

Premature Optimization is a Prerequisite for Success

Guessing the cards: some answers

leave a comment »

https://bbzippo.wordpress.com/2011/03/17/guessing-the-color-of-the-card/

First of all, obviously, if you keep betting on red you will always guess exactly N/2 cards. But there are better strategies.

You can keep saying “red” and count cards. Once you know that reds are out, keep saying “black”. This strategy allows to guess about 26.9 cards out of 52 on average. (I calculated this analytically).

Or you can count cards and say “red” if there are more reds left and say “black” otherwise. With this strategy you will guess about 30 cards out of 52 on average. (I calculated this on a simulation).

Keep in mind, if you want to simulate card games, use a reliable shuffling algorithm.

Advertisements

Written by bbzippo

03/29/2011 at 3:08 am

Posted in Uncategorized

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: