Classification of bent functions by their weight

The weight_class module defines the weight_class function, which returns the weight class corresponding to a weight.

AUTHORS:

  • Paul Leopardi (2016-09-25): initial version

EXAMPLES:

sage: from boolean_cayley_graphs.weight_class import weight_class
sage: weight_class(4,1)
0
sage: weight_class(16,10)
1

REFERENCES:

Leopardi [Leo2017] Section 2.2.

boolean_cayley_graphs.weight_class.weight_class(length, weight)[source]

Return the weight class corresponding to a given length and weight.

The length is the length of the truth table of a Boolean function. The weight is the Hamming weight of the Boolean function.

INPUT:

  • length – positive integer:

  • weight – positive integer: the given Hamming weight.

OUTPUT:

An integer representing the weight class corresponding to length and weight.

EXAMPLES:

sage: from boolean_cayley_graphs.weight_class import weight_class
sage: weight_class(4,1)
0
sage: weight_class(16,10)
1
sage: weight_class(16,6)
0
sage: weight_class(64,36)
1
sage: weight_class(63,37)
1
sage: weight_class(65,35)
0

Note

The weight class really only makes sense for bent functions, for which the weight class is either 0 or 1 [Leo2017].

REFERENCES:

Leopardi [Leo2017] Section 2.2.