# Gender of Boolean functions

A Boolean function shall be called male, iff its root is sharp (i. e. iff its compressed truth table has odd weight). (Equivalently, it is female, iff after removing all repetitions, the weight of the truth table is still even.)
For positive arities, there are more males than females. The imbalance peaks for arity 2. For higher arities, the ratio is almost balanced. The ratio is balanced for the infinite set of all Boolean functions. Both sets are countable, so there is a trivial bijection. But is there a meaningful bijection?
The number triangles in the following boxes show the numbers of Boolean functions by arity/adicity and valency. Row indices on the left (🌊) are the arity, on the right (💧) the adicity. Entries on the left are the sums of columns on the right. These triangles are based on Pascals triangle, with columns multiplied by consecutive entries of a sequence, which becomes the diagonal.
diagonals and row sums :
| | | name | OEIS | 0 | 1 | 2 | 3 | 4 | 5 |
| ♀ | diag. | Violet | ~ 2·A007537 | 1 | 0 | 2 | 90 | 31826 | 2147158386 |
| ♀ | 🌊 | Primula | A246537 | 1 | 1 | 3 | 97 | 32199 | 2147318437 |
| ♀ | 💧 | Petunia | | 1 | 0 | 2 | 94 | 32102 | 2147286238 |
| ♂ | diag. | SmallGrass | ~A058891 | 1 | 2 | 8 | 128 | 32768 | 2147483648 |
| ♂ | 🌊 | SmallCrocus | A246418 | 1 | 3 | 13 | 159 | 33337 | 2147648859 |
| ♂ | 💧 | SmallHibiscus | | 1 | 2 | 10 | 146 | 33178 | 2147615522 |
| all | diag. | Lotus | A000371 | 2 | 2 | 10 | 218 | 64594 | 4294642034 |
| all | 🌊 | Grass | A001146 | 2 | 4 | 16 | 256 | 65536 | 4294967296 |
| all | 💧 | Moss | ~A111403 | 2 | 2 | 12 | 240 | 65280 | 4294901760 |
| ♂ − ♀ | diag. | Orchid | A005530 | 0 | 2 | 6 | 38 | 942 | 325262 |
| ♂ − ♀ | 🌊 | Mallow | 2·A059301 | 0 | 2 | 10 | 62 | 1138 | 330422 |
| ♂ − ♀ | 💧 | Mullein | | 0 | 2 | 8 | 52 | 1076 | 329284 |
🌊    triangle Robinia    row sums Primula (A246537) :
| va | 0 | 1 | 2 | 3 | 4 | 5 | sums |
| 0 | 1 · 1 1 | | | | | | 1 |
| 1 | 1 · 1 1 | 1 · 0 0 | | | | | 1 |
| 2 | 1 · 1 1 | 2 · 0 0 | 1 · 2 2 | | | | 3 |
| 3 | 1 · 1 1 | 3 · 0 0 | 3 · 2 6 | 1 · 90 90 | | | 97 |
| 4 | 1 · 1 1 | 4 · 0 0 | 6 · 2 12 | 4 · 90 360 | 1 · 31826 31826 | | 32199 |
| 5 | 1 · 1 1 | 5 · 0 0 | 10 · 2 20 | 10 · 90 900 | 5 · 31826 159130 | 1 · 2147158386 2147158386 | 2147318437 |
💧    triangle Acacia    row sums Petunia :
| va | 0 | 1 | 2 | 3 | 4 | 5 | sums |
| 0 | 1 | | | | | | 1 |
| 1 | 0 | 1 · 0 0 | | | | | 0 |
| 2 | 0 | 1 · 0 0 | 1 · 2 2 | | | | 2 |
| 3 | 0 | 1 · 0 0 | 2 · 2 4 | 1 · 90 90 | | | 94 |
| 4 | 0 | 1 · 0 0 | 3 · 2 6 | 3 · 90 270 | 1 · 31826 31826 | | 32102 |
| 5 | 0 | 1 · 0 0 | 4 · 2 8 | 6 · 90 540 | 4 · 31826 127304 | 1 · 2147158386 2147158386 | 2147286238 |
🌊    triangle SmallCedar    row sums SmallCrocus (A246418) :
| va | 0 | 1 | 2 | 3 | 4 | 5 | sums |
| 0 | 1 · 1 1 | | | | | | 1 |
| 1 | 1 · 1 1 | 1 · 2 2 | | | | | 3 |
| 2 | 1 · 1 1 | 2 · 2 4 | 1 · 8 8 | | | | 13 |
| 3 | 1 · 1 1 | 3 · 2 6 | 3 · 8 24 | 1 · 128 128 | | | 159 |
| 4 | 1 · 1 1 | 4 · 2 8 | 6 · 8 48 | 4 · 128 512 | 1 · 32768 32768 | | 33337 |
| 5 | 1 · 1 1 | 5 · 2 10 | 10 · 8 80 | 10 · 128 1280 | 5 · 32768 163840 | 1 · 2147483648 2147483648 | 2147648859 |
💧    triangle SmallCypress    row sums SmallHibiscus :
| va | 0 | 1 | 2 | 3 | 4 | 5 | sums |
| 0 | 1 | | | | | | 1 |
| 1 | 0 | 1 · 2 2 | | | | | 2 |
| 2 | 0 | 1 · 2 2 | 1 · 8 8 | | | | 10 |
| 3 | 0 | 1 · 2 2 | 2 · 8 16 | 1 · 128 128 | | | 146 |
| 4 | 0 | 1 · 2 2 | 3 · 8 24 | 3 · 128 384 | 1 · 32768 32768 | | 33178 |
| 5 | 0 | 1 · 2 2 | 4 · 8 32 | 6 · 128 768 | 4 · 32768 131072 | 1 · 2147483648 2147483648 | 2147615522 |
illustration :
| Zhegalkin indices | truth tables |
all :
🌊    triangle Willow    row sums Grass (A001146) :
| va | 0 | 1 | 2 | 3 | 4 | 5 | sums |
| 0 | 1 · 2 2 | | | | | | 2 |
| 1 | 1 · 2 2 | 1 · 2 2 | | | | | 4 |
| 2 | 1 · 2 2 | 2 · 2 4 | 1 · 10 10 | | | | 16 |
| 3 | 1 · 2 2 | 3 · 2 6 | 3 · 10 30 | 1 · 218 218 | | | 256 |
| 4 | 1 · 2 2 | 4 · 2 8 | 6 · 10 60 | 4 · 218 872 | 1 · 64594 64594 | | 65536 |
| 5 | 1 · 2 2 | 5 · 2 10 | 10 · 10 100 | 10 · 218 2180 | 5 · 64594 322970 | 1 · 4294642034 4294642034 | 4294967296 |
💧    triangle Poplar    row sums Moss (~A111403) :
| va | 0 | 1 | 2 | 3 | 4 | 5 | sums |
| 0 | 2 | | | | | | 2 |
| 1 | 0 | 1 · 2 2 | | | | | 2 |
| 2 | 0 | 1 · 2 2 | 1 · 10 10 | | | | 12 |
| 3 | 0 | 1 · 2 2 | 2 · 10 20 | 1 · 218 218 | | | 240 |
| 4 | 0 | 1 · 2 2 | 3 · 10 30 | 3 · 218 654 | 1 · 64594 64594 | | 65280 |
| 5 | 0 | 1 · 2 2 | 4 · 10 40 | 6 · 218 1308 | 4 · 64594 258376 | 1 · 4294642034 4294642034 | 4294901760 |
🌊    triangle Chestnut    row sums Mallow (2·A059301) :
| va | 0 | 1 | 2 | 3 | 4 | 5 | sums |
| 0 | 1 · 0 0 | | | | | | 0 |
| 1 | 1 · 0 0 | 1 · 2 2 | | | | | 2 |
| 2 | 1 · 0 0 | 2 · 2 4 | 1 · 6 6 | | | | 10 |
| 3 | 1 · 0 0 | 3 · 2 6 | 3 · 6 18 | 1 · 38 38 | | | 62 |
| 4 | 1 · 0 0 | 4 · 2 8 | 6 · 6 36 | 4 · 38 152 | 1 · 942 942 | | 1138 |
| 5 | 1 · 0 0 | 5 · 2 10 | 10 · 6 60 | 10 · 38 380 | 5 · 942 4710 | 1 · 325262 325262 | 330422 |
💧    triangle Chinkapin    row sums Mullein :
| va | 0 | 1 | 2 | 3 | 4 | 5 | sums |
| 0 | 0 | | | | | | 0 |
| 1 | 0 | 1 · 2 2 | | | | | 2 |
| 2 | 0 | 1 · 2 2 | 1 · 6 6 | | | | 8 |
| 3 | 0 | 1 · 2 2 | 2 · 6 12 | 1 · 38 38 | | | 52 |
| 4 | 0 | 1 · 2 2 | 3 · 6 18 | 3 · 38 114 | 1 · 942 942 | | 1076 |
| 5 | 0 | 1 · 2 2 | 4 · 6 24 | 6 · 38 228 | 4 · 942 3768 | 1 · 325262 325262 | 329284 |
Pascal's triangle :
🌊    Pascal's triangle :
| kn | 0 | 1 | 2 | 3 | 4 | 5 | sums |
| 0 | 1 | | | | | | 1 |
| 1 | 1 | 1 | | | | | 2 |
| 2 | 1 | 2 | 1 | | | | 4 |
| 3 | 1 | 3 | 3 | 1 | | | 8 |
| 4 | 1 | 4 | 6 | 4 | 1 | | 16 |
| 5 | 1 | 5 | 10 | 10 | 5 | 1 | 32 |
💧    offset Pascal's triangle :
| kn | 0 | 1 | 2 | 3 | 4 | 5 | sums |
| 0 | 1 | | | | | | 1 |
| 1 | 0 | 1 | | | | | 1 |
| 2 | 0 | 1 | 1 | | | | 2 |
| 3 | 0 | 1 | 2 | 1 | | | 4 |
| 4 | 0 | 1 | 3 | 3 | 1 | | 8 |
| 5 | 0 | 1 | 4 | 6 | 4 | 1 | 16 |
Lotus (A000371, the number of dense BF) is surprisingly the sum of a signed version of Cedar.
SignedCedar and row sums Lotus :
triangle SignedCedar    row sums Lotus (A000371)   🌊 :
| kn | 0 | 1 | 2 | 3 | 4 | 5 | sums |
| 0 | 1 · 2 2 | | | | | | 2 |
| 1 | 1 · 2 −2 | 1 · 4 4 | | | | | 2 |
| 2 | 1 · 2 2 | 2 · 4 −8 | 1 · 16 16 | | | | 10 |
| 3 | 1 · 2 −2 | 3 · 4 12 | 3 · 16 −48 | 1 · 256 256 | | | 218 |
| 4 | 1 · 2 2 | 4 · 4 −16 | 6 · 16 96 | 4 · 256 −1024 | 1 · 65536 65536 | | 64594 |
| 5 | 1 · 2 −2 | 5 · 4 20 | 10 · 16 −160 | 10 · 256 2560 | 5 · 65536 −327680 | 1 · 4294967296 4294967296 | 4294642034 |
Lily   💧 :
| 0 | 2 |
| 1 | 0 |
| 2 | 8 |
| 3 | 208 |
| 4 | 64376 |
| 5 | 4294577440 |
small :
triangle SmallSignedCedar    row sums SmallLotus (A003465)   🌊 :
| kn | 0 | 1 | 2 | 3 | 4 | 5 | sums |
| 0 | 1 · 1 1 | | | | | | 1 |
| 1 | 1 · 1 −1 | 1 · 2 2 | | | | | 1 |
| 2 | 1 · 1 1 | 2 · 2 −4 | 1 · 8 8 | | | | 5 |
| 3 | 1 · 1 −1 | 3 · 2 6 | 3 · 8 −24 | 1 · 128 128 | | | 109 |
| 4 | 1 · 1 1 | 4 · 2 −8 | 6 · 8 48 | 4 · 128 −512 | 1 · 32768 32768 | | 32297 |
| 5 | 1 · 1 −1 | 5 · 2 10 | 10 · 8 −80 | 10 · 128 1280 | 5 · 32768 −163840 | 1 · 2147483648 2147483648 | 2147321017 |
SmallLily   💧 :
| 0 | 1 |
| 1 | 0 |
| 2 | 4 |
| 3 | 104 |
| 4 | 32188 |
| 5 | 2147288720 |
sequences of Zhegalkin indices :
| a | ♀ | ♀ | ♀ | ♂ | ♂ | ♂ | all | all |
| a | 🌊 | 💧 | Ж | 🌊 | 💧 | Ж | 🌊 | 💧 |
| 0 | 1 | 1 | 0, | 1 | 1 | 1, | 2 | 2 |
| 1 | 1 | 0 | | 3 | 2 | 2, 3, | 4 | 2 |
| 2 | 3 | 2 | 6, 7, | 13 | 10 | 4, 5, 8, 9, 10, 11, 12, 13, 14, 15, | 16 | 12 |
| 3 | 97 | 94 | 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 66, 67, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 82, 83, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, | 159 | 146 | 16, 17, 32, 33, 34, 35, 48, 49, 50, 51, 64, 65, 68, 69, 80, 81, 84, 85, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, | 256 | 240 |
| 4 | 32199 | 32102 | 258, 259, 260, 261 ... 32764, 32765, 32766, 32767 | 33337 | 33178 | 256, 257, 512, 513 ... 21840, 21841, 21844, 21845, 32768, 32769, 32770, 32771 ... 65532, 65533, 65534, 65535 | 65536 | 65280 |

## honesty and gender

The XOR of all members of a family is either the tautology or the contradiction. Where it is the tautology, the BF shall be called honest. Apparently there are no dishonest males. So every dishonest BF is female, and every male BF is honest. (It should be kept in mind, that these are statements about Boolean functions. Generally, it is discouraged to assume, that all males are honest.)
sequences :
| | 0 | 1 | 2 | 3 | 4 |
| female | 1 | 1 | 3 | 97 | 32199 |
| dishonest female | 1 | 1 | 1 | 57 | 30537 |
| honest female | 0 | 0 | 2 | 40 | 1662 |
| honest male | 1 | 3 | 13 | 159 | 33337 |
| honest | 1 | 3 | 15 | 199 | 34999 |
| all | 2 | 4 | 16 | 256 | 65536 |
See triangles by weight, e.g. male, honest.
The following images show 3-ary Boolean functions. See also: Boolf prop/3-ary/honesty and gender, Boolf prop/3-ary/honesty, gender, sharpness, introversion The pattern of Zhegalkin indices for dishonest BF is similar to a Walsh matrix (with columns 3 and 7 exchanged). But that is specific to arity 3. So is the fact, that all non-trivial dishonest BF are balanced.