Integer sequences related to Boolean functions/clans
Appearance
These sequences are related to clans, i.e. equivalence classes created by negation and permutation of arguments.
sequences by arity
[edit | edit source]arity n | 0 | 1 | 2 | 3 | 4 | 5 | |
---|---|---|---|---|---|---|---|
number of functions with arity ≤ n | A001146 | 2 | 4 | 16 | 256 | 65 536 | 4 294 967 296 |
number of functions with arity = n | A000371 | 2 | 2 | 10 | 218 | 64 594 | 4 294 642 034 |
number of clans with arity ≤ n | A000616 | 2 | 3 | 6 | 22 | 402 | 1 228 158 |
number of clans with arity = n | A000618 | 2 | 1 | 3 | 16 | 380 | 1 227 756 |
number of blightless clans with arity ≤ n | 2 | 0 | 3 | 14 | 357 | ||
number of blightless clans with arity = n | 2 | 0 | 1 | 11 | 343 |
triangles
[edit | edit source]clans by weight
[edit | edit source]Triangle A039754 shows the number of clans with arity ≤ n and weight k. | |||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
k n |
0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | A000616 | |
0 | 1 | 1 | 2 | ||||||||||||||||
1 | 1 | 1 | 1 | 3 | |||||||||||||||
2 | 1 | 1 | 2 | 1 | 1 | 6 | |||||||||||||
3 | 1 | 1 | 3 | 3 | 6 | 3 | 3 | 1 | 1 | 22 | |||||||||
4 | 1 | 1 | 4 | 6 | 19 | 27 | 50 | 56 | 74 | 56 | 50 | 27 | 19 | 6 | 4 | 1 | 1 | 402 |
This triangle shows the number of clans with arity = n and weight k. | |||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
k n |
0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | A000618 | |
0 | 1 | 1 | 2 | ||||||||||||||||
1 | 0 | 1 | 0 | 1 | |||||||||||||||
2 | 0 | 1 | 1 | 1 | 0 | 3 | |||||||||||||
3 | 0 | 1 | 2 | 3 | 4 | 3 | 2 | 1 | 0 | 16 | |||||||||
4 | 0 | 1 | 3 | 6 | 16 | 27 | 47 | 56 | 68 | 56 | 47 | 27 | 16 | 6 | 3 | 1 | 0 | 380 |
blightless clans by weight
[edit | edit source]See Studies of Euler diagrams/blightless.
This triangle shows the number of clans with arity = n and weight k. | |||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
k n |
0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | ||
0 | 1 | 1 | 2 | ||||||||||||||||
1 | 0 | 0 | 0 | 0 | |||||||||||||||
2 | 0 | 0 | 0 | 1 | 0 | 1 | |||||||||||||
3 | 0 | 0 | 0 | 1 | 4 | 3 | 2 | 1 | 0 | 11 | |||||||||
4 | 0 | 0 | 0 | 0 | 5 | 19 | 41 | 54 | 68 | 56 | 47 | 27 | 16 | 6 | 3 | 1 | 0 | 343 |
blightless clans by number of bundles
[edit | edit source]0 1 2 3 4 blightless (row sums) blighted all (A000618) 0 2 2 0 2 1 0 0 0 1 1 2 0 0 1 1 2 3 3 0 6 2 3 11 5 16 4 0 292 36 10 5 343 37 380 298 357 45 402
Python fragment
[edit | edit source]calculation of blightless clans by weight |
---|
This code uses the Python library discrete helpers.
from discretehelpers.boolf import Boolf
from discretehelpers.binv import Binv
n = 4
bec_indices_by_weight = []
for weight in range(2 ** n + 1):
bec_indices_by_weight.append(set())
for i in range(2 ** 2 ** n):
binv = Binv(intval=i, length=2 ** n)
boolf = Boolf(binv)
if boolf.sarity == n and boolf.is_blightless:
weight = binv.weight
bec_index = boolf.bec_index_from_fingerprint()
bec_indices_by_weight[weight].add(bec_index)
[len(_) for _ in bec_indices_by_weight] # [0, 0, 0, 0, 5, 19, 41, 54, 68, 56, 47, 27, 16, 6, 3, 1, 0]
|