Possible arrangements of points in cartesian plane considering symmetry

I am puzzled by this problem that popped up in my head. The temperature is just a way to render intuitively the concept of equivalent configuration. Actually it arose exactly from the question:

In how many different ways can I arrange $k$ particles into an $n\times n$ grid to obtain the same temperature at the center?

To give an example, let $n =2$, $k = 2$. Then we basically have $2$ arrangements, since $$\begin{bmatrix}\cdot&\cdot\\A&B\end{bmatrix}$$ $$\begin{bmatrix}\cdot &A\\ B &\cdot\end{bmatrix}$$ Are all the possible ways in which I can measure different temperatures at the centre.

Here, by symmetry I mean that each configuration can be looked at from all the 4 sides of the square, thus making each configuration basically count as 4 configs. One could also consider that there might be cases in which different arrangements yield the same temperature at the center, but I would be satisfied with an easy case solution.

My reasoning: If we had an $n^2$ long line, the solution would be $n^2\choose k$. In some way, grid of points can be seen as an ordered list of positions so I would guess that the solution is still the same without considering symmetry. Taking into account symmetry, again, my guess is that each counts as 4, as we can flip the grid 4 times, so I would decrease the solution by a factor of four.

However, thinking about a simple setting in which we have 4 slots in a 2x2 grid and 2 balls, the formula does not return an integer as $$\dfrac{n^2\choose k}{4} = \dfrac{6}{4} \notin \mathbb{N}$$ Again, this is just a big guess as I do not know how to tackle the problem formally. Maybe someone can point me out to an elegant solution for an $\mathbb{R}^d$ space.

What am I missing?


You need to use Burnside's lemma. There are four rotational symmetries of the square: rotations by $0^\circ$, $90^\circ$, $180^\circ$, and $270^\circ$. Burnside's lemma says that the number of arrangements, up to rotation, is the average number of placements which are unaffected by these rotations.

When $n$ is even

  • All $\binom{n^2}{k}$ placements are fixed by $0^\circ$ rotaiton.

  • A placement fixed by $180^\circ$ rotation is uniquely determine by putting $k/2$ squares in the top half of the grid, and then the remaining $k/2$ symmetrically in the bottom half. This is only possible when $n$ is even, in which case the number of placements is $\binom{n^2/2}{k/2}$. If $k$ is odd, the number is zero.

  • Similarly, the number of placements fixed by $90^\circ$ and $270^\circ$ rotation is $\binom{n^2/4}{k/4}$ when $k$ is a multiple of $4$, and zero otherwise.

Applying Burnside's lemma, we take the average of these four numbers to get the final answer: $$ n\text{ is even }\implies \text{# grids up to rotation}= \frac14\left[\binom{n^2}{k}+\binom{n^2/2}{k/2}^*+2\cdot \binom{n^2/4}{k/4}^*\right] $$ The asterisks in $\binom{n^2/2}{k/2}^*$ and $\binom{n^2/4}{k/4}^*$ mean that the binomial coefficient should be interpreted as zero when the lower index is not an integer. (Note: This is similar to your initial guess of $\frac14\binom{n^2}{k}$.)

In your $n=2,k=2$, example, you get $\frac14\left[\binom{4}2 + \binom{2}{1}+2\cdot 0\right]=\frac14(6+2)=2$, as expected. Notice the zero, since the last binomial coefficient would be $\binom{1}{1/2}$.

When $n$ is odd

You can do a similar analysis, though it is a little more tricky. I omit the details, but the final formula is $$ n\text{ is odd}\implies \text{# grids up to rotation}= \frac14\left[\binom{n^2}{k}+\binom{(n^2-1)/2}{\lfloor k/2 \rfloor }+2\cdot \binom{(n^2-1)/4}{\lfloor k/2\rfloor /2}^*\right] $$ Note that the second binomial coefficient no longer has an asterisk! This is because the lower index is $\lfloor k/2\rfloor$; if $k$ is not an integer, you divide by two and round down. However, the last binomial coefficient still has an asterisk, since $\lfloor k/2\rfloor /2$ is an integer when $k$ is of the form $4j$ or $4j+1$ for some integer $j$, and the expression is not an integer when $k=4j+2$ or $4j+3$.

When $n=3$ and $k=5$, this works out to be $\frac14[\binom{9}{5}+\binom{4}{2}+2\cdot \binom{2}{1}]=34$.

When $n=3$ and $k=6$, this works out to be $\frac14[\binom{9}{6}+\binom{4}{3}+2\cdot 0]=22$.


I think generalizing to $d$ dimensions would be pretty difficult, so I am not going to attempt it.