A000250
Number of symmetric reflexive relations on n nodes: (1/2)*A000666.
Original entry on oeis.org
1, 3, 10, 45, 272, 2548, 39632, 1104306, 56871880, 5463113568, 978181717680, 326167542296048, 202701136710498400, 235284321080559981952, 511531711735594715527360, 2089424601541011618029114896, 16084004145036771186002041099712, 234026948449058790311618594954430848, 6454432593140577452393525511509194184320
Offset: 1
- Harary, Frank; Palmer, Edgar M.; Robinson, Robert W.; Schwenk, Allen J.; Enumeration of graphs with signed points and lines. J. Graph Theory 1 (1977), no. 4, 295-308.
- M. D. McIlroy, Calculation of numbers of structures of relations on finite sets, Massachusetts Institute of Technology, Research Laboratory of Electronics, Quarterly Progress Reports, No. 17, Sept. 15, 1955, pp. 14-22.
- W. Oberschelp, Kombinatorische Anzahlbestimmungen in Relationen, Math. Ann., 174 (1967), 53-78.
- N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
- Jean-François Alcover, Table of n, a(n) for n = 1..40
- M. D. McIlroy, Calculation of numbers of structures of relations on finite sets, Massachusetts Institute of Technology, Research Laboratory of Electronics, Quarterly Progress Reports, No. 17, Sep. 15, 1955, pp. 14-22. [Annotated scanned copy]
-
permcount[v_] := Module[{m = 1, s = 0, k = 0, t}, For[i = 1, i <= Length[v], i++, t = v[[i]]; k = If[i > 1 && t == v[[i - 1]], k + 1, 1]; m *= t*k; s += t]; s!/m];
edges[v_] := Sum[Sum[GCD[v[[i]], v[[j]]], {j, 1, i - 1}], {i, 2, Length[v]} ] + Sum[Quotient[v[[i]], 2] + 1, {i, 1, Length[v]}];
a[n_] := Module[{s = 0}, Do[s += permcount[p]*2^edges[p], {p, IntegerPartitions[n]}]; s/(2 n!)];
a /@ Range[19] (* Jean-François Alcover, Jan 17 2020, after Andrew Howroyd in A000666 *)
-
from itertools import combinations
from math import prod, factorial, gcd
from fractions import Fraction
from sympy.utilities.iterables import partitions
def A000250(n): return int(sum(Fraction(1<>1)+1)*r+(q*r*(r-1)>>1) for q, r in p.items())-1,prod(q**r*factorial(r) for q, r in p.items())) for p in partitions(n))) # Chai Wah Wu, Jul 14 2024
More terms from Herman Jamke (hermanjamke(AT)fastmail.fm), May 05 2007
A055973
Number of unlabeled digraphs with loops (relations) on n nodes and with an even number of arcs.
Original entry on oeis.org
1, 1, 6, 52, 1540, 145984, 48467296, 56141454464, 229148555640864, 3333310786076963968, 174695272746896566439424, 33301710992539090379269318144, 23278728241293494584257987458067456, 60084295633556503802059558812644803074048, 576025077880237078776946976495257043823396069376
Offset: 0
a(0)=1 prepended and terms a(13) and beyond from
Andrew Howroyd, Apr 19 2020
A055974
Number of unlabeled digraphs with loops (relations) on n nodes and with an odd number of arcs.
Original entry on oeis.org
0, 1, 4, 52, 1504, 145984, 48461696, 56141454464, 229148544420864, 3333310786076963968, 174695272746603272722432, 33301710992539090379269318144, 23278728241293494481773139193036800, 60084295633556503802059558812644803074048, 576025077880237078776946485247979728479746359296
Offset: 0
a(0)=0 prepended and terms a(13) and beyond from
Andrew Howroyd, Apr 19 2020
A309980
Number of binary relations on n unlabeled nodes that are neither reflexive nor antireflexive.
Original entry on oeis.org
0, 4, 72, 2608, 272752, 93847104, 110518842048, 454710381676032, 6640565658505128832, 348708024629593894001152, 66538376166308068986316241408, 46534722991725338264882258863095808, 120139253095727581744381043433138973706240, 1151909524447243687554850690730124812494959992832
Offset: 1
n=2: We label node 1 with (1,1) in the relation and node 2 with (2,2) not in the relation, and we have two differently labeled nodes and so a(2) = A053763(2) = 4.
n=3: We have exactly either one or two nodes x with (x,x) in the relation. In A328773 this labelings correspond to the color schemes [2,1] and [1,2], both represented by the column index 2. So we have a(3) = 2 * A328773(3,2) = 72.
Cf.
A000595 (arbitrary binary relations),
A000273 (digraphs, i.e. reflexive resp. antireflexive binary relations),
A053763 (digraphs with distinguishing labeled nodes),
A328773 (digraphs with given color scheme).
-
permcount[v_] := Module[{m = 1, s = 0, k = 0, t}, For[i = 1, i <= Length[v], i++, t = v[[i]]; k = If[i > 1 && t == v[[i - 1]], k + 1, 1]; m *= t*k; s += t]; s!/m];
edges[v_] := Sum[2*GCD[v[[i]], v[[j]]], {i, 2, Length[v]}, {j, 1, i - 1}] + Total[v];
a[n_] := Module[{s = 0}, Do[t = 2^edges[p]; s += t*(1 - 2^(1 - Length[p]))* permcount[p], {p, IntegerPartitions[n]}]; s/n!];
Array[a, 14] (* Jean-François Alcover, Jan 08 2021, after Andrew Howroyd *)
-
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])}
a(n) = {my(s=0); forpart(p=n, my(t=2^edges(p)); s+=t*(1 - 2^(1-#p))*permcount(p)); s/n!} \\ Andrew Howroyd, Nov 02 2019
A343592
Number of symmetry types of digraphs with n nodes.
Original entry on oeis.org
1, 2, 4, 9, 14, 36
Offset: 1
The four symmetry types of the digraphs with 3 nodes are represented by:
1.) {}, the empty graph, has together with the full graph the automorphism group S_3 (as subgroup of S_3) as symmetry type.
2.) {(1,2)} has together with 6 other digraphs the trivial automorphism group {id} as symmetry type. This digraph class is called asymmetric. Their values are given by A051504.
3.) {(1,2),(2,1)} has together with 5 other digraphs the automorphism group containing id and a transposition (so it is C_2 as the subgroup of S_3) as symmetry type.
4.) {(1,2),(2,3),(3,1)} has as the only digraph with three nodes the automorphism group C_3 as symmetry type. As a consequence it has to be self-complementary.
The total of the sizes of the symmetry type classes yields the number of digraphs A000273. Here: 2+7+6+1 = 16 = A000273(3).
Note, that for n > 3 there may be different symmetry types with isomorphic automorphism groups. For n=4 both {(1,2)} and {(1,2),(3,4)} have C_2 as automorphism group, but they are different as permutation group.
A383617
Triangle read by rows: T(n,k) is the number of binary relations on a set of n objects, k of which are picked out, 0 <= k <= n.
Original entry on oeis.org
1, 2, 2, 10, 16, 10, 104, 272, 272, 104, 3044, 11456, 16960, 11456, 3044, 291968, 1432608, 2842304, 2842304, 1432608, 291968, 96928992, 578431232, 1441700480, 1920352256, 1441700480, 578431232, 96928992, 112282908928, 784780122880, 2351993457920, 3918054495616, 3918054495616, 2351993457920, 784780122880, 112282908928
Offset: 0
Triangle starts:
1;
2, 2;
10, 16, 10;
104, 272, 272, 104;
3044, 11456, 16960, 11456, 3044;
291968, 1432608, 2842304, 2842304, 1432608, 291968;
96928992, 578431232, 1441700480, 1920352256, 1441700480, ...
112282908928, 784780122880, 2351993457920, 3918054495616, 3918054495616, ...
...
Example n=2, k=1: The both objects are differentiated. As a consequence all binary relations on two different objects have to be counted: These are the subsets of the cross product of the objects set with itself. This contains four pairs, so the number of subsets is 2^4 = 16.
A029849
Number of nonisomorphic and nonantiisomorphic relations.
Original entry on oeis.org
1, 2, 9, 74, 1740, 149572, 48575680, 56147642904, 229149201466592, 3333310913116926416, 174695272793893644765312, 33301710992572083379669646560, 23278728241293538748514513208527104
Offset: 0
A046858
Irregular triangle read by rows: T(n,k) = number of directed graphs-with-loops with n nodes and k arcs (n >= 0, 0 <= k <= n^2).
Original entry on oeis.org
1, 1, 1, 1, 2, 4, 2, 1, 1, 2, 8, 17, 24, 24, 17, 8, 2, 1, 1, 2, 9, 32, 95, 203, 373, 515, 584, 515, 373, 203, 95, 32, 9, 2, 1, 1, 2, 9, 36, 157, 549, 1692, 4374, 9626, 17874, 28373, 38486, 44805, 44805, 38486, 28373, 17874, 9626, 4374, 1692, 549, 157, 36, 9, 2, 1, 1
Offset: 0
Triangle begins:
[1],
[1, 1],
[1, 2, 4, 2, 1],
[1, 2, 8, 17, 24, 24, 17, 8, 2, 1],
[1, 2, 9, 32, 95, 203, 373, 515, 584, 515, 373, 203, 95, 32, 9, 2, 1] (the last batch giving the numbers of directed graphs with loops on 4 nodes and from 0 to 16 arcs).
- W. Oberschelp, Kombinatorische Anzahlbestimmungen in Relationen, Math. Ann., 174 (1967), 53-78.
-
Needs["Combinatorica`"]; Join[{{1}, {1,1}}, CoefficientList[Table[CycleIndex[Join[PairGroup[SymmetricGroup[n], Ordered], Permutations[Range[n^2-n+1, n^2]], 2],s]/.Table[s[i]->1+x^i, {i,1,n^2-n}], {n,2,7}], x]]//Grid (* Geoffrey Critzer, Sep 29 2012 *)
Edited by
N. J. A. Sloane Apr 16 2008 at the suggestion of Herman Jamke (hermanjamke(AT)fastmail.fm), Mar 24 2008
A054920
Number of connected unlabeled reflexive relations with n nodes such that complement is also connected.
Original entry on oeis.org
2, 4, 68, 2592, 278796, 95720106, 111891292036, 457846756500066, 6664787020904248568, 349363873490889302878250, 66602024342830108271942323060, 46557190064705399729526041154647820
Offset: 1
A154238
Number of orbits of the action g*b = b o (g x g) of the group of permutations g of an n-element set S on the set of closed binary operations b on S.
Original entry on oeis.org
1, 1, 10, 3411, 179228736, 2483590604688125, 14325593551925794051596768, 50976900379139614139041610902600299311, 155682086692129060007763454017522652304844346252853248
Offset: 0
Comments