Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am interested how to calculate the number of arrangements of a given set of chess pieces on a given board that can be of a non-square rectangular shape too.

( I am not a native speaker so please correct me in case I used any word here incorrectly )

share|cite|improve this question
up vote 1 down vote accepted

Suppose you have an $m \times n$ rectangle, and piece types $t_1, \ldots t_N$, and quantities $q_1 \ldots q_N$ of each piece.

If $N=1$, then the answer is simply $\binom{mn}{q_1}$, and by "conditioning on where types $t_1, \ldots t_{N-1}$ went" we get the general answer is $$\prod_{i=1}^N \binom{ nm - \sum_{j < i} q_j}{q_i}$$

More directly (and independent of the choice of ordering!), this can be seen as $$\frac{(mn)(mn-1) \ldots (mn - {\sum_i q_i}+1)}{\prod_i q_i!}$$where we divide out by the product of the factorials to account for the fact that pieces of the same type are indistinguishable.

share|cite|improve this answer
yeah in fact including the empty spaces is much nicer: if you include that, the answer is just the multinomial coefficient $$\binom{ mn }{q_1, \ldots q_n,Q}$$where $Q$ is the number of empty spaces. – uncookedfalcon Jan 7 '13 at 6:38

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.