# Math in Chess: Origin of the Name "Chess 960"

Anyone who has played, or at least heard of, Chess 960 (aka Fischer Random) has probably wondered where the 960 comes from. The 960 actually refers to the number of possible starting positions that one can have in Chess 960 (one of which is the same starting position in standard chess). In this blog, I will give a detailed mathematical proof that there are 960 unique starting positions in Chess 960. I will try to make this very easy for all people to understand.

First, a little mathematical background knowledge is required. One who is familiar with all of these mathematical concepts and does not want to be bothered by reading this math stuff again should skip to the last proof in this blog. Let n be a **whole number** (a nonnegative integer such as 0, 1, 2, 3, ...). Then **n!**, called "n factorial", is defined by

n!=n*(n-1)*(n-2)*...*1.

So, for example, 5!=5*4*3*2*1=120 and 4!=4*3*2*1=24. Note that for any **natural number** n (a whole number that is nonzero):

n!=n*(n-1)*(n-2)*...*1=n*[(n-1)(n-2)*...*1]=n*(n-1)!

This leads us to our next claim. Since 1!=1 trivially, but 0! cannot be calculated directly from the definition, we now claim that 0!=1 using the fact that 1!=1 and 1!=1*0!.

**Proof:** 1!=1 and 1!=1*0!=0!since any number that is multiplied by 1 does not change. Substituting1!=0! into the first equation for 1! yields

0!=1 Q.E.D.

So the factorial is defined for all whole numbers n. However, it is not defined for negative integers. One quick justification of this: 0!=1 and 0!=0*(-1)!, which implies that 1=0*(-1)!=0, which is absurd. So we cannot define the factorial for -1 or any other negative integer.

Now that we have some knowledge about factorials, can use start to discuss permutations and combinations. First, let's say that there is a set of n distinct objects, and we wish to pick r objects from this set in a specific order, where 0<=r<=n. Then we have n choices for the first object, n-1 choices for the second object, n-2 choices for the third object, ..., and n-(r-1)=n-r+1 choices for the rth object. The total number of possibilities is

nPr=n*(n-1)*(n-2)*...*(n-r+1)

=[n*(n-1)*(n-2)*...*(n-r+1)*(n-r)*(n-r-1)*...*1]/[(n-r)*(n-r-1)*...*1]

=n!/(n-r)!

Note that when r=0, nPr=n!/(n-r)!=n!/(n-0)!=n!/n!=1

and when r=n, nPr=n!/(n-r)!=n!/(n-n)!=n!/0!=n!/1=n!.

The number **nPr** is called a **falling factorial**, and it refers to the total number of **permutations of n objects taken r at a time**. What the two above results mean is that there is exactly one way to choose 0 objects from a set of n objects, and that there are n! ways to choose all n objects from a set of n objects if order matters. Speaking about order, we shall now discuss the number of ways to order r distinct objects. If we have r distinct objects that we wish to arrange in order, then we have r choices for the first placement, r-1 choices for the second, r-2 choices for the third, ..., and 1 choice for the rth placement. So the total number of ways to arrange r distinct objects is

r*(r-1)*(r-2)*...*1=r!

Now that we know how to count the number of ways to pick r objects from a set of n distinct objects where order matters, we discuss the number of ways to pick r objects from a set of n distinct objects where order does not matter. Let C denote this number. Then the number of ways to pick r objects from a set of n distinct objects where order matters (nPr) should be equal to the number of ways to pick r objects from a set of n distinct objects where order does not matter (C) multiplied by the number of ways to arrange the r objects (r!). So we have

nPr=C*r!

C=nPr/r!=[ n!/(n-r)!]/r!=n!/[(n-r)!r!]

This number C we will now refer to as **nCr**, called "n choose r". It refers to the total number of **combinations of n objects taken r at a time**. For this reason, nCr is sometimes called a **combination number**, but its more common name is a **binomial coefficient**, as it plays a central role in the Binomial Theorem. The Binomial Theorem is outside the scope of this blog, but one can read more about it here.

When r=0, we have nCr= n!/[(n-r)!r!]=n!/[(n-0)!0!]

=n!/[n!*1]=n!/n!=1

When r=n, nCr= n!/[(n-r)!r!]=n!/[(n-n)!n!]

=n!/[0!*n!]=n!/[1*n!]=n!/n!=1

In fact, nCr=nC(n-r)

**Proof:**nCr=n!/[(n-r)!r!]= n!/[(n-r)!(n-n+r)!]

=n!/[(n-r)!(n-(n-r))!]= n!/[ (n-(n-r))! (n-r)!]

=nC(n-r) Q.E.D.

Okay, enough of these mathematical formulas. We are ready to prove what we wanted to!

There are exactly 960 unique starting positions in Chess 960.

**Proof:** First, place all eight white pawns on all eight of the second rank squares and all Black pawns on all eight of the seventh rank squares. Every game of Standard Chess and Chess 960 starts like this. All eight White pawns are identical, as they are indistinguishable during play. So, the number of ways to set up the White pawns is 8C8=1. Similarly, all eight Black pawns are also considered identical since they are indistinguishable during play. So, the number of ways to set up the Black pawns is also 8C8=1.

First we set up White's pieces, since then there is exactly one way to set up Black's pieces as both players must start the game with a completely symmetrical position. Now, when placing the pieces, we consider the bishops' placements first, as it is very strict. Each player must have one dark-squared bishop and one light-squared bishop. So, of the eight squares on one's back rank, there are four possible squares for the dark-squared bishop, and the remaining four squares are possible candidates for the light-squared bishop.

Now place the queen on one of the remaining six back rank squares.

Then there are five remaining squares available to the two knights. Note that the order in which we place the two knights does not matter, since during game play the two knights are indistinguishable. It does not matter if we put "knight 1" on "square 1" and "knight 2" on "square 2", or if we put "knight 1" on "square 2" and "knight 2" on "square 1". In both cases, we would get the same position. So the number of ways to place the two knights on the remaining five squares is

5C2=5!/[(5-2)!2!]=5!/(3!2!)=(5*4*3*2*1)/(3*2*1*2*1)=(5*4)/(2*1)=20/2=10

We are almost done setting up White! Now we must find the number of ways to place the king and two rooks. In Chess 960, the king must always start the game between the two rooks, otherwise it would be impossible to castle on one side of the board. So the rooks must be on the outermost remaining squares, and by process of elimination the king must be on the middlemost remaining square.

That leaves two squares for the rooks. Just like the knights, the rooks are indistinguishable during play, so the order in which we place them does not matter. If we place "rook 1" on "square 1" and "rook 2" on "square 2", we get the same position as if we place "rook 1" on "square 2" and "rook 2" on "square 1". Or, in terms of mathematical formulas, 2C2=1.

Now we have placed all of White's pieces, and we can count the number of arrangements possible. Recall that there were four squares for the dark-squared bishop, four squares for the light-squared bishop, six squares for the queen, ten square arrangements for the knights, one square for the king, and one square arrangement for the rooks. So the total number of arrangements is

4*4*6*10*1*1=16*6*10*1*1=96*10*1*1=960*1*1=960*1=960

Since the starting position of every Standard Chess and Chess 960 game is symmetrical, Black should have the same arrangement of pieces.

So there are exactly 960 starting positions possible in Chess 960. Q.E.D.