Nonlinearity of Boolean functions

Studies of Boolean functions

The nonlinearity of a Boolean function measures how far it is from being a linear Boolean function.
It is the smallest Hamming distance of its truth table to that of a linear.
As an integer it is a soft property (i.e. dependent on arity). But it can be easily defined as a fraction, which is a hard property.

arity ,     soft nonlinearity ,     hard nonlinearity

Let . The highest nonlinearity for arity is .
A Boolean function with nonlinearity is a bent function. They exist when is an integer, i.e. for even .

arity nonlinearity total sequence
0 1 2 3 4 5 6
1 4 4
2 8 8 16
3 16 128 112 256 A207676
4 32 512 3840 17920 28000 14336 896 65536 A207328

nonlinearity

Zhegalkin deviation

edit

The terminology used here is likely to be changed again.

Each BF can be assigned a Zhegalkin index – a unique integer, independent of arity.
Its binary exponents shall be called Zhegalkin exponents. For Walsh functions they are only powers of two (see here). For negated Walsh functions also 0.
Here is a way to define a different kind of Hamming distance from linears:
The Zhegalkin exponents of the BF are split into those that are 0 or powers of two, and those that are not.
So one BF is split in two BF, which shall be called its Zhegalkin linear and deviation.
The Zhegalkin weight of the deviation (the number of Zhegalkin exponents that are not 0 or powers of two) is also a degree, to which the BF is not linear.

Zhegalkin linear (reverse prefect)      Z.l. signed weight (reverse prefect signed weight)

Zhegalkin deviation (twin prefect)      Z.d. faction (twin prefect signed weight)      Z.d. weight      Z.d. patron      Z.d. is odious

reverse and twin prefect signed weight