OFFSET
0,3
COMMENTS
Colors are not interchangeable. Adjacent nodes may have the same color.
A partition [b_1, ..., b_m] with b_i > 0 and Sum_{i=1..m} b_i = n corresponds to a color scheme on n nodes having m colors. To find out which digraphs are equivalent with respect to a color scheme, consider the automorphism group on the partition. This group is the m-fold product of the symmetric groups on the b_i nodes, and therefore contains Product_{i=1..m} b_i! elements (i.e. the permutations).
Calculate the number of equivalence classes by determining the cycle index of the group induced by the automorphism group in the set of the edges [(i,j)|i,j in [1..n]; i != j] and set, with Pólya, the variable values to 2.
The left column of the triangle gives the number of unlabeled digraphs, while the right flank of the triangle gives the number of labeled digraphs.
REFERENCES
N. G. de Bruijn, Pólyas Abzähl-Theorie: Muster für Graphen und chemische Verbindungen, Selecta Mathematica III, Springer-Verlag (1971), 1-55.
LINKS
Peter Dolland, Table of n, a(n) for n = 0..138 (rows 0..10)
OEIS Wiki, Orderings of partitions (a comparison).
FORMULA
EXAMPLE
The sequence begins:
1;
1;
3, 4;
16, 36, 64;
218, 752, 1104, 2112, 4096;
9608, 45960, 90416, 178944, 266496, 528384, 1048576;
...
For n = 3, the three partitions of n are [3], [2, 1] and [1, 1, 1]. T(n,1) = 16 gives the number of colored digraphs with all nodes having the same color; T(n, 2) = 36 gives the number of colored digraphs with two nodes having the first color and one node having the second color; T(n, 3) gives the number of colored digraphs with each node having its own color.
For n = 5, k = 4 the required partition is [3,1,1]. T(5,4) = 178944 is then the number of colored digraphs with 5 nodes, where 3 nodes have the first color and the other two nodes each has its own color.
PROG
(PARI) \\ here C(p) computes sequence value for given partition.
permcount(v) = {my(m=1, s=0, k=0, t); for(i=1, #v, t=v[i]; k=if(i>1&&t==v[i-1], k+1, 1); m*=t*k; s+=t); s!/m}
edges(v) = {sum(i=2, #v, sum(j=1, i-1, 2*gcd(v[i], v[j]))) + sum(i=1, #v, v[i]-1)}
C(p)={((i, v)->if(i>#p, 2^edges(v), my(s=0); forpart(q=p[i], s+=permcount(q)*self()(i+1, concat(v, Vec(q)))); s/p[i]!))(1, [])}
Row(n)={apply(C, vecsort([Vecrev(p) | p<-partitions(n)], , 4))}
{ for(n=0, 6, print(Row(n))) } \\ Andrew Howroyd, Nov 02 2019
CROSSREFS
KEYWORD
nonn,tabf
AUTHOR
Peter Dolland, Oct 27 2019
STATUS
approved