login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A255597 Upper bound on the number of different Euler diagrams for n classes. 0
1, 1, 3, 29, 1667, 3254781, 10650037396483 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
COMMENTS
Obtained via an iterative method. Each new class added to an existing diagram must create at least a new zone, and at most a number of new zones equal to the existing zones.
LINKS
Mathematics Stack Exchange, How many Euler diagrams with n sets exist?.
Wikipedia, Euler diagram.
FORMULA
a(n) = Sum_{k>=1} e(n,k), where k is the number of zones, and the elements e(n,k) are defined recursively as: e(0,1) = 1; e(n,k) = Sum_{c=1..k-1) binomial(c,k-c)*e(n-1,c).
EXAMPLE
For n=3 (3 different classes) there are 29 possible Euler diagrams that do not reduce to smaller cases. Of these 11 are in fact repetitions and need to be eliminated to perfect the upper bound.
PROG
(C)
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#define MAXCLU 7
#define MAXZONE 256
long long combi(int n, int k){
if (n<k) return 0;
long long ans=1;
k=k>n-k?n-k:k;
int j=1;
for(; j<=k; j++, n--){
if(n%j==0){
ans*=n/j;
}else if(ans%j==0){
ans=ans/j*n;
}
else{
ans=(ans*n)/j;
}
}
return ans;
}
int main(){
long long a[MAXCLU][MAXZONE];
long long sum[MAXCLU];
int j, k, i;
for (j=0; j<MAXCLU; j++){
sum[j]=0;
for (k=1; k<MAXZONE; k++) a[j][k]=0;
}
a[0][1] = 1;
for(j=1; j<MAXCLU; j++)
for (k=1; k<(exp2(j)+1); k++)
for (i=1; i<k; i++)
a[j][k] = a[j][k] + a[j-1][i]*combi(i, k-i);
for (j=0; j<MAXCLU; j++)
for (k=1; k<exp2(j)+1; k++)
sum[j]= sum[j] + a[j][k];
for (k=0; k<=exp2(MAXCLU-1); k++){
for (j=0; j<MAXCLU; j++){
if (j<5){
if (k==0) printf("%5lld", sum[j]);
else printf("%5lld", a[j][k]);
}
else{
if (k==0) printf("%15lld", sum[j]);
else printf("%15lld", a[j][k]);
}
}
printf("\n");
if (k==0) printf("\n");
}
}
CROSSREFS
This sequence is linked to A007018 by the binomial transform: b(n) = Sum_{k=0..n} C(n,k)*a(k).
Sequence in context: A094000 A162085 A182385 * A319637 A003190 A322451
KEYWORD
nonn
AUTHOR
Maurizio De Leo, Feb 27 2015
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 29 06:57 EDT 2024. Contains 371265 sequences. (Running on oeis4.)