1

If you have two types of objects, $a$, and $b$. You have $n_1$ of the first object, $n_2$ of the second object. How many distinct ways can you rearrange these objects on a ring. Arrangements are only unique if the ring can't be rotated or flipped to form another arrangement.

RobPratt
  • 50,938

1 Answers1

3

Consulting the following fact sheet on necklaces and bracelets we get for the cycle index of the cyclic group

$$Z(C_n) = \frac{1}{n} \sum_{d|n} \varphi(d) a_d^{n/d}.$$

We will apply PET so we need with $k$ objects of type $A$ and $m$ objects of type $B$ for the cyclic component:

$$[A^k B^m] Z(C_{k+m}; A+B) = [A^k B^m] \frac{1}{k+m} \sum_{d|k+m} \varphi(d) (A^d + B^d)^{(k+m)/d} \\ = [A^k B^m] \frac{1}{k+m} \sum_{d|\gcd(k,m)} \varphi(d) (A^d + B^d)^{(k+m)/d} \\ = \frac{1}{k+m} \sum_{d|\gcd(k,m)} \varphi(d) [A^k B^m] (A^d + B^d)^{(k+m)/d} \\ = \frac{1}{k+m} \sum_{d|\gcd(k,m)} \varphi(d) [A^{k/d} B^{m/d}] (A + B)^{(k+m)/d}.$$

This is

$$\bbox[5px,border:2px solid #00A000]{P_{k,m} = \frac{1}{k+m} \sum_{d|\gcd(k,m)} \varphi(d) {(k+m)/d\choose k/d}.}$$

Now for reflectional i.e. dihedral symmetry we get for $k+m$ odd the extra contributiom

$$[A^k B^m] \frac{1}{2} (A+B) (A^2 + B^2)^{(k+m-1)/2}.$$

If $k$ is the odd one this is

$$[A^{k-1} B^m] \frac{1}{2} (A^2 + B^2)^{(k+m-1)/2} \\ = [A^{(k-1)/2} B^{m/2}] \frac{1}{2} (A + B)^{(k+m-1)/2}.$$

This is

$$\bbox[5px,border:2px solid #00A000]{ Q_{1,k,m} = \frac{1}{2} P_{k,m} + \frac{1}{2} {(k+m-1)/2 \choose m/2}.}$$

On the other hand if $m$ is the odd one we get

$$\bbox[5px,border:2px solid #00A000]{ Q_{2,k,m} = \frac{1}{2} P_{k,m} + \frac{1}{2} {(k+m-1)/2 \choose k/2}.}$$

With $k+m$ even they can both be odd or both be even. The contribution is

$$[A^k B^m] \frac{1}{4} (A+B)^2 (A^2 + B^2)^{(k+m)/2-1} + [A^k B^m] \frac{1}{4} (A^2 + B^2)^{(k+m)/2}.$$

If they are both odd we are left with just

$$[A^k B^m] \frac{1}{2} AB (A^2 + B^2)^{(k+m)/2-1} \\ = [A^{k-1} B^{m-1}] \frac{1}{2} (A^2 + B^2)^{(k+m)/2-1} \\ = [A^{(k-1)/2} B^{(m-1)/2}] \frac{1}{2} (A + B)^{(k+m)/2-1}.$$

We obtain

$$\bbox[5px,border:2px solid #00A000]{ Q_{3,k,m} = \frac{1}{2} P_{k,m} + \frac{1}{2} {(k+m)/2-1 \choose (k-1)/2}.}$$

The last one is when both are even and we obtain

$$[A^k B^m] \frac{1}{4} (A^2 + B^2) (A^2 + B^2)^{(k+m)/2-1} + [A^{k/2} B^{m/2}] \frac{1}{4} (A + B)^{(k+m)/2} \\ = [A^{k-2} B^m] \frac{1}{4} (A^2 + B^2)^{(k+m)/2-1} + [A^k B^{m-2}] \frac{1}{4} (A^2 + B^2)^{(k+m)/2-1} \\ + \frac{1}{4} {(k+m)/2\choose k/2} \\ = [A^{k/2-1} B^{m/2}] \frac{1}{4} (A + B)^{(k+m)/2-1} + [A^{k/2} B^{m/2-1}] \frac{1}{4} (A + B)^{(k+m)/2-1} \\ + \frac{1}{4} {(k+m)/2\choose k/2}.$$

This is

$$\bbox[5px,border:2px solid #00A000]{ \begin{array}{l} Q_{4,k,m} & = \frac{1}{2} P_{k,m} + \frac{1}{4} {(k+m)/2-1\choose m/2} + \frac{1}{4} {(k+m)/2-1\choose k/2} \\ & + \frac{1}{4} {(k+m)/2\choose k/2}. \end{array}}$$

There is some Maple code to verify this which computes the desired statistic from PET and from the closed form.

with(numtheory);
with(combinat);

pet_varinto_cind := proc(poly, ind) local subs1, subs2, polyvars, indvars, v, pot, res, k;

res := ind;

polyvars := indets(poly);
indvars := indets(ind);

for v in indvars do
    pot := op(1, v);

    subs1 :=
    [seq(polyvars[k]=polyvars[k]^pot,
         k=1..nops(polyvars))];

    subs2 := [v=subs(subs1, poly)];

    res := subs(subs2, res);
od;

res;

end;

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;

CYCLIC_CIND := proc(k,m) option remember; local cind, sind;

cind := pet_cycleind_cyclic(k+m);
sind := pet_varinto_cind(A+B, cind);

coeff(coeff(expand(sind), A, k), B, m);

end;

CYCLIC_X := proc(k, m) local d;

1/(k+m)*add(phi(d)*binomial((k+m)/d, k/d),
            d in divisors(gcd(k,m)));

end;

DIHEDRAL_CIND := proc(k,m) option remember; local cind, sind;

cind := pet_cycleind_dihedral(k+m);
sind := pet_varinto_cind(A+B, cind);

coeff(coeff(expand(sind), A, k), B, m);

end;

DIHEDRAL_X := proc(k, m) local d; if type(k+m, odd) then if type(k, odd) then 1/2CYCLIC_X(k,m) + 1/2binomial((k+m-1)/2, m/2) else 1/2CYCLIC_X(k,m) + 1/2binomial((k+m-1)/2, k/2) fi; else if type(k, odd) then 1/2CYCLIC_X(k,m) + 1/2binomial((k+m)/2-1, (k-1)/2); else 1/2CYCLIC_X(k,m) + 1/4binomial((k+m)/2-1, m/2) + 1/4binomial((k+m)/2-1, k/2) + 1/4binomial((k+m)/2, k/2); fi; fi; end;

Marko Riedel
  • 64,728