xxxxxxxxxx
@cached_function
def aux(L):
if L.cardinality() == 1:
return 1, 1
b = L.bottom()
U = L.upper_covers(b)
J = set()
for k in range(1, len(U)+1):
for S in Subsets(U, k):
J.add(L.join(S))
t = L.top()
C = {}
for j in J:
M = L.sublattice(L.interval(j, t))
M = M.canonical_label()
l, c = aux(M)
C[l+1] = C.get(l+1, 0) + c
l = min(C.keys())
return l, C[l]
def statistic(L):
return aux(L.canonical_label())[1]
def parent_initializer(n):
class MyLattices():
def __iter__(self):
if n <= 2:
for P in Posets(n):
if P.is_lattice():
yield LatticePoset(P)
else:
for P in Posets(n-2):
Q = P.with_bounds()
if Q.is_lattice():
yield LatticePoset(Q)
def cardinality(self):
l = [1, 1, 1, 1, 2, 5, 15, 53, 222, 1078, 5994, 37622, 262776, 2018305, 16873364, 152233518, 1471613387, 15150569446, 165269824761, 1901910625578, 23003059864006]
if n < len(l):
return l[n]
return Infinity
return MyLattices()
element_repr = lambda X: str( ( sorted(X._hasse_diagram.canonical_label().cover_relations()), len(X._hasse_diagram.vertices(sort=False)) ) )
levels = [3, 4, 5, 6, 7]
for level in levels:
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), statistic(elt)))
Sorry, this statistic was not found in the database
go back and search again
or
add this statistic to the database – it's very simple and we need your support!