Jump to content

Zhegalkin matrix

From Wikiversity
Studies of Boolean functions
Ж
ANF   matrix   twins
noble   gentle
smallest Zhegalkin index

The Zhegalkin matrix is an infinite binary matrix.

It is closely related to the infinite integer matrix of Gray code permutation powers (Sloane'sA195467) and to the algebraic normal form (ANF) of Boolean functions.
(Ivan Zhegalkin was the inventor of the ANF. The naming choices made here are new.)

Its colums are the truth tables of all Boolean functions. The column index is the Zhegalkin index of the respective Boolean function.

Its rows are a subset of the Walsh functions, namely the XORs of atoms forming a Sierpiński triangle (Sloane'sA001317).

The columns of the 8×256 Zhegalkin matrix are the truth tables of the 256 3-ary Boolean functions.
The 8×256 matrix above are the colum indices in little-endian binary. On the left are the Sierpiński triangle and the row indices.


Zhegalkin permutation

[edit | edit source]
sizes of finite Zhegalkin matrices
0 1 2 3 4
1×2 2×4 4×16 8×256 16×65536

For arity the map from ANFs to truth tables gives a finite Zhegalkin matrix of size . (It is the top left corner of the infinite matrix.)

It can be interpreted as a permutation of the integers , which shall be called Zhegalkin permutation .
Keys and values in Πn shall be called Zhegalkin twins — e.g. 7 and 9 are Zhegalkin twins for arity 2.

It is a self-inverse Walsh permutation of degree 2n. The corresponding element of GL(2n, 2) is the lower Sierpiński triangle.
Π2 is a Walsh permutation of degree 4, and permutes the integers 0 ... 15. The corresponding element of GL(4, 2) is the 4×4 lower Sierpiński triangle.

         Sloane'sA197819

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

In a finite Zhegalkin matrix, the columns with even/odd weight are in the left/right half.   (A truth table has a Zhegalkin twin with odd weight, iff its last digit is true.)
Boolean functions whose Zhegalkin index has even/odd weight shall be called evil/odious, which shall be called its depravity.


fixed points

[edit | edit source]
number of fixed points
1 2 3 4 5
2 4 16 256 65536

The fixed points of Zhegalkin permutations correspond to noble Boolean functions.

         Sloane'sA358167
     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 


Python code

[edit | edit source]