
11 minute read
Staff Says
Text: Ruben Hoeksma
A very mathematical card game: SET (and SUPERSET)
Advertisement
I am aware that this is one of the most corny phrases of the last year, but we live in strange times. Most of us long for social activities that do not involve a screen, but we settle for replica’s of those activities with a screen. Personally, I like to play board games and, while playing games over the table is almost always preferable to playing them behind a computer screen, you don’t get to play over the table with friends that do not live close to you. Here, I want to talk to you about the game SET and one of its variants, SUPERSET, which I got to play with some of my friends again during this period.
The game SET Some of you, or maybe even most of you, will know the card game SET. For those that do not, let me introduce you. SET is a game played with a special deck of cards. Each card has four attributes: the number, shading, color1 and type of the displayed shape(s). Each of these attributes can take three values (see Table 1), and each of the possible 34=81 combinations of these values is contained exactly once as a card in the deck (see Figure 12). A SET consists of three cards that, in each of the attributes, are all equal or all different. Thus, one solid blue squiggle, two solid blue squiggles and three solid blue squiggles form a SET, since all three cards are solid blue squiggles and each card has a different number of shapes (see Figure 3).

The game starts with twelve cards face-open in the middle of a table of (any number of) players. The players look for a SET within the twelve cards. If a player finds one, they shout “SET!” and point out the SET to the other players. If it is indeed a SET, the player receives the three cards and they are replaced by three fresh cards. If at any point the cards on the table do not contain a SET (or the players cannot find it) three more cards are added. When all cards have been turned open and no SET is left in the cards on the table, the game ends and the player with the most cards wins.
This game with very simple rules is a lot of fun, can be played with almost anyone and is very addictive. If you want to try it out right now,

As such you have a card three open blue diamonds, a card two striped purple squiggles and a card one solid orange oval (see Figure 2).
1. In the original game red, green and purple. 2. The SET symbols and cards are copyrights of the publisher, therefore I have used my self-created versions of them for the figures.


you can do this on the open source website https://setwithfriends.com/.
A variant of SET: SUPERSET When players get the hang of the game, they get faster in recognizing SETs, which can result in hectic game play (more so in real life than online). To slow things down again, you can make the game more difficult. The most straightforward way to do so is by adding attributes to the cards. However, this has the disadvantage that one has to create their own deck of 243 cards as well as come up with these other attribute (attributes like smell do not sound that appealing).
Alternatively, you can play the following, arguably more fun, variant that we call SUPERSET, but is known under other names as well (I have heard INTERSET and ULTRASET). A big advantage is that it is played with the original deck of cards. First, notice that for each pair of cards, there is a unique other card that completes the pair to a SET. Conversely, every card completes forty different pairs to a SET. Both these properties are easily proven when we have discussed the mathematics behind SET and I will leave it to you to find those proofs. Now, start with a number of cards open on the table. We suggest nine, but more on that later. Instead of looking for a SET, the players look for a SUPERSET, which contains four cards with the following property. The four cards can be split into two pairs such that each pair is completed to a SET with the same card (which does not need to be on the table). An example of a SUPERSET is given in Figure 4. For the experienced SET player, SUPERSET is definitely worthwhile to try and even for less experienced players it can be more enjoyable to play against an experienced SET player, since it levels the playing field a bit.
Mathematics surrounding SET Now, of course, as mathematicians many questions arise in your brains. “Is it possible for twelve cards to not contain a SET?”. “What is the maximum number of cards that may not contain a SET?”. “How likely is it to have a SET on the table?”. “Why do you call that a squiggle?”.
Somewhat surprisingly, the second question was answered even before the game SET was invented (1971 vs. 1974). The answer comes from the following connection with vector spaces. Consider the (finite) field F3 with three elements3. The vector space F3 4, consists of vectors (x1, x2, x3, x4), each consisting of four
3. F3 can be represented to have the element set {0, 1, 2}, with addition and multiplication under modulo 3 arithmetic.


coordinates with one of three possible values each. Through the natural bijection arising from mapping the four SET attributes to the four coordinates, we can map SET cards to F3 4 and visa versa. For example, the vector (1, 1, 0, 2) maps to “one solid orange oval”, the third card in Figure 2.
Given this representation of SETcards as vectors in F3 4, we can investigate how we recognize a SET. One way to do so, is by first considering a smaller set of cards. The set of all orange cards can be represented with vectors in F3 3, the set of all orange diamond cards as vectors in F3 2 and the set of all solid orange diamond cards as vectors in F3 1 (see Figure 5). A natural way to represent these vector spaces is by grids, F3 d is then represented by a 3d grid. We can represent a subset of cards with marks in the grid. As such we have represented SETs in F3 1, F3 2 and F3 3 in Figure 6. Of course, the only way to form a SET in F3 1 is to take all three cards and we gain little information from this. However, when we observe F3 2, we can see a pattern emerging.
Lemma 1. Three vectors x, y, z in
F3 d are a SET if and only if x+y+z=0.
The proof of Lemma 1 follows from the fact that 0+1+2≡0 mod3 and for all i in {0, 1, 2}, we have i+i+i=3i≡0 mod3. Another way of viewing a set is by realizing that they lie on a line. We say that they are collinear. You realize this when you see that the difference between any coordinate of two vectors is either 0, 1 or 2 (mod3), and for a SET, x, y, z in F3 d, those differences, x−y, y−z and z−x are all equal (see the orange lines in Figure 6b), since the values of the i-th coordinates of x, y and z are either all equal or one of 6 possibilities
Now, it is easy to check that indeed the differences are equal and, moreover, if the any coordinate does not satisfy Lemma 1, the vectors are not collinear. So, when we look for a SET in twelve cards, we look for three collinear points in a grid like Figure 7. However, we cannot just draw some lines into the grid of Figure 7. The grid should be viewed as a four dimensional one. Sadly, we lack four dimensional paper and even a computer drawing in four dimensions is not one of the options of our era or my drawing skills. Therefore we flatten our four dimensional grid into Figure 7.

If we let the cells of the grid in Figure 7 correspond one-to-one (by there relative ordering) to the cards in Figure 1, the set in Figure 7 consists of three blue striped ovals, one blue striped squiggle and two blue striped diamonds (see Figure 8).
The maximum number of cards without a SET Now, let us get back to one of the questions that we posed earlier: “What is the maximum number of cards that may not contain a SET?”. We can use our new-found correspondence to pose the same question more generally:“What is the maximum size of a set of points in F3 d that may not contain a line?”. We call such a set of points in F3 d a d-cap. Finding the maximum size 1-cap is a trivial exercise. It turns out that for 2 and 3-caps we can use the same technique to compute their maximum size. First consider the 2, 3 and 4-caps in Figure 9 and convince yourself that these in fact do not contain any line.
From the following theorem, I will provide only a proof for the 2-cap. However, the technique can be used to prove the maximum-size 3-cap as well (the proof for the maximum-size 4-cap needs a more involved argument).

Theorem 2. A maximum-size 2-cap has 4 elements, a maximumsize 3-cap has 9 elements, and a maximum-size 4-cap has 20 elements.
Proof. Figure 9a provides proof that a 2-cap of size 4 exists.
We prove that this is the maximum size of any 2-cap by contradiction. Assume that a 2-cap of size 5 exists. Let its elements be x1, . . . , x5. We can partition the three-by-three grid that represents F3 2 with three horizontal lines. Since a cap does not contain a line, at most two of the elements x1, . . . , x5 are contained in each of the three horizontal lines. This means that two lines contain two elements and one line contains a single element. W.l.o.g., let the single element be x1 and the line containing it be L. It is not hard to see, e.g., by enumeration, that each point in F3 2 is contained in exactly four lines. In the case of x1, let these lines be L, L1, L2 and L3. Since L contains only x1 and no other elements, the remaining elements of the 2-cap must be contained in the other three lines, L1, L2 and L3. Then, by the pigeon hole principle, one of L1, L2 and L3 must contain two of the other elements. But then there is a line that contains x1 and two other elements of the 2-cap and this contradicts that the 2-cap does not contain a line. Conclusion There is much more that can be said about the mathematics of SET. We have only scratched the surface. The maximum size of a 4-cap was first proven by Giuseppe Pellegrino in 1971. This was 3 years before SET was even invented. So even without the joy of playing the game, mathematicians were already proving the important theorems for it.
The maximum size of a 4-cap can be proven by counting the same thing in different ways and concluding that it does not exist [2]. In a paper by myself and my friends and coauthors [1], we have used similar techniques to prove the maximum size of supercaps. A supercap is, obviously, a set of cards that does not contain a SUPERSET. It turns out that the maximum size of a 4-supercap is 9. Which is why I would suggest nine to be the number of cards to start with when playing SUPERSET. You need the tension of the possibility that no SUPERSET is present. If this short introduction has spiked your interest, I definitely recommend the 2003 paper by Davis and Maclagan [2]. Most of what I told you here, is based on that article, but there is a lot more literature available (among which is the book “The Joy of SET” [3] not to be confused with “The Joy of Sets”, a book on set-theory). If you are interested in the mathematics of SUPERSET, a lot less literature is available that actually speaks of the game (again, there are mathematicians who study this without the joy of playing the game), so in this case you are condemned to read our paper [1].
Now that you have read me going on about the mathematics of the game, you should treat yourself and go play. That is truth-be-told, probably the best way to enjoy SET (or SUPERSET!). As the url says, get some friends to plays with you: https://setwithfriends.com/. Even SUPERSET is implemented, although they got the name wrong and call it ultraset. Perhaps, when

