# Two players playing the SET game

The SET game works with a deck of $81$ cards. Each card contains a set of symbols with four attributes: color (red, green, purple), shading (empty, striped, or solid), shape (oval, squiggle, or rhombus), number of symbols (one, two, or three). All the cards are unique. A SET occurs when three cards satisfy the following property for each of the four attributes: The attribute on each card is the same, or the attribute on each card is different.

Two players play a game with the 81 SET game deck. The game starts when first player selects 12 cards from the deck and puts them on the table. Then there are rounds where first player removes a SET (3 cards) from the table, and second player replaces the 3 cards by cards from the deck. First player wins, if after 27 rounds he ends up with 27 SETs. Second player wins, if in some round the 12 cards on the table contain no SET.

Who wins, first player or second player with the optimal strategy?

• Are the cards drawn at random or chosen? – Paul Evans Mar 13 '16 at 16:32
• Just wanted to pop in and mention that this is not how the game is usually played, but this is an interesting SET of house rules (hah, sorry). – feelinferrety Mar 15 '16 at 16:04

The winner is:

The second player

Using the following strategy:

Note that for any two cards, there is exactly one third card that turns them into a SET. Thus, each distinct pair of cards on the table makes one card unsafe to add without creating a new SET. That card might not be possible to add (already there, taken with previous SET) but that turns out not to matter.

No matter what twelve cards are originally selected, after taking a SET, there are nine cards left. The number of distinct pairs is 36, so there are at least 33 cards left in the deck that don't make any SETs with cards already on the table (take the deck of 81, subtract 9 on board, 3 taken, and at most 36 unsafe). Select one of these safe cards. There are then nine new pairs formed (and one card used) so at least 23 cards in the deck are still safe. Do this again forming ten new pairs and using a card, at least 12 cards are still safe to pick from. This means we can select three cards so as to be assured of adding no new SETs to the table after the first set is taken.

When the second SET is taken, do the exact same thing. The only difference is that there are three cards fewer in the deck, so only 9 are certain to be safe for the third card replacement. Note that since our last three cards added no new SETs, the second SET must have been entirely contained in the original twelve cards that the first player laid out.

Repeat again for the third and fourth SETs taken, with at least 6 and 3 cards safe for the last replacements respectively. Each time, we have enough freedom that we can ensure we add no new SETs - and that means that once all twelve original cards have been taken (after four SETs) we can arrange to have no SETs on the board. Thus, player two wins by the fifth round. They might even win earlier if the original twelve cards do not contain four distinct sets.

Since this strategy at no point cares what twelve cards started on the table or how the SETs were taken, it will beat any strategy from the first player.