# How many possible Scrabble racks are there at the beginning of the game?

In the American version of Scrabble version there are how many possible starting racks.

A rack contains exactly 7 letters (blanks count as a letter for this problem). Most of the letters in scrabble are constrained meaning that a rack can contain:

At most 2 of B, C, M, P, F, H, V, W, Y, or blanks

At most 1 of K, J, X, Q, Z,

AT most 3 G, 4 D, 4 U, 4 S, 4 L 6 T, 6 R, 6 N, 7 A, 7 I, 7 E, 7 O, 7 U

I guess this would be the number of positive integer solutions for the equation .................................. a +b +c +d + ... +x +y +z +blanks = 7.

Where a is greater than or equal to 0 and less than or equal to 7, b is greater than or equal to zero and less than or equal to 3 ....

-
You mention the letter U twice. There are 4 Us (and not 7). – Peter Phipps Nov 24 '12 at 14:35

Edited to use the correct letter distributions, as pointed out by Peter.

There are:

• 4 letters with 7 tiles;
• 3 letters with 6 tiles;
• 4 letters with 4 tiles;
• 1 letter with three tiles;
• 10 letters with 2 tiles; and
• 5 letters with 1 tile.

So the answer is the coefficient of $x^7$ in:

$(x^7+x^6+x^5+x^4+x^3+x^2+x+1)^4 \times (x^6+x^5+x^4+x^3+x^2+x+1)^3 \times$
$(x^4+x^3+x^2+x+1)^4 \times (x^3+x^2+x+1) \times (x^2+x+1)^{10} \times (x+1)^5$

According to Wolfram Alpha, this is 3199724.

-
See my comment above. – Peter Phipps Nov 24 '12 at 14:36
@Peter: Thanks! Corrected now. – TonyK Nov 24 '12 at 15:05

Let $T(n)$ be the number of occurrences of the $n$th tile type and $C(n,m)$ be the number of racks that contain exactly $m$ tiles chosen among the first $n$ tile types in the alphabet. $C(26,7)$ is the number of 7-tile scrabble racks. We can compute $C(n,m)$ using dynamic programming:

$C(1,i) = 1$ for $i=0\dots T(1)$, otherwise $0$

For $i\geq 2$:

$C(i,j) = \sum_{k=0}^{\min(T(i),j)} C(i-1,j-k)$

-