Noble Boolean functions
Studies of Boolean functions |
ANF matrix twins |
noble gentle |
smallest Zhegalkin index |
Noble Boolean functions are those who are their own Zhegalkin twins, i.e. the binary expression of their ANF is equal to their truth table.
They correspond to fixed points in the Zhegalkin permutation.
They are all even, i.e. the first digit of their truth table is false.
When a Boolean function is noble, its whole faction is noble.
Within the this project it is slightly misleading to apply the term noble to Boolean functions. It is a property of a truth table with a specific length.
A197819 | ||
---|---|---|
Fixed points are in parentheses. k 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 n 0 (0) (1) 1 (0) 3 (2) 1 2 (0) 15 10 5 12 3 (6) 9 (8) 7 2 13 4 11 (14) 1
|
A358167 | ||
---|---|---|
k 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
n
0 0
1 0 2
2 0 6 8 14
3 0 30 40 54 72 86 96 126 128 158 168 182 200 214 224 254
|
3-ary nobles (Venn diagrams) assigned to juniors (tesseract vertices) |
---|
3-ary and 4-ary nobles assigned to juniors (in square matrices) | ||
---|---|---|
These matrices show the 2-ary and 3-ary Boolean functions, represented by the big gray integers (corresponding to the truth tables). |
illustration of fixed points in permutation |
---|
as 8×16 matrix as 16×256 matrix |
---|
The images show how is derived from , the permutation of the same length.
The small matrices on the left are divided in the same way: These properties of noble Boolean functions can be derived from this:
|
row sums of | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
The row sum of for is
with and . E.g. that of is 0 + 6 + 8 + 14 = 28. (11100 as a binary number.)
|
quadrants
editIt is easily seen, that the left and right half of each row differ only in the last digit.
Those on the left/right have even/odd weight. They shall be called evil/odious.
half rows |
---|
There are two ways to derive one half from the other. Let be the left (evil) and be the right (odious) half. Then . (Bitwise XOR can be used instead of plus and minus.) The following Python code illustrates this for rows 1 to 3: left_and_right_half = {
1: [
[0],
[2]
],
2: [
[0, 6],
[8, 14]
],
3: [
[ 0, 30, 40, 54, 72, 86, 96, 126],
[128, 158, 168, 182, 200, 214, 224, 254]
]
}
for n, (left, right) in left_and_right_half.items():
length = 2 ** (2 ** (n - 1) - 1)
p = 2 ** (2 ** n - 1)
q = 2 ** (2 ** n) - 2
for i in range(length):
j = length - i - 1
assert right[i] == left[i] + p == q - left[j]
assert right[i] == left[i] ^ p == q ^ left[j]
|
There is a second way to partition the nobles in two halves:
Those in even/odd places of the triangle row have false/true entries in all 1-bit places of their truth table. They shall be called weak/strong.
So the nobles can be partitioned into four quadrants by depravity and strength.
illustration of quadrants for n = 3 |
---|
Vertically adjacent quadrants contain relative complements. Horizontally adjacent quadrants differ only in the central vertex. The 16 noble 3-ary Boolean functions form 8 factions. So there are 2 royal factions. |
Nobles that are evil and weak shall be called royal.
Each noble corresponds to a royal, and can easily be derived from it. (A royal corresponds to itself.)
When a Boolean function is royal, its whole faction is royal.
The function with the smallest Zhegalkin index in a faction shall be called king, and be used to represent it.
So all nobles of a given arity can effectively be represented by a rather short list of kings.
triangle of royals | ||||
---|---|---|---|---|
|
triangle of kings | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
Number of royal factions for arities 0...5: 1, 1, 1, 2, 11, 272
Finding the next row would require looping through the (slightly more than a billion) 6-ary royal Boolean functions.
|
representatives of 4-ary noble factions | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
The top left corner in each 2×2 matrix is a king. The other corners are its equivalents in the other quadrants. The two tables below correspond to the image above. The one on the left shows the same numbers as the image.
The black integers are Zhegalkin indices. The gray numbers below are their noble indices, i.e. the positions in the sequence of nobles. |
4-ary kings |
---|
group under exclusive or
editWith XOR as a group operation the n-ary noble and royal Boolean functions form a power of the cyclic group C2.
Python example |
---|
The 3-ary nobles form the group C24. The Python operator nobles = [0, 30, 40, 54, 72, 86, 96, 126, 128, 158, 168, 182, 200, 214, 224, 254]
for i, a in enumerate(nobles):
for j, b in enumerate(nobles):
assert nobles.index(a ^ b) == i ^ j
This works for any row of the noble triangle , or from the royal triangle. (But not from the triangle of kings.) |
patrons
editThe XOR of twins is noble, i.e. the XOR of a key and a value in is an entry of .
For a Boolean function this means, that the XOR of its ANF and its truth table is a noble Boolean function, which shall be called its patron.
The patron of a noble is the contradiction.
k 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 n 0 0 0 1 0 2 0 2 2 0 14 8 6 8 6 0 14 0 14 8 6 8 6 0 14
|
For the entries in are repetitions of those in . E.g. contains the entries , each repeated four times.
The set of places where has entries can be calculated by XORing with the entries of .
3-ary Boolean functions with patron 168
edit
Let (length 16),
(length 16) and
(length 256). is the left column of the following matrix. Example: In which places is equal to ?
|
faction clusters with patron 168 | ||||
---|---|---|---|---|
|
positions in matrix |
---|