Last weekend at the beach my nephew showed me an interesting situation he encountered while playing the card game SET. (Yes, this is the same nephew– who is brilliant, by the way– from last month’s puzzle.) The game is played with a deck of 81 cards, with each card showing 4 features, where each feature has 3 possible values:
- Shape (ovals, squiqqles, or diamonds)
- Number (1, 2, or 3)
- Color (red, purple, or green)
- Shading (solid, striped, or outlined)
The rules are simple. Deal 12 cards face-up on the table, and look for a Set of 3 cards that, for each feature, are either all the same or all different. The first player to identify a Set removes the 3 cards from the table, and 3 more are dealt. Once the entire deck is dealt, the player who collects the most Sets wins.
It is possible that 12 cards may not contain any Set, in which case 3 more cards are dealt… but those 15 cards may still not contain any Set, in which case 3 more cards are dealt, etc. The instructions included with the game suggest that “there are ~33:1 odds that a SET is present in 12 cards, and ~2500:1 odds when 15 cards are on the table.”
Despite these apparently long odds, my nephew’s family encountered such a collection of 15 cards that did not contain any Set:
(Edit: Thanks to readers Jafeth and Katja in the comments below, who point out that this collection of 15 cards actually does contain a Set… actually, it contains two of them!)
Are such Set-less collections really that rare? It turns out that they are not– not by a long shot– for several reasons. The least interesting reason is that the probabilities quoted in the instructions are simply not accurate. For example, the odds of a random collection of 12 cards not containing a Set are only about 30:1, not 33:1.
But the more interesting reasons are… well, as usual, I think this makes an excellent programming problem. Consider simulating this game, and estimating the probability that a collection of 15 cards does not contain a Set. (One of the many interesting challenges in this problem is concisely and efficiently implementing the condition of “being a Set” or not.) I think simulating the game like this exposes the “real” reasons that Set-less collections occur much more frequently than you might think.