Version of April 30, 2002

**Enumerating the Possibilities.** It is often helpful to describe a
collection of cards by mentioning how many properties are broken, how many
are diverse, and how many are uniform. Indeed, an important feature of a
set is that the number of broken properties is zero.

We can write a sequence of letters, a *string*, to summarize the
configurations of the properties of a collection of at least two cards. In
a string, the letter B appears once for each broken property, D once for
each diverse property, and U once for each uniform one. For convenience,
we place the letters in alphabetical order.

One can determine from either its string or its disposition how many properties are in a configuration. The distinction between the two is the the string will not tell us which properties are in which configuration, and the disposition will.

For example, this first collection:

- red-oval-solid-three
- red-oval-shaded-two
- red-squiggle-hollow-two

- red-diamond-shaded-three
- green-oval-hollow-three
- purple-oval-shaded-three

We obtained these numbers by writing a simple computer program that generated all the combinations and categorized them.

**General Formulas.** If we limit ourselves to strings that contain
only D's and U's (in other words, combinations that qualify as sets), we
can easily write a comprehensive formula for the figures in the tables.
First we mention a few mathematical functions with which some readers may
not be familiar.

The *factorial* function of a positive integer n, written as n!,
is n multiplied by all the lesser positive integers. For instance, 5! = 5
x 4 x 3 x 2 x 1 = 120. Meanwhile, 1! = 1; and 0!, by special definition,
also equals one. The exclamation mark is a well-chosen indicator because
factorials can be very large; consider that 12! = 479,001,600.

C(m,p) denotes the number of *combinations* of m things taken p at
a time. For instance, from five objects, A, B, C, D and E, there are ten
ways to select two of them if the sequence of selection does not matter:
AB, AC, AD, AE, BC, BD, BE, CD, CE and DE. By formula, C(m,p) =
(m!) / ((m-p)! x p!).

Because superscripts do not always work in browsers, we write P(b,e) to denote b raised to the e power. To illustrate, P(5,3) = 5 x 5 x 5 = 125. We will assume that b is a positive integer, and e is a nonnegative integer.

Now we can get to the point. If within some string:

- B never appears
- U appears u times
- D appears d times, where d is at least one

- C(d+u,d) x P(3,u) x P(6,(d-1))

We require that d be greater than zero because if D never appears in a string, the string must then be all U's and all the cards be identical. This is impossible, hence the number of sets turns out to be zero, hence this formula does not work.

The general formula for combinations with broken properties turns out
to be much more complicated. If some three-card combination has two broken
properties A and B, they might be *in phase*:

- A1-B2-Cx-Dx
- A1-B2-Cx-Dx
- A3-B1-Cx-Dx

- A1-B2-Cx-Dx
- A3-B2-Cx-Dx
- A1-B1-Cx-Dx

With three broken properties, matters get worse. In this first
example, any two broken properties are in phase with each other; we call
this *uniform* phasing.

- A1-B2-C3-Dx
- A1-B2-C3-Dx
- A3-B1-C1-Dx

- A1-B2-C3-Dx
- A1-B3-C1-Dx
- A3-B2-C1-Dx

- A1-B2-C3-Dx
- A1-B3-C1-Dx
- A3-B2-C3-Dx

Paired properties generate phasing complications in much the same way as broken properties, so we have not attempted to produce formulas to yield the numbers in the tables.