4

It must be less than $B_6$ (where $B_6$ is the Bell number of $6$) since the elements are "duplicated". I would most appreciate a generating function that gives the number of set partitions of $\{1,1,2,2, ...n,n\}$.

coldnumber
  • 3,751
  • 3
    What kind of thing is ${1,1,2,2,3,3}$ here? I assume it's not a set, because that would be equal to ${1,2,3}$. – hmakholm left over Monica Aug 01 '15 at 22:30
  • {1,1,2,2,3,3} is a multiset. – Geoffrey Critzer Aug 02 '15 at 10:24
  • 1
    Using the Polya Enumeration Theorem twice in an algorithm with rather poor complexity I get the sequence $$2, 9, 66, 712, 10457,\ldots$$ which is OEIS A020555. The references therein may prove useful reading if indeed this is your sequence. They have a generating function for efficient calculation of these numbers. – Marko Riedel Aug 02 '15 at 23:12
  • The formula that I used is $$[B_1^2\cdots B_n^2] \sum_{q=1}^{2n} Z(S_q)\left(\sum_{k=1}^{2n} Z(S_k) (B_1+\cdots + B_n) \right),$$ which has limited utility for actual computations. – Marko Riedel Aug 02 '15 at 23:25
  • 1
    The first comment in the OEIS entry would appear to confirm that this sequence is a match. – Marko Riedel Aug 02 '15 at 23:34
  • The definition from the OEIS which says that we count multigraphs with $n$ labeled edges means that the vertices of the graph represent the multisets of the multiset partition and are connected by an edge $k$ if the two instances of the value $k$ are included in the sets represented by the two vertices that constitute the edge. – Marko Riedel Aug 03 '15 at 01:40

1 Answers1

1

Using the hint given in the OEIS entry we can write an optimized program that makes it possible to compute the sequence in question even for large values of $n$ for example this segment:

$$2, 9, 66, 712, 10457, 198091, 4659138, 132315780, 4441561814, \\ 173290498279, 7751828612725,393110572846777, 22385579339430539, \\ 1419799938299929267, 99593312799819072788, \ldots $$

The aforementioned hint says that we can equivalently count multigraphs with $n$ labeled edges where the vertices of the graph represent the multisets of the multiset partition and are connected by an edge $k$ if the two instances of the value $k$ are included in the sets represented by the two vertices that constitute the edge.

Supposing that we have the cycle index $Z(G_n)$ of the action on the edges of the symmetric group permuting the $n$ vertices of a graph where loops are allowed the desired value is thus given by ($2n$ is the maximum number of vertices we can cover with the $n$ labeled edges and these are multi-edges so they may be labeled with any subset of the $n$ labels)

$$[B_1 B_2 \cdots B_n] Z(G_{2n}) \left(\prod_{q=1}^n (1+B_q)\right).$$

But this cycle index is easy to compute with the computation being documented at this MSE link.

Observe that we have a special case here that admits radical simplification. Suppose we have a term $\alpha\in Z(G_{2n})$ which has the form $$p(\alpha) \prod_k a_k^{j_k(\alpha)}$$

with $p(\alpha)$ being the leading coefficient (a number) and $j_k(\alpha)$ the degree of $a_k$ in $\alpha.$

Now we have that any possible factors $a_k$ where $k\gt 1$ only contribute through the constant term because we are extracting the product $B_1 B_2\cdots B_n.$ This leaves $$p(\alpha) a_1^{j_1(\alpha)}.$$

Finally observe that $$[B_1 B_2\cdots B_n] \left(\prod_{q=1}^n (1+B_q)\right)^{j_1(\alpha)} \\ = [B_1 B_2\cdots B_n] \prod_{q=1}^n (1+B_q)^{j_1(\alpha)} = \prod_{q=1}^n {j_1(\alpha)\choose 1} = j_1(\alpha)^n.$$

The key effect here is that we have eliminated costly exponentiations of multivariate polynomials and are only working with numbers, computing this value: $$\sum_{\alpha\in Z(G_{2n})} p(\alpha) j_1(\alpha)^n.$$

This is the code:


pet_cycleind_symm :=
proc(n)
local p, s;
option remember;

    if n=0 then return 1; fi;

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

pet_flatten_term :=
proc(varp)
local terml, d, cf, v;

    terml := [];

    cf := varp;
    for v in indets(varp) do
        d := degree(varp, v);
        terml := [op(terml), seq(v, k=1..d)];
        cf := cf/v^d;
    od;

    [cf, terml];
end;


pet_cycleind_edg :=
proc(n)
option remember;
local s, t, res, cycs, l1, l2, flat, u, v;

    if n=0 then return 1; fi;

    s := 0:
    for t in pet_cycleind_symm(n) do
        flat := pet_flatten_term(t);

        cycs := flat[2]; res := 1;

        for u to nops(cycs) do
            for v from u+1 to nops(cycs) do
                l1 := op(1, cycs[u]); l2 := op(1, cycs[v]);
                res := res * a[lcm(l1, l2)]^(l1*l2/lcm(l1, l2));
            od;
        od;

        for u to nops(cycs) do
            l1 := op(1, cycs[u]);
            if type(l1, odd) then
                # a[l1]^(1/2*l1*(l1-1)/l1);
                res := res*a[l1]^(1/2*(l1-1));
            else
                # a[l1/2]^(l1/2/(l1/2))*a[l1]^(1/2*l1*(l1-2)/l1)
                res := res*a[l1/2]*a[l1]^(1/2*(l1-2));
            fi;
        od;

        s := s + res*t;
    od;

    s;
end;



Q :=
proc(n)
option remember;
    local res, flat, term;

    res := 0;
    for term in pet_cycleind_edg(2*n) do
        flat := pet_flatten_term(term);
        res := res + flat[1]*degree(term, a[1])^n;
    od;

    res;
end;
Marko Riedel
  • 64,728
  • I am very grateful for and interested in your reply. I am taking a final exam in two days so I cannot review your post right away. – Geoffrey Critzer Aug 04 '15 at 12:20
  • Supposing that we have the cycle index Z(Gn) of the action on the edges of the symmetric group permuting the n vertices of a graph where loops are allowed. – Geoffrey Critzer Aug 07 '15 at 16:24
  • I can generate the cycle indices Z(G_n) for small values of n on Mathematica. I do not understand how your Polya substitution formula ( the first formula in your post) would count the number of labeled multigraphs. – Geoffrey Critzer Aug 07 '15 at 16:43
  • Maybe it would help if I tell you the only thing that I do understand: If I substitute 1/(1 - x^i) in Z(G_3) for example. I get the number of multigraphs with loops on 3 vertices. 1 + 2 x + 6 x^2 + 14 x^3 + 28 x^4 + 52 x^5 + 93 x^6 + ... – Geoffrey Critzer Aug 07 '15 at 17:33
  • 1
    Good observation. The formula that you ask about is of the same type. Note that $$\prod_{q=1}^n (1+B_q)$$ generates all sets of labels (choose between it being included or not included) and a multi-edge has full symmetry between the constituent single edges so we are effectively dealing with a set. Now if we were to omit the coefficient extractor we would get all multigraphs with $n$ types of labels on the edges where off edges are admitted (constant coefficient). Hence after we apply the coeffcient extractor we get those graphs with exactly one instance of each type. – Marko Riedel Aug 07 '15 at 21:03
  • It may help to subsitute e,g. $\prod_{q=1}^3 (1+B_q)$ into e.g. $Z(G_3)$ with a CAS and verify the result using total enumeration with pen and paper. That should make things clear quite quickly. – Marko Riedel Aug 07 '15 at 21:10
  • OK Thank you! I think I understand this now. Here is a question to check my understanding. I made the substitution into Z(G_3) as you suggest above and I did verify that there are 66 multiset partitions of {1,1,2,2,3,3}. Now, if I want to know the number multiset partitons of {1,1,1,2,2,3,3}, I just find the coefficient of B_1^2B_2B_3 right? There are 355 of them. right? – Geoffrey Critzer Aug 07 '15 at 23:12
  • No, now on second thought I think my statement is wrong. I am trying to think of how we could interpret the other coefficients of in Z(G_3)((1+B_1)(1+B_2)(1+B_3). – Geoffrey Critzer Aug 07 '15 at 23:51
  • 1
    The above gadget can only be used to compute multiset partitions where each element occurs twice. This is because the concept of an edge is wired into the gadget to represent two instances of a given value, which are included in the multisets represented by the two end points. For your question you may use the poor complexity formula that I worked with initially. It is possible to construct a gadget for multisets where each element occurs three times and so on although the cycle indices require a CAS. – Marko Riedel Aug 08 '15 at 00:03
  • Yes! Thank you. I agree. I will make this claim then as as an example of the iterpretation of the coefficients in Z(G_2n)( (1+B_1)(1+B_2)(1+B_3)). The coefficient of B_1^jB_2^kB_3^m is the number of multigraphs with loops (with an infinite number of nodes) having j red edges, k blue edges and m green edges where no more than one edge of like color joins any two (not necessarily distinct) vertices. – Geoffrey Critzer Aug 08 '15 at 19:02