Classification of Boolean Functions where Affine Functions are Uniformly Distributed

Classification of Non-linear Boolean functions is a long-standing problem in the area of theoretical computer science. In this paper, effort has been made to achieve a systematic classification of all n-variable Boolean functions, where only one affine Boolean function belongs to each class. Two different methods are proposed to achieve this classification. The first method is a recursive procedure that uses the Cartesian product of sets starting from the set of 1-variable Boolean function and in the second method classification is achieved through a set of invariant bit positions with respect to an affine function belonging to that class. The invariant bit positions also provide information concerning the size and symmetry properties of the classes/sub-classes, such that the members of classes/sub-classes satisfy certain similar properties.


Introduction
The classification of Boolean functions having a representative in each class is meaningful for the following two reasons: first, equivalent functions in each class possess similar properties and second, the number of representatives is much less than the number of Boolean functions. In the past, two Boolean functions of n-variables are considered equivalent and belongs to the same logic family (or equivalence classes), if they differ only by permutation or complementation of their variables. The formula for counting the number of such equivalence classes is given in [2]. Further, given the class decomposition, how to select a representative assembly, with one member from each family is explained in [1]. The linear group and the affine Boolean function group of transformations are defined and an algorithm is proposed for counting the number of classes under both groups [3].The set of n-input functions is classified according to three criteria: the number of functions, the number of P classes and the number of NPN classes in [4]. Classification of the affine equivalence classes of cosets of the first order Reed-Muller code with respect to cryptographic properties such as correlation immunity, resiliency and propagation characteristics are discussed in [5].Three Variable Boolean functions in the name of 3-neighbourhood Cellular Automata rules are classified on the basis of Hamming distance with respect to linear rules [7]. The characterization of 3-variable non-linear Boolean functions in the name of 1-D cellular automata rules is under taken in three different ways by Boolean derivatives [6], by deviant states [7] and by matrices [8].
In this paper we propose two methods for generating equivalence classes of Boolean functions. The first one is a recursive approach to classify n-variable Boolean functions starting from 1-variable to higher variables. The second method, on keeping some of the bit positions fixed with respect to an affine Boolean function and varying other bit position in it generates exactly the same classes of n-variable Boolean functions.
The arrangement of the paper is as follows: in section 2, the literature of Boolean functions of different variables relevant to our work is reviewed; in section 3, the method of recursive classification of n-variable Boolean function is introduced and we discuss the properties of these classes. Based on these properties another efficient method proposed for generating the same classes of n-variable Boolean functions; in section 4, we studied the behavior of those classes by using different binary operations such as Hamming Distance, XOR operation and Carry value transformation(CVT); section 5 is the conclusion.

Relevant Review
An n-variable Boolean function ݂ ሺ‫ݔ‬ ଵ , ‫ݔ‬ ଶ , ‫ݔ‬ ଷ … ‫ݔ‬ ሻ is a mapping from the set of all possible n-bit strings denoted by ሼ0,1ሽ into the alphabet ሼ0,1ሽ . For n-variables the number of Boolean function is ଶ and it is also represented as the output column of its truth table denoted by݂ ோ , which is a binary string of length2 .݂ ோ is also known as the function number R in n -variable [9]. Where R is the decimal equivalent of the binary sequence (starting from bottom to top) of the function in the truth table and obeys the Wolfram's naming convention [11]. The compliment of ݂ ோ is denoted as݂ ோ തതതത .
A Boolean function of algebraic degree at most unity is called an affine Boolean function, the general form for n-variable affine function is Note that if f is a Boolean function in n-variable then ݂݂ ܽ݊݀ ݂݂ ҧ are Boolean functions of n+1-variable.
Theorem 1: f is linear if and only if ݂݂ ܽ݊݀ ݂݂ ҧ are linear. [9] That is Linear Boolean function concatenated with non-linear Boolean function is again Linear Boolean function provided the non-linear Boolean function is the complement with which it is concatenated and Linear Boolean function concatenated with itself is a linear Boolean function [9].Rest of all concatenations gives new non-linear Boolean functions. Proof: It can be proved on using Theorem 1 and the definition of affine Boolean function.

Proposed Methods of Classification of Boolean functions
In this section two different methods are proposed to classify the set of all possible n-variable Boolean functions of same cardinality and each class containing a single affine function.

A Recursive procedure to classify the n-variable Boolean function
Let ܵ ൌ ൛ሼሽ, ሼሽ, ሼሽ, ሼሽൟ be a set of all 1-variable Boolean functions, where all the Boolean functions are affine. Letܵ ′ ൌ ൛ሼሽ, ሼሽൟ be a set containing all linear Boolean functions of 1-variable and ܵ ′′ ൌ ൛ሼሽ, ሼሽൟ is a set that contains the complements of the set ܵ ′ .The Cartesian product of the sets ܵ with ܵ ′ and ܵ ′′ is defined as follows Note that S contains four classes each containing a 1-variable Boolean function where as the set ሺܵ ൈ ܵ ′ ሻ ‫‬ ሺܵ ൈ ܵ ′′ ሻcontains eight disjoint classes that exhaust all 2-variable Boolean functions and each class contains exactly one affine Boolean function which are highlighted. This process is repeated, that is ሺܵ ൈ ܵ ′ ሻ ‫‬ ሺ ܵ ൈ ܵ ′′ ሻnow becomes S, ሺܵ ൈ ܵ ′ ሻ becomes ܵ ′ and ሺ ܵ ൈ ܵ ′′ ሻ becomes ܵ ′′ for next higher variable. This recursive procedure, which repeated up to (n-1)times, classify the set off all nvariable Boolean functions into ା number of disjoint classes having a property that each class contains exactly one n-variable affine Boolean function along with some n-variable non linear Boolean functions.
And also each class contains exactly one nvariable affine Boolean function can be ascertained using Corollary 1 of section 2.

Illustration: (from 2-variable classes to 3-variable classes)
From equation 1 and 2 and using the above procedure now the set Boolean functions of 2-variable andܵ ᇱ ൌ ൛ሼ, 0010ሽ, ሼ1000, ሽ, ሼ, 1110ሽ, ሼ0100, ሽൟ is the first four classes of S andܵ ᇱᇱ ൌ ൛ሼ, 0001ሽ, ሼ1011, ሽ, ሼ, 1101ሽ, ሼ0111, ሽൟ is the set containing the rest classes of S which is the complements of the set ܵ ᇱ . Now the classes of 3-variable are calculated as follows: The naming of the classes are given as Class 1, Class 2,…, and Class ା such that the compliment of Class k is the Classሺ ݇ሻ ‫݇݁ݎ݄݁ݓ‬ Proof: From the beginning when n=1 the set ܵ ′ contains all even Boolean functions and the set ܵ ′′ contains all odd Boolean function and hence the recursive procedure using the Cartesian product also preserve the same properties.
Interestingly the relation defined in the recursive procedure is operating on the set of (n-1)-variable Boolean functions but the partitioned obtained in the set of n-variable Boolean functions. This motivates us to find out an equivalence relation on the set of n-variable Boolean functions which divides it into disjoint equivalence classes. where the values in those positions are same for the functions f and g" . Clearly, 2. If f R g then g R f , So, R is symmetric .
3. If f R g and g R h then f R h, So, R is transitive.
Hence, R is an equivalence relation.
The next procedure uses the above equivalence relation and generates the same classes efficiently in comparison with the recursive procedure of Section 3.1.

Procedure to generate the same class without using recursion
Let '݂ ' is an affine Boolean function of n-variable and B is an array which is used to keep the bit positions those are fixed for a Boolean function with respect to ݂ . The output array B can be calculated by invoking the following function in an algorithm whose worst case time complexity is Οሺ݊ሻ.

Fixed-bit-Positions
To get other non-linear Boolean functions in a class, one has to put all possible binary sequences of length

Different Operations in Classes
In this section, classes are divided into several sub-classes using the Hamming Distance (HD) between the Boolean functions and the affine function in that class. Also the classes are analysed on performing XOR and CVT operations among the functions of a class.

CVT Operation in Classes
Let ܽ ൌ ܽ , ܽ ିଵ , … , ܽ ଵ and ܾ ൌ ܾ , ܾ ିଵ , … , ܾ ଵ are two Boolean functions in Class. Then the Carry Value Transform (CVT) operation of a and b is defined in [10]as‫ܸܶܥ‬ሺܽ, ܾሻ ൌ ܽ ‫ٿ‬ ܾ , ܽ ିଵ ‫ٿ‬ ܾ ିଵ , … , ܽ ଵ ‫ר‬ ܾ ଵ , 0. Carry Value Transformation (CVT) is a kind of representation of n-variable Boolean functions and is used to produce many interesting patterns [10]. We observe that some interesting patterns are generated which are invariant for all classes of n-variable Boolean functions under CVT operation.

Conclusion and Future Endeavours
In this paper, the set of all possible n-variable Boolean functions are divided into disjoint equivalence classes of same size. The beauty of this classification is that each class contains exactly one affine Boolean function and all other non-affine functions. This classification where affine functions are uniformly distributed is achieved through two different procedures. The characteristics of the classes and the behaviour of those classes with respect to Hamming distance, XOR and CVT operations are studied.