Noble Boolean functions
Template:Boolf header
Template:Zhegalkin stuff
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 Template:W 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.
Template:Zhegalkin matrix/Triangle Pi
Template:Zhegalkin matrix/Triangle Phi
Template:Collapsible START
Template:Collapsible END
Template:Collapsible START
These matrices show the 2-ary and 3-ary Boolean functions, represented by the big gray integers (corresponding to the truth tables).
The small black integers above them are the senior nobles (i.e. one arity above).
(The highlighted big numbers are the king indices.)
Template:Collapsible START File:Zhegalkin 256; fixed.svg Template:Collapsible END


Template:Clear
The images show how is derived from , the permutation of the same length.
The long matrices have two halves:
In the upper half the bit pattern in column is that of .
(Compare triangle Ξ in the next section.)
The bit pattern in the lower half is identical to that of the gray column indices.
The small matrices on the left are divided in the same way:
The upper half is a Sierpiński triangle without the main diagonal, and the lower half is the main diagonal.
These properties of noble Boolean functions can be derived from this:
- They are even, i.e. place 0 is always false.
- The 1-bit places (e.g. 1, 2, 4, 8) have the same truth value. (Those where it is false/true shall be called weak/strong.)
- Half of them are evil/odious, which is indicated by the last place being false/true. (The odious ones are on the right, just like in triangle Π.)
Template:Collapsible START
The row sum of for is
with and .
That is a binary number consisting of 0s at the little and 1s at the big end.
E.g. that of is 0 + 6 + 8 + 14 = 28. (11100 as a binary number.)
| n | sum of row n | |
|---|---|---|
| 0 | 1 | |
| 1 | 2 | |
| 2 | 28 | |
| 3 | 2032 | |
| 4 | 8388352 | |
| 5 | 140737488289792 | |
quadrants
It 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.
There are two ways to derive one half from the other.
Let be the left (evil) and be the right (odious) half.
Let be the unique power of two, and be the highest entry. (They are the first and last entries of .)
Let be the mirrored index of . ( is as far from the right as is from the left.)
Then . Template:Spaces (Template:W 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.
Template:Collapsible START
Vertically adjacent quadrants contain relative complements. Horizontally adjacent quadrants differ only in the central vertex.
(40 and 214 are relative complements. 40 and 168 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.
Template:Noble Boolean functions/royal triangle
Template:Collapsible START
The columns of this matrix are the 4-ary royal Boolean functions.
Error creating thumbnail:
Compare as 16×256 matrix, shown above.
The 16×6 matrix on the left is shown as the 16×8 matrix from that file, with the left and right column blacked out.
Template:Collapsible END
<templatestyles src="Zhegalkin matrix/triangle.css" />
| triangle of kings | ||||
|---|---|---|---|---|
|
Number of royal factions for arities 0...5: Template:Spaces 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. |
Template:Collapsible START Error creating thumbnail:
The top left corner in each 2×2 matrix is a king. The other corners are its equivalents in the other quadrants.
(Vertically adjacent quadrants contain relative complements. Horizontally adjacent quadrants differ only in the central vertex.)
The two tables below correspond to the image above. The one on the left shows the same numbers as the image.
The one on the right shows the smallest Zhegalkin index for each of the 44 factions. (They differ only for the odd factions, i.e. those with green and blue background.)
| Template:Noble reps/outer/match | Template:Noble reps/outer/minimal |
The black integers are Zhegalkin indices. The gray numbers below are their noble indices, i.e. the positions in the sequence of nobles.
The beige numbers in the image are faction sizes, i.e. the number of different permutations of the example shown.
Template:Collapsible END
Template:Collapsible START Error creating thumbnail: Template:Collapsible END
group under exclusive or
With XOR as a group operation the n-ary noble and royal Boolean functions form a power of the Template:W C2.
Template:Collapsible START The 3-ary nobles form the group C24.
The Python operator ^ represents the Template:W.
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.) Template:Collapsible END
patrons
The 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.
<templatestyles src="Zhegalkin matrix/triangle.css" />
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
<templatestyles src="Zhegalkin matrix/matrix pi xor phi.css" />
Template:Collapsible START
Let (length 16),
(length 16) and
(length 256).
Let be the set of places where has the entry .
is the left column of the following matrix.
is its top row, and also shown in the column to its right.
The matrix entries are the bitwise XORs of its left column and top row.
is row as a set of numbers:
Example: In which places is equal to ?
It can be easily seen, that the first and the last entry 168 in is in places 2 and 252.
| 0 | 0 | 30 | 40 | 54 | 72 | 86 | 96 | 126 | 128 | 158 | 168 | 182 | 200 | 214 | 224 | 254 | 0 | |
| 1 | 15 | 17 | 39 | 57 | 71 | 89 | 111 | 113 | 143 | 145 | 167 | 185 | 199 | 217 | 239 | 241 | 30 | |
| 2 | 10 | 20 | 34 | 60 | 66 | 92 | 106 | 116 | 138 | 148 | 162 | 188 | 194 | 220 | 234 | 244 | 40 | |
| 3 | 5 | 27 | 45 | 51 | 77 | 83 | 101 | 123 | 133 | 155 | 173 | 179 | 205 | 211 | 229 | 251 | 54 | |
| 4 | 12 | 18 | 36 | 58 | 68 | 90 | 108 | 114 | 140 | 146 | 164 | 186 | 196 | 218 | 236 | 242 | 72 | |
| 5 | 3 | 29 | 43 | 53 | 75 | 85 | 99 | 125 | 131 | 157 | 171 | 181 | 203 | 213 | 227 | 253 | 86 | |
| 6 | 6 | 24 | 46 | 48 | 78 | 80 | 102 | 120 | 134 | 152 | 174 | 176 | 206 | 208 | 230 | 248 | 96 | |
| 7 | 9 | 23 | 33 | 63 | 65 | 95 | 105 | 119 | 137 | 151 | 161 | 191 | 193 | 223 | 233 | 247 | 126 | |
| 8 | 8 | 22 | 32 | 62 | 64 | 94 | 104 | 118 | 136 | 150 | 160 | 190 | 192 | 222 | 232 | 246 | 128 | |
| 9 | 7 | 25 | 47 | 49 | 79 | 81 | 103 | 121 | 135 | 153 | 175 | 177 | 207 | 209 | 231 | 249 | 158 | |
| 10 | 2 | 28 | 42 | 52 | 74 | 84 | 98 | 124 | 130 | 156 | 170 | 180 | 202 | 212 | 226 | 252 | 168 | |
| 11 | 13 | 19 | 37 | 59 | 69 | 91 | 109 | 115 | 141 | 147 | 165 | 187 | 197 | 219 | 237 | 243 | 182 | |
| 12 | 4 | 26 | 44 | 50 | 76 | 82 | 100 | 122 | 132 | 154 | 172 | 178 | 204 | 210 | 228 | 250 | 200 | |
| 13 | 11 | 21 | 35 | 61 | 67 | 93 | 107 | 117 | 139 | 149 | 163 | 189 | 195 | 221 | 235 | 245 | 214 | |
| 14 | 14 | 16 | 38 | 56 | 70 | 88 | 110 | 112 | 142 | 144 | 166 | 184 | 198 | 216 | 238 | 240 | 224 | |
| 15 | 1 | 31 | 41 | 55 | 73 | 87 | 97 | 127 | 129 | 159 | 169 | 183 | 201 | 215 | 225 | 255 | 254 |

The one above contains the Zhegalkin indices, and has the same set of columns.

Template:Zhegalkin matrix/clusters with patron 168
(This is the transpose of Zhegalkin indices with quaestor 3.)
