25

Extra conditions that put a formal solution out of my reach: the centre cell must contain a $0$, and two grids are equal if they have a symmetry, e.g. $$\left( \begin{array}{ccc} 0 & 1 & 0 \\ 0 & 0 & 1 \\ 0 & 1 & 1\end{array} \right) = \left( \begin{array}{ccc} 0 & 1 & 1 \\ 1 & 0 & 1 \\ 0 & 0 & 0 \end{array} \right) = \left( \begin{array}{ccc} 0 & 1 & 0 \\ 1 & 0 & 0 \\ 1 & 1 & 0\end{array} \right) $$ For context, this question is part of an investigation into the number of possible checkmate patterns in chess.

Parcly Taxel
  • 105,904
Supware
  • 966
  • 1
    When you say symmetry, it means "up to a rotation", right ? Do you include "true" symmetries (mirror symmetries wrt an axis, vertical, horizontal, at 45°) ? – Jean Marie Oct 23 '17 at 06:30
  • 5
    @JeanMarie The example matrices imply that reflections and rotations are considered equivalent. – Parcly Taxel Oct 23 '17 at 06:39
  • 7
    For this one-time calculation, I wouldn't bother trying to analyze it by hand. Just write a program. The time to write the program shouldn't be that much greater than the time for a by-hand analysis. Also, the code could be reused in the future for similar problems. – quasi Oct 23 '17 at 06:39
  • 1
    @quasi I fully agree with you. – Jean Marie Oct 23 '17 at 06:40
  • 8
    @quasi Don't bother with a computer. Burnside's lemma works here. – Parcly Taxel Oct 23 '17 at 06:41
  • @Ah, Ok -- nice. – quasi Oct 23 '17 at 06:41
  • Related (https://math.stackexchange.com/q/1831582) and (https://math.stackexchange.com/questions/570003/how-many-unique-patterns-exist-for-a-nxn-grid/587729#587729) – Jean Marie Oct 23 '17 at 09:34
  • If the zeros and ones are Fermions rather than Bosons, you have more possiblities. And yes, you dopes, that's a joke. – Carl Witthoft Oct 23 '17 at 18:42
  • Please accept my answer since it is the correct one. – Parcly Taxel Oct 25 '17 at 04:43

1 Answers1

48

Use Burnside's lemma. The number of symmetries of the matrix is eight:

  • the identity, leaving $2^8$ admissible matrices unchanged (the centre cell being fixed)
  • two 90° rotations leaving $2^2$ matrices unchanged each
  • a 180° rotation leaving $2^4$ matrices unchanged
  • four reflections leaving $2^5$ matrices unchanged each

So the number of possible matrices up to symmetry is $$\frac{2^8+2\cdot2^2+2^4+4\cdot2^5}8=32+1+2+16=51$$

Wildcard
  • 3,069
Parcly Taxel
  • 105,904
  • 14
    [+1] Burnside's lemma... what a tool... – Jean Marie Oct 23 '17 at 09:26
  • 8
    I notice (wiki page) that "..there are 57 rotationally distinct colourings of the faces of a cube in three colours." Same as the number of Heinz ketchup types. Coincidence? Alien influence? – Carl Witthoft Oct 23 '17 at 18:47