#ThisWeeksFiddler, 20250228

This week the question is: How Many Rabbits Can You Pull out of a Hat?

I have a hat with six small toy rabbits: two are orange, two are green, and two purple. I shuffle the rabbits around and randomly draw them out one at a time without replacement (i.e., once I draw a rabbit out, I never put it back in again).

Your job is to guess the color of each rabbit I draw out. For each guess, you know the history of the rabbits I’ve already drawn. So if we’re down to the final rabbit in the hat, you should be able to predict its color with certainty.

Every time you correctly predict the color of the rabbit I draw, you earn a point. If you play optimally (i.e., to maximize how many points you get), how many points can you expect to earn on average?

And for extra credit:

Now, instead of two rabbits of each of the three colors, my hat contains 10. That is, it contains 10 orange rabbits, 10 green rabbits, and 10 purple rabbits. As before, every time you correctly predict the color of the rabbit I draw, you earn a point.

With optimal play, how many points can you expect to earn on average?

This was the 2nd attempt. Scroll down to find the weird 1st attempt.

Program. Figure 1, 2, 3.

And for extra credit:

1st attempt.

Program.

Skriv en kommentar