5

We have a child's toy, which is a ball made of 12 colored wedges (3 Red, 3 Green, 3 Blue, 3 Yellow). Our child asked the sensible question 'how many different patterns are possible?'.

In researching the answer, I discovered it's a mathematically complex and interesting question! My math level is advanced high school/entry level university - sufficient to determine that Burnside's lemma is the right tool and to more or less understand its application to this problem. This is essentially a 'bracelet' problem, as I understand it. But I would like to solve not for the total unique bracelets, but for a smaller subset of unique arrangements that are color agnostic (I'll define this here as 'unique patterns', lacking a more accurate term). E.g. -RRY-GGG-BBB-YRY- is considered the same arrangement as -GGB-RRR-YYY-BGB-. The pattern is the same even though the colors are switched.

From my research, my starting point was a similar related problem asked at the link below and answered very helpfully by Marko Riedel:

Necklace problem with Burnside's lemma

As Marko showed using Burnside's lemma, the total arrangements of that 6 bead 'bracelet' (or a simpler toy of 6 wedges of three colors) would be 11. But the smaller subset of 'unique patterns' which are color agnostic are 5. It was easy enough to identify those 5 manually, but what I am interested in is how Burnside's lemma could be correctly applied to find the unique (color agnostic) patterns possible on this more complex toy of 12 wedges in 4 colors.

My starting point was to calculate the higher amount of all possible 'bracelets'. The identity gives $12! /( 3!^4) = 369{,}600$. And unless I'm mistaken, the reflection symmetries yield no candidates and the only rotation symmetries which do are by 4 and 8 spaces (giving 24 each). This gives:

(369,600 + 24 + 24) / 24 = 15,402 possible bracelets.

This gives me an upper limit, but how would I then reduce this to the subset of 'unique patterns' which are agnostic as to color placement, as it's not feasible to calculate this manually.

Any advice would be greatly appreciated by this math curious family!

(note: resubmitted with additional context as requested by moderator to my first question)

WimC
  • 33,414
  • 2
  • 52
  • 98
Granny
  • 53

1 Answers1

1

The following presents some commentary and some ideas. What we have here is another instance of Power Group Enumeration as defined by Harary and Palmer in Graphical Enumeration and also by Fripertinger in Enumeration in Musical Theory. The scenario is always the same, we have a row of slots with a group permuting them and a set of objects going into these slots, with a second group permuting the objects. We then use Burnside, indeed the Polya Enumeration Theorem and Power Group Enumeration are both applications of this lemma. Here the question is how we can assign objects (colors) to the slots so they remain fixed under a given slot permutation. (We count these assignments and average over the number of slot permutations.) With colors only, they must be constant on the cycles of the permutation, which is basic Burnside. With weighted objects, they must still be constant, but each admissible assignment to a cycle of some order $q$ contributes $q$ copies of each object to the generating function. This is PET. Finally, with a group acting on the objects as well for the assignment to be fixed we must count the ways in which we may cover the cycles of the slot permutation with cycles from the object permutation by opening the cycle from the object permutation and placing consecutive complete copies of it on the cycle from the slot permutation. In this way when the slot / object permutation pair acts on the assignment it merely rotates on the cycle, being fixed as required by Burnside. This is PGE. One example of many that is possible treats edge colorings of the cube with swappable colors and can be found at the following MSE link . Here is an excerpt of the generating function that we obtain for coloring a bracelet of twelve slots with at most four colors:

$${P_{{1}}}^{12}+35\,{P_{{1}}}^{6}{P_{{2}}}^{6}+38 \,{P_{{1}}}^{5}{P_{{2}}}^{7}+29\,{P_{{1}}}^{4}{P _{{2}}}^{8}+297\,{P_{{1}}}^{4}{P_{{2}}}^{4}{P_{{ 3}}}^{4}\\+12\,{P_{{1}}}^{3}{P_{{2}}}^{9}+1170\,{P _{{1}}}^{3}{P_{{2}}}^{4}{P_{{3}}}^{5}+424\,{P_{{ 1}}}^{3}{P_{{2}}}^{3}{P_{{3}}}^{6}+713\,{P_{{1}} }^{3}{P_{{2}}}^{3}{P_{{3}}}^{3}{P_{{4}}}^{3}\\+6\, {P_{{1}}}^{2}{P_{{2}}}^{10}+386\,{P_{{1}}}^{2}{P _{{2}}}^{5}{P_{{3}}}^{5}+610\,{P_{{1}}}^{2}{P_{{ 2}}}^{4}{P_{{3}}}^{6}\\+340\,{P_{{1}}}^{2}{P_{{2}} }^{3}{P_{{3}}}^{7}+5890\,{P_{{1}}}^{2}{P_{{2}}}^ {3}{P_{{3}}}^{3}{P_{{4}}}^{4}+\ldots$$

Therefore the answer for three instances each of four colors is $$\bbox[5px,border:2px solid #00A000]{713.}$$

The Maple code for the above is quite compact and straightforward and follows below.

with(combinat);
with(numtheory);

pet_cycleind_cyclic := proc(n) local d;

add(phi(d)*a[d]^(n/d), d in divisors(n))/n;

end;

pet_cycleind_dihedral := proc(n) local s;

s := 1/2*pet_cycleind_cyclic(n);

if(type(n, odd)) then
    s := s + 1/2*a[1]*a[2]^((n-1)/2);
else
    s := s + 1/4*(a[1]^2*a[2]^((n-2)/2) + a[2]^(n/2));
fi;

s;

end;

pet_cycleind_symm := proc(n) option remember; local l;

if n=0 then return 1; fi;

expand(1/n*add(a[l]*pet_cycleind_symm(n-l), l=1..n));

end;

pet_indets2rep := proc(ip) local rep, var, deg, pos, s;

rep := []; pos := 1;

for var in indets(ip) do
    for deg to degree(ip, var) do
        rep :=
        [op(rep), [seq(s, s=pos..pos+op(1, var)-1)]];
        pos := pos + op(1, var);
    od;
od;

rep;

end;

bracelet_colorings_gf := proc(B, C) option remember; local idx_slots, idx_cols, rep, res, term_a, term_b, v_a, v_b, inst_a, len_a, len_b, p, q, parts, alldeg, cols, col, v;

if C = 1 then return P[1]^B fi;
if B = 1 then return P[1] fi;

idx_slots := pet_cycleind_dihedral(B);
idx_cols := pet_cycleind_symm(C);

res := 0;

for term_b in idx_cols do
    rep := pet_indets2rep(term_b);

    for term_a in idx_slots do
        p := 1;

        for v_a in indets(term_a) do
            len_a := op(1, v_a);
            inst_a := degree(term_a, v_a);

            q := 0;

            for v_b in rep do
                len_b := nops(v_b);

                if len_a mod len_b = 0 then
                    q := q + len_b*
                    mul(P[col], col in v_b)
                    ^(len_a/len_b);
                fi;
            od;

            p := p*q^inst_a;
        od;

        res := res +
        lcoeff(term_a)*lcoeff(term_b)*p;
    od;
od;

parts := 0;

for cols in expand(res) do
    alldeg :=
    sort(map(v -> degree(cols, v),
             [op(indets(cols))]));

    parts := parts +
    lcoeff(cols)*
    mul(P[v]^alldeg[v], v=1..nops(alldeg));
od;

parts;

end;

As a bonus we can count the colorings of a twelve-bracelet with some number of swappable colors (at most twelve) which is a great deal simpler and faster than working with generating functions. This is shown below.

bracelet_pg :=
proc(B, C)
option remember;
local idx_slots, idx_colors, res, term_a, term_b,
    v_a, v_b, inst_a, inst_b, len_a, len_b, p, q;
if B = 1 or C = 1 then return 1 fi;

idx_slots := pet_cycleind_dihedral(B);
idx_colors := pet_cycleind_symm(C);

res := 0;

for term_a in idx_slots do
    for term_b in idx_colors do
        p := 1;

        for v_a in indets(term_a) do
            len_a := op(1, v_a);
            inst_a := degree(term_a, v_a);

            q := 0;

            for v_b in indets(term_b) do
                len_b := op(1, v_b);
                inst_b := degree(term_b, v_b);

                if len_a mod len_b = 0 then
                    q := q + len_b*inst_b;
                fi;
            od;

            p := p*q^inst_a;
        od;

        res := res +
        lcoeff(term_a)*lcoeff(term_b)*p;
    od;
od;

res;

end;

This gives the sequence

$$1, 122, 3960, 30108, 88508, 144587, 171283, 178190, 179204,\\ 179300, 179306, 179307, 179307,\ldots$$

In particular with at most four colors we find $30108$ unique colorings. We obtain for an exact number of colors the sequence

$$1, 121, 3838, 26148, 58400, 56079, 26696, \\ 6907, 1014, 96, 6, 1, 0, \ldots$$

We get for exactly four colors that there are $26148$ unique colorings. Note how the colorings with eleven colors can be counted by inspection (place two markers on a twelve-bracelet).

Observe that the data for an exact number of colors are to be found at OEIS A152176 where a considerable variety of additional material awaits.

Marko Riedel
  • 64,728
  • This is amazingly helpful Marko. Thank you very much for responding. Do I understand correctly that this shows there are 30,108 unique colorings of the bracelet using 4x3 colors, and that there are 713 'unique' patterns, where the colors can be switched and the pattern the same? – Granny Jul 07 '21 at 02:32
  • Thanks! There are $30108$ patterns using at most four colors under the dihedral symmetry of the twelve-bracelet and $713$ patters under the same symmetry consisting of three instances each of four different colors. (The first counts all partitions into at most four colors i.e. it includes two colors as shown in the GF.) – Marko Riedel Jul 07 '21 at 16:24