1.
Introduction
For every nonnegative integers r,n such that r≤n, the Reed-Muller code RM(r,n) of length* N=2n and order r equals the vector space over F2 of n-variable Boolean functions of algebraic degree at most r. Recall that each n-variable Boolean function f:Fn2↦F2 admits a representation in the form of a multivariate polynomial over F2 of a particular shape:
*Usually in coding theory, the length of a code is denoted by n, but since we deal with Boolean functions, we keep n for the number of variables; we denote then the length by N.
(the sum being calculated modulo 2). Such representation is unique for each function and is called its algebraic normal form (ANF). The global degree max{|I|;aI=1} of the ANF is called the algebraic degree of f.
For a binary block code needing to be a subset of FN2 for some N, each Boolean function is identified with the list of its N=2n values, some order on Fn2 being previously chosen. When we shall speak of codewords of Reed-Muller codes, we will not make the difference between an n-variable Boolean function and the corresponding vector of length N.
Reed-Muller codes were introduced in 1954 by David Muller in [27] and their decoding algorithm was given the same year by Irving Reed in [29]. These codes have originally played an important role in the theory of error correcting codes, as well as in their applications. It is well known that the Reed-Muller code RM(1,5) was used in the sixties for correcting the errors of transmission of the first photographs of Mars by Mariner. These photographs were in black and white. Every codeword corresponded to the level of brightness of a pixel. There were 64 different levels since there are 64 codewords in RM(1,5), and the minimum distance of this code was equal to 16, with up to ⌊16−12⌋=7 errors that could be corrected in the transmission of each codeword†.
†In the late seventies, for transmitting color photographs of Mars, Voyager used the extended binary Golay code and still later Reed-Solomon codes
Reed-Muller codes were also used in the 3rd generation (3G) of mobile phones (starting in 2000). Reed-Muller codes intervened in the initial "handshake'' between the mobile device and the base station, whose role was to inform the receiver of what type of communication would come next. Again, RM(1,5) was initially used for this purpose, and it was later replaced by a punctured subcode of the second-order Reed-Muller code RM(2,5), which had a dimension of 10 and a minimum distance of 12.
The parameters of Reed-Muller codes are not so good, except for the first order, but they contain optimal codes such as the Kerdock codes [19]. They still play an important role nowadays, thanks to their specific properties (see, e.g., [2,13]) and their roles with respect to new problematics, such as locally correctable codes [20]), low degree testing, private information retrieval, and compressed sensing. The interest in Reed-Muller codes has also been renewed because of polarization (see, e.g., [24]). At various block-lengths and rates, Reed-Muller codes can be superior to polar codes [25], even for 5G [14]. A nice survey on Reed-Muller codes can be found in [1].
We can easily generate the ANF (1.1) of (infinite classes of) codewords in any Reed-Muller codes, but in most cases, it is impossible to calculate (mathematically) their Hamming weight wH(f)=|{x∈Fn2;f(x)=1}|.
Determining Hamming weights (if possible, all weights of codewords, and, if possible, the whole weight distribution) in Reed-Muller codes has always been considered very important; see, e.g., the papers [4,5,7,12,15,16,17,18,23,26,30], the data in [31], and the books [22,28]. The weight distributions of the Reed-Muller codes of length 2n and orders 0,1,2,n−2,n−1,n are known. The weights in these codes equal 0,2n for the order 0, with additionally 2n−1 for the order 1, and 2n−1±2i where n2≤i≤n for the order 2; see, e.g., [22]. The weights in RM(n,n) are all integers between 0 and 2n since RM(n,n)=F2n2; the weights in RM(n−1,n) are all even integers between 0 and 2n; the weights in RM(n−2,n) are all even integers between 0 and 2n except 2 and 2n−2. For all these codes, the weight distributions are known (thanks to the Mac Williams identity for the orders n−2,n−1 [21,22], since the dual of RM(r,n) equals RM(n−r−1,n)). The weight distributions of some Reed-Muller codes RM(r,m) have been determined thanks to heavy computations, for m small enough; they are reported in [31].
The weights in RM(n−3,n) have been recently determined in [12]. They are all even integers in {0,2,4,...,2n}∖{2,4,6,10,2n−10,2n−6,2n−4,2n−2}={0,8,12+2i,2n−12,2n−8,2n}, where i ranges over consecutive integers from 0 to 2n−1−13. They have been obtained by an induction (the Mac Williams identity does not allow us to determine the weight distribution, which is still unknown despite the fact that the weight distribution of RM(2,m) is known, because the expression of the number of codewords of Hamming weight 2n−1 in RM(2,n) is too complex). This induction does not allow us to determine the weight distribution, and new ideas to be found seem necessary for obtaining it. However, determining the weight spectrum‡ of RM(n−3,n) is already a step forward.
‡In coding theory, contrary to Boolean function theory, the spectrum does not include the multiplicities of the values (when these multiplicities are taken into account, we speak of weight distribution).
The same method worked for determining the weights in RM(n−4,n) [12], which are all integers in {0,16,24,28+2i,2n−28,2n−24,2n−16,2n}, where i ranges over the set of consecutive integers from 0 to 2n−1−29. The weights in RM(n−5,n) could not be determined in [12], but they were found in [9]; they are all integers in {0,32,48,56,60,62,64,68,72+2i, 2n−68,2n−64,2n−62,2n−60,2n−56,2n−48,2n−32,2n}, where i ranges over the set of consecutive integers from 0 to 2n−1−72.
For general Reed-Muller codes, bounds are known on the weight enumerators, which are useful for studying the capacity of Reed-Muller codes on the binary erasure channel and the binary symmetric channel (see [1, Chapter 4]), but our knowledge on the weights themselves is limited.
McEliece's theorem [23] shows that the weights in RM(r,n) are divisible by 2⌊n−1r⌋, and Kasami-Tokura's result (that we shall recall in Section 2) and Kasami-Tokura-Azumi's results [17] give the weights of RM(r,n), which are between the minimum distance d=2m−r and 2.5 times d. It is conjectured in [12] that for every constant c and for n large enough, the weight spectrum of RM(n−c,n) is made of 0 and 2n and all the weights between the minimum distance 2c and its complement to the length 2n, which are authorized by McEliece's theorem and Kasami-Tokura-Azumi's results. This means, in particular, that every even number between 2.5 times the minimum distance and its complement to 2m would be a weight in RM(m−c,m). This conjecture§ is verified by the weight spectra of RM(n−5,n),RM(n−4,n) and RM(n−3,n). The method used in [9,12] for handling these three weight spectra is the same: There is a corollary in [30], which can easily be proved directly, and which says that the weight spectrum of RM(r,n) includes A+A, where A is the weight spectrum of RM(r−1,n−1). This allows us to address the weight spectrum of RM(n−c,n) by an induction on n, starting from a value n0 such that the weight spectrum of RM(n0−c,n0) is already generic, which means that it has, according to McEliece's theorem, a divisibility by 2 and not by a larger power of 2. This means that we need to start from n0≥2c. Indeed, according to McEliece's theorem, all the weights in RM(c−1,2c−1) are divisible by 4, while those in RM(c,2c) are divisible by 2. We know from [6] that McEliece's divisibility bound is tight in the sense that there is at least a codeword in every RM(r,n) code, with a weight congruent to 2⌊n−1r⌋ modulo 2⌊n−1r⌋+1. We can try to see whether the weights obtained from A+A, where A is the weight spectrum of RM(c,2c), allow us to reach all the weights authorized by McEliece's theorem and Kasami-Tokura-Azumi's result. The first difficulty is then to reach all weights in RM(c,2c). In the case of c=3,4, this has been rather easy, but proving the conjecture recalled above for c=5 with this method, which needs to start the induction with n=10 (a value much larger than what can be reached with the heavy computations made by M. Terada, J. Asatani, and T. Koumoto and reported in [31]), has led to the construction of functions in 10 variables with an algebraic degree of at most 5 and having all possible even weights between 2.5 times the minimum distance 32, that is, 80 and 210−80. The next step c=6 needs to address the code RM(6,12), which has huge parameters [4096,2510], while the largest reached currently are [512,256] and [512,382]). It is shown in [9] how determining the weight spectrum of RM(6,12) needs to determine whether some specific values (such as 166), which are "holes" after general methods were applied, are the weights of codewords. This may not be as hard as expected for c=6, but addressing larger values of c will probably lead to more of such "holes". Hence, being able to build as many weights as possible in Reed-Muller codes is of a great importance, and in particular, reaching weights that are not obtained by classic constructions.
§It seems a little risky to present this as a conjecture and in [9], it is then presented as an open question.
Providing weights can indeed be tried by investigating the known (primary and secondary) constructions of Boolean functions and deducing functions whose weight can be determined, as was done in [9]. Some weights are easily reached this way, but we can expect that these constructions will not suffice for addressing the weights in RM(n−c,n) for larger values of c.
Note that the codes RM(n−c,n) considered above, being such that n≥2c, are of the form RM(r,n) with n≥2(n−r), that is, r≥n2. Another case where more weights in Reed-Muller codes RM(r,n) are useful information is when r<n2.
Recall that when Boolean functions in n variables are given, for instance, by their ANF, with n ranging over N, it is rarely possible to mathematically evaluate their Hamming weights. Of course, it is always possible when the function is affine (belonging then to the Reed-Muller code of order 1), but this provides only three weights for each n. When the function is taken quadratic (i.e., belonging to the second-order Reed-Muller code), there are methods for determining its weight (see a survey in [8, Chapter 4]). However, these methods allow us to concretely address only a few cases (even the first step, which consists of determining the linear kernel of the function, is impossible to complete systematically). The weights of quadratic functions are very specific. The indicators of affine spaces (flats) are also addressable, but their weights are minimal in the Reed-Muller codes to which they belong. It needs specific work to study the weights of Boolean functions obtained by the constructions evoked above, and we shall describe in Section 2, as nothing automatic exists.
The problem we want to address in this paper is not as hard as determining the weight of any given Boolean function: We only want to find as many weights as possible in general Reed-Muller codes. However, it is not so easy to provide codewords of Reed-Muller codes whose weights can be determined.
For finding more weights, methods complementary to the usual constructions are needed. In the present paper, we give such a method to automatically generate codewords in Reed-Muller codes of any lengths 2n. These codewords depend on the number of variables n, the order r, a parameter t, and the choice of t vectors ai. We have, thanks to a property of the corresponding functions, an upper bound on their algebraic degree (but determining the degree exactly would be difficult, and even trying to directly show this upper bound by working on the ANF of the functions seems quite hard). The weights of these functions can be evaluated or at least bounded from above, because when these Boolean functions are given as the sums (modulo 2) of atomic ones, the only limitation for evaluating their weights is to determine the number of these atomic functions which appear an odd number of times in the expression.
There is a case (when the vectors ai involved in the construction are linearly independent) where we can ensure that all these atomic functions are distinct, which allows us to exactly calculate the Hamming weight. This provides information on the weight spectra of Reed-Muller codes when they are unknown (that is, currently, for the orders from 3 to n−6). For instance, we shall see in the tables provided that our method gives weights in RM(r,n) that are much larger than twice the minimum distance and have low valuation.
The case mentioned above, where the vectors ai are linearly independent, provides at most n2 distinct weights for each Reed-Muller code, and this is not much. We then investigate two cases where the vectors are linearly dependent. We do not cover all the cases where the vectors are linearly dependent (it seems impossible to do so), but other cases could be similarly investigated.
We also study the weights of the sums of the designed functions, in a case where we know they have disjoint supports. This provides many more weights.
The paper is structured as follows. In Section 2, we recall the state of the art in the determination of weights in Reed-Muller codes by using the classic constructions (Maiorana-McFarland, etc.). We show the difficulties presented by this method and why it suits better for low orders. In Section 3, we introduce our new construction of Reed-Muller codewords and we study some particular cases. We determine the weights under a condition that is rather general (namely, some vectors ai involved in the construction are linearly independent), and we also study two cases where this condition is not satisfied; this provides a list of weights for each Reed-Muller code, which is longer for larger orders. We then show that more weights - a huge number when the order is large enough - can be obtained as the additions of some of these weights. To conclude this section, we determine the ANF of the constructed functions when the vectors ai are linearly independent. We conclude with some observations on future work.
2.
State of the art on the Hamming weights of Reed-Muller codewords
It is well-known that the minimum nonzero Hamming weight of RM(r,n) equals 2n−r (see [22, Chapter 13], and see [8, Chapter 4] for a more direct proof), and that the nonzero minimum weight codewords in this code are the indicators of the (n−r)-dimensional affine subspaces of Fn2.
All the low Hamming weights are known in all Reed-Muller codes, and there are very few: Berlekamp and Sloane [4] (see the Addendum in this paper) and Kasami and Tokura [16] have shown that, for r≥2, the only Hamming weights in RM(r,n) occurring in the range [2n−r;2n−r+1[ are of the form 2n−r+1−2n−r+1−i, where we have i≤max(min(n−r,r),n−r+22). The latter has completely characterized the codewords: The corresponding functions are affinely equivalent either to x1⋯xr−2(xr−1xr+xr+1xr+2+⋯+xr+2l−3xr+2l−2), 2≤2l≤n−r+2, or to x1⋯xr−l(xr−l+1⋯xr+xr+1⋯xr+l), 3≤l≤min(r,n−r). The functions whose Hamming weights are strictly less than 2.5 times the minimum distance 2n−r have later been studied in [17].
Recall that, on the contrary, the general weights in RM(r,n) can be rather diverse, as soon as r≥3 and n is large enough. Indeed, as shown in [7], for every Boolean function f on Fn2, there exist an integer m and a Boolean function g of an algebraic degree of at most 3 on Fn+2m2, such that ∑x∈Fn+2m2(−1)g(x)=2m∑x∈Fn2(−1)f(x), which gives the following relation between the Hamming weights of f and g: 2n+2m−2wH(g)=2m(2n−2wH(f)). Hence, the Hamming weight of f is related in a simple way to the Hamming weight of a cubic function (in a number of variables which can be exponentially larger). This shows that the weights in RM(3,n) (that is, the distances) can be complex, contrary to those in RM(2,n). Unfortunately, this result does not provide an efficient method for finding weights in third-order Reed-Muller codes: Trying to find new weights in these codes by starting with Boolean functions f of any degree in less variables and applying the result does not work well, because m in this result is exponentially large compared to n.
The possible weights of the codewords in the Reed-Muller codes of orders 3,…,n−6 whose values lie between 2.5d and 2n−2.5d are unknown¶, except for some functions that we shall describe, and which hardly allow to provide non-peculiar weights for general Reed-Muller codes:
¶But when n=2r+1, they are known in some cases by using invariant theory, because the code is then self-dual, see [22,28]).
● Quadratic functions, in the form f(x)=l1(x)l2(x)+l3(x)l4(x)+⋯+l2k−1(x)l2k(x)+l2k+1(x), possibly added with constant 1 (that is, complemented), when we are able to ensure that the linear functions l1,…,l2k are linearly independent. Then f equals the function x1x2+⋯+x2k−1x2k composed on the right by a linear or an affine automorphism (we say that such a function is linearly, respectively affine, equivalent to x1x2+⋯+x2k−1x2k), added with an affine function (we say then that the function is extended affine equivalent to x1x2+⋯+x2k−1x2k; see more on equivalences in [8, Chapter 2]), and we can evaluate its Hamming weight. This provides weights 0,2n−1,2n−1±2i, where i=⌈n2⌉, 2n, which are all weights in RM(2,n) (all being easy to produce), but are rather peculiar in the larger Reed-Muller codes. We can also calculate the weights of the concatenations of such functions, of course, whose weights are a little more general (but the algebraic degree needs to then be determined).
● Indicators of flats (and their concatenations as well), that is, minimum nonzero weight codewords in Reed-Muller codes (see [22, Chapter 13]), in the form ∏i∈I(ai⋅x+ϵi), where ai∈Fn2, ϵi∈F2, when we are able to ensure that the vectors ai are linearly independent. This provides weights 2i, where i=0,…,n, which are also easy to produce but are peculiar, too. Note that this class of functions is (as the previous one) preserved by affine equivalence.
● Functions whose weight is smaller than twice-and-a-half the minimum distance d of the Reed-Muller codes to which they belong. We have recalled above what these weights are when they are smaller than 2d; between 2d and 2.5d, the weights (determined in [17]) are too numerous for being recalled here; They are easy to produce but we encounter the same difficulty as for quadratic functions if we want to exhibit all functions with such weights: We know that they are affine equivalent to some particular functions, but ensuring such affine equivalence is not mathematically possible in an exhaustive way. Anyway, this strong result by Kasami, Tokura, and Azumi allows us to reach in Reed-Muller codes all weights smaller than 2.5 times the minimum distance (and their complements to 2n). The question is then to find as many other weights as possible.
● Some functions obtained by using the classic primary constructions of Boolean functions, in particular, Maiorana-McFarland, Niho, and PSap-like constructions; see [8, Chapter 4]. This allows us to reach some weights, but numerous subclasses of functions have to be separately investigated for allowing us to cover enough weights. Finding the weights that are reachable often poses technical issues, to be overcome for each subclass, such as solving equations, which can be done in some cases but not in general. To give an example, the weights of those particular Maiorana-McFarland functions of the form f(x,y)=x⋅ϕ(y), where x∈Ft2,y∈Fn−t2, ϕ is a function from Fn−t2 to Ft2, and "⋅" is an inner product, are deduced from the relation ∑(x,y)∈Fn2(−1)f(x,y)=2n−2wH(f)=2t|ϕ−1(0)|, which theoretically makes the study of the weights of these particular functions simpler. However, this replaces the difficulty of determining the weights of the functions having algebraic degrees of at most r by that of determining the possible values of the size |ϕ−1(0)| when ϕ has an algebraic degree of at most r−1, that is, when all its coordinate functions have algebraic degrees of at most r−1. This latter problem, which is interesting to study for its own sake, may be hard since it results in determining the possible numbers of solutions of nonlinear systems of equations. Denoting the coordinate functions of ϕ by ϕ1,…,ϕt, the solutions of the equation ϕ(y)=0 are the elements of the support of the Boolean function ∏ti=1(ϕi(y)+1), which has an algebraic degree of at most t(r−1). In the case t=1, we only get that the weights in RM(r−1,n−1) are also weights in RM(r,n) (which is clear since, denoting xi=yi−1 for i=2,…,n, the n-variable function x1g(x2,…,xn) has the same Hamming weight as the (n−1)-variable function g), and as soon as t≥2, the situation becomes complex. For instance, for r=3 and t=2, we will arrive in general to the determination of the support of a function of degree 4, which instead of reducing the degree, increases it. Moreover, the weights that are easier to obtain correspond to a large value of t and are then not quite general, since they have a valuation of at least t. The same kind of situation happens with the general Maiorana-McFarland, Niho, and PSap-like constructions. Hence, even if it is possible to try using these classic constructions to reach weights in Reed-Muller codes, it is necessary, for reaching many weights, to have other approaches posing less problems; this is the purpose of the present paper.
● Direct sums of monomials and threshold functions (see a complete study of the cryptographic parameters of these functions in [10]). These are two cases where we can give the Hamming weights. The character sum ∑x∈Ft2,y∈Fn−t2(−1)f(x,y) of a direct sum f(x,y)=f1(x)+f2(y), of functions f1,f2 being the product of the character sums ∑x∈Ft2(−1)f1(x) and ∑y∈Fn−t2(−1)f2(y) of these functions, the Hamming weight of the direct sum ∏i∈I1xi+⋯+∏i∈Ikxi of monomials (where the index sets I1,…,Ik are disjoint and n=∑kj=1|Ij|) satisfies 2n−2wH(f)=∏kj=1(2|Ij|−2). The Hamming weight of the function whose support equals all vectors of a Hamming weight of at least k equals ∑ni=k(ni). We find in both cases rather peculiar weights and, in the latter case, the algebraic degree needs to be determined.
There exist also secondary constructions of Boolean functions:
● The direct sum, already recalled above in the particular context of monomials, consists of adding functions whose sets of variables are disjoint. It gives weights that are a little peculiar: We have recalled above that if f is the direct sum of a t-variable function f1 and a (n−t)-variable function f2, then the character sum of f equals the product of the character sums of f1 and f2, and this implies:
This construction is interesting because it does not need particular precautions about the algebraic degree of f, which equals the maximum of the algebraic degrees of f1 and f2. Hence, for every weight w1 in RM(r,t) and every weight w2 in RM(r,n−t), the number w such that 2n−2w=(2t−2w1)(2n−t−2w2) is a weight in RM(r,n)), with the convention that if r>t, then RM(r,t) equals RM(t,t) (and can then have the weight of any integer between 0 and 2t). With this construction, there is a systematic way of building weights in RM(r,n) from weights in RM(r,t) and RM(r,n−t).
● The indirect sum (see [8, Sections 6.1.16 and 7.1.9]) also deals with functions whose sets of variables are disjoint, but in a more complex way: We have two functions f1,f2 on the same set of t variables, two functions g1 and g2 on the same set of n−t variables, disjoint from the previous one, and f(x,y)=f1(x)+g1(x)+(f1(x)+f2(x))(g1(x)+g2(x)). We then have ∑x∈Ft2,y∈Fn−t2(−1)f(x,y)=12(∑x∈Ft2(−1)f1(x))[∑y∈Fn−t2(−1)g1(y)+∑y∈Fn−t2(−1)g2(y)]+12(∑x∈Ft2(−1)f2(x))[∑y∈Fn−t2(−1)g1(y)−∑y∈Fn−t2(−1)g2(y)] and, therefore:
The algebraic degree of f is not automatically bounded by r from above, unless we take the initial functions f1,f2 in RM(s,t) with s≤r and the initial functions g1,g2 in RM(r−s,n−t) but this does not allow to provide interesting weights. If we take f1,f2 in RM(r,t) and g1,g2 in RM(r,n−t), this construction provides weights that are possibly less peculiar than with the direct sum, but in a much less systematic way, because we need to take care of the algebraic degree.
● The sum without extension of the number of variables (see [8, Sections 6.1.16 and 7.1.9]) takes three n-variable Boolean functions f1,f2,f3 and defines the Boolean function f=f1f2+f1f3+f2f3. We have:
This secondary construction has been introduced because of the nice behavior of its Walsh transform, but it has the same drawback as the indirect sum about the algebraic degree of f.
● The so-called (u|u+v)-construction (see [22]) allows us to construct all of RM(r,n) from RM(r−1,n−1) and RM(r,n−1). It corresponds to the fact that an n-variable Boolean function f(x1,…,xn) can be written in the form f0(x1,…,xn−1)+xnf1(x1,…,xn−1) and has an algebraic degree of at most r if and only if f0 has an algebraic degree of at most r and f1 has an algebraic degree of at most r−1. The corresponding codeword is the concatenation of the codewords in RM(r,n−1) associated to f0 and f0+f1, and for the Hamming weight, it has the sum of the Hamming weights of these two functions.
The pairs (f0,f0+f1), when f0 ranges over RM(r,n−1) and f1 ranges over RM(r−1,n−1), do not provide all possible pairs of codewords in RM(r,n−1) because of the restriction that f1 has an algebraic degree of at most r−1, but if we impose that f0 itself ranges over RM(r−1,n−1), then the weights of the resulting codewords of RM(r,n) range over the sums of two weights in RM(r−1,n−1). This leads to a result given in [30] and used in [12]: For all pairs of integers (r,n) with 0≤r≤n, the weight spectrum of RM(r,n) includes as a subset S+S, where S is the weight spectrum of RM(r−1,n−1). This result has allowed us to obtain the weight spectra of infinite classes of Reed-Muller codes, but only for orders that are very close to n.
A completely different way of evaluating weights in Reed-Muller codes consists of the fact that, for every Boolean function f of an algebraic degree of at most r, we have (∑x∈Fn2(−1)f(x))2=∑a∈Fn2∑x∈Fn2(−1)Daf(x), where for every a, the so-called derivative Daf(x)=f(x)+f(x+a) has an algebraic degree of at most r−1. If we are able to determine the weights of all these derivatives, we obtain the absolute value of ∑x∈Fn2(−1)f(x)=2n−2wH(f), and since every Reed-Muller code is invariant under the complementation of its codewords, this provides two weights if ∑x∈Fn2(−1)f(x)≠0. However, this method, which is clearly more efficient for low orders r, is better suited for determining some specific weights than for systematically finding new weights in infinite classes of Reed-Muller codes.
It is then useful to find a new way, as systematic as possible, for providing weights (hopefully previously unknown) and codewords having such weights.
3.
A new construction of Boolean functions with an algebraic degree bounded from above
In this section, we present our construction. It comes from a formula that is satisfied by all Boolean functions of an algebraic degree bounded from above by some number s (and therefore by all vectorial functions F:Fn2↦Fm2 of an algebraic degree of at most s). This formula has been originally found and used (in [11]) in the framework of countermeasures against side channel attacks, a domain of applied cryptography. It also corresponds to what we call zero-sum sets, a notion used in the cryptanalysis of block ciphers. It could seem rather unrelated to coding theory in general and to the determination of weights in Reed-Muller codes in particular, but it is not, as we shall see. This formula depends on parameters (that are elements of Fn2) and will lead to numerous Boolean functions f of the algebraic degree bounded from above, since the Hamming weight of these functions can be determined, to numerous weights in Reed-Muller codes.
3.1. Degree-s zero-sum sets as Reed-Muller codewords
A set S⊆Fn2 is called degree-s zero-sum|| if we have ∑x∈Sf(x)=0 for every n-variable Boolean function f of an algebraic degree of at most s (and then ∑x∈SF(x)=0 for every vectorial function F in n variables of an algebraic degree of at most s).
||This term comes from [3], which denotes by d what we denote here by s; we prefer using s to avoid any confusion with the minimum distance of codes.
The degree-s zero-sum sets are then the supports of the codewords in the dual code of RM(s,n). The dual of RM(s,n) equals RM(r,n) where r=n−s−1 [22] and degree-s zero-sum sets are then the supports of the n-variable Boolean functions of an algebraic degree of at most r, that is, of the codewords of RM(r,n). Hence, determining the possible sizes of degree-s zero-sum sets is directly related to determining the weights in Reed-Muller codes.
3.2. A construction of Boolean functions with bounded algebraic degree
We know from [11, Corollary 1] that if an n-variable Boolean function f:Fn2↦F2 or, more generally a vectorial (n,m)-function F:Fn2↦Fm2, has an algebraic degree of at most s, then for every t>s and for every a1,…,at∈Fn2, we have
(the sum, of course, being calculated modulo 2) where
for every j≤s, with the conventions (l0)=1 for every l and ∑i∈∅ai=0.
According to (3.1), the set of all the elements a of Fn2, which appear an odd number of times as a=∑ti=1ai, or a=∑i∈Jai where J has size at most s and μt,s(|J|)=1, is a degree-s zero-sum set. We then have the following result, in which, for every a∈Fn2, we denote by δa the Boolean function over Fn2 which takes value 1 at a and 0 everywhere else (such a function can be called an atomic, or Dirac, or Kronecker function):
Theorem 1. Let n, s≥0 and t≥1 be integers such that s<t and s<n. Given any elements a1,…,at of Fn2, the Boolean function:
(where μt,s(j)=(t−j−1s−j)mod2=(t−j−1t−s−1)mod2), has an algebraic degree of at most r=n−s−1.
Remark 1. (1) f(s)a1,…,at is in general not a symmetric function (that is, its value changes when we permute its input bits) despite the fact that its expression (3.2) is symmetric with respect to a1,…,at (i.e., its value does not change when we permute the ai's).
(2) For every positive integers n,s,t such that s<n and s<t, and every a1,…,at in Fn2, all the functions f(s)a1,…,at,f(s+1)a1,…,at,…,f(t−1)a1,…,at have algebraic degrees of at most r.
(3) Suppose that for some n,s,t, the function f(s)a1,…,at has an algebraic degree r′<n−s−1, then it is orthogonal to every codeword of the Reed-Muller code RM(n−r′−1,n) with n−r′−1>s, and it is, therefore, orthogonal to the Reed-Muller code RM(s+1,n), whose elements satisfy the Relation (3.1). There seems to most often exist codewords of RM(s+1,n) which do not satisfy Relation (3.1). We deduce that, most often, f(s)a1,…,at has in fact an algebraic degree of r=n−s−1 exactly. Examples 1 and 2 will illustrate this, but there are also examples where f(s)a1,…,at has an algebraic degree strictly smaller; see, for instance, Proposition 1.
Example 1. (toy example) Let n=3,s=1 (and, therefore, r=1), t=4,a1=(1,0,0),a2=(0,1,0),a3=(0,0,1), and a4=(1,1,1). We have μt,s(0)=(31)(mod2)=1,μt,s(1)=(20)(mod2)=1. Hence, f(s)a1,a2,a3,a4=δa1+a2+a3+a4+δ(0,0,0)+δa1+δa2+δa3+δa4 is the indicator function of the affine plane {a1,a2,a3,a4}.
3.2.1. Linear equivalence between the constructed functions when a1,…,at are linearly independent
We say that two n-variable Boolean functions f,g are linearly (resp., affinely) equivalent if there exists a linear automorphism (resp., an affine automorphism) L of Fn2 such that g=f∘L, then f and g have the same Hamming weight and the same algebraic degree. All the functions in a same equivalence class contribute then for the same weight in the weight spectrum of the corresponding Reed-Muller code. We are then interested, when we find a function with a known algebraic degree and weight, to know whether it is inequivalent to previously found functions. For t≤n, two choices "a1,…,at", respectively, "a′1,…,a′t", of linearly independent elements give linearly equivalent functions f(s)a1,…,at and f(s)a′1,…,a′t, because there exists a linear automorphism L, mapping a1,…,at to a′1,…,a′t, respectively, and, therefore, mapping ∑i∈Jai to ∑i∈Ja′i for every J. We then have f(s)a1,…,at=f(s)a′1,…,a′t∘L.
3.2.2. Studying some particular cases of (t,s) when a1,…,at are not necessarily linearly independent
For two choices a1,…,at and a′1,…,a′t, of linearly dependent elements, the corresponding functions f(s)a1,…,at and f(s)a′1,…,a′t may not be affine equivalent. Of course, if a1,…,at and a′1,…,a′t satisfy exactly the same linear relations over F2, then there is again a linear automorphism mapping a1,…,at to a′1,…,a′t, respectively (indeed, the two families have the same rank k; we can choose in each family k elements generating the other elements of the family by the same relations and deduce such linear automorphism), but if not, then the functions f(s)a1,…,at and f(s)a′1,…,a′t may be inequivalent.
Before seeing an example where f(s)a1,…,at and f(s)a′1,…,a′t are not affine equivalent, let us systematically visit the first possible values of s (for any t>s):
● Case s=0: For t≥1, we have f(0)a1,…,at=δ∑ti=1ai+δ0, which can have a weight of either 0 or 2; we get then only the two smallest weights of RM(n,n−1);
● Case s=1: For t≥2, we have f(1)a1,…,at=δ∑ti=1ai+(t−1)δ0+∑ti=1δai (we omit the "mod2"); if t is even, then we get δ∑ti=1ai+δ0+∑ti=1δai, which has an even weight of at most t+2, and if n is odd, then we get δ∑ti=1ai+∑ti=1δai, which has an even weight as well of at most t+1; Since t is not bounded above, we get all possible weights of RM(n,n−2) (and this case is then very different from the previous one): We can easily check that the weights 2 and 2n−2 are impossible and all other even weights between 0 and 2n are possible; for instance, weight 4 is achieved by taking either t=2 and a1,a2 nonzero and distinct (i.e., linearly independent over F2) or t=3 and a1,a2,a3 distinct;
● Case s=2: For t≥3, we have f(2)a1,…,at=δ∑ti=1ai+(t−12)δ0+(t−2)∑ti=1δai+∑1≤i<j≤tδai+aj; hence, if all the sums ai+aj and the ai are nonzero and distinct, we have a function of a Hamming weight in [[(t2)+t−1,(t2)+t+2]] if t is odd and in [[(t2)−1,(t2)+2]] if t is even. If we only assume that all the sums ai+aj are distinct, we have a function of a Hamming weight of at least (t2)−2−t=t2−3t−42 if t is odd and (t2)−2=t2−t−42 if t is even.
● Case s=3: For t≥4, we have f(3)a1,…,at=δ∑ti=1ai+(t−13)δ0+(t−22)∑ti=1δai+(t−3)∑1≤i<j≤tδai+aj+∑1≤i<j<k≤tδai+aj+ak; hence, if all the sums ai+aj+ak are distinct, we have a function of a Hamming weight of at least (t3)−2−t−(t2)=t3−6t2−t−126 if t is even and (t3)−2−t=t3−3t2−4t−126 if t is odd.
Since, for the same value of n and the same value of t, f(1)a1,…,at=δ∑ti=1ai+(t−1)δ0+∑ti=1δai can have different Hamming weights according to the values of the ai's when they are linearly dependent, we have an example where f(s)a1,…,at and f(s)a′1,…,a′t are not affine equivalent, even if a1,…,at are distinct as well as a′1,…,a′t.
Let us now systematically visit the first possible values of t>s (for any s):
● For t=s+1, we have μt,s(j)=(s−js−j)mod2=1 for all j≤s. Note that this was expected since Relation (3.1) expresses, in particular, that for a function of degree of at most s, the sum of the values of the function taken over any (s+1)-dimensional affine space equals 0. The Hamming weight ws+1,s of f(s)a1,…,as+1 is at most 1+∑sj=0(tj)=2s+1. Hence, since 2s+1 equals the minimum distance of RM(r,n), the Hamming weight of f(s)a1,…,as+1 is either zero or 2s+1 (depending on the choice of a1,…,as+1). More precisely:
Proposition 1. For every s≥0 and every linearly independent a1,…,as+1 in Fn2, f(s)a1,…,as+1 is the minimum weight codeword in RM(r,n) whose support equals ⟨a1,…,as+1⟩, the vector space over F2 generated by a1,…,as+1. If a1,…,as+1 are linearly dependent, then f(s)a1,…,as+1 equals the zero function.
Proof. We have f(s)a1,…,as+1=∑J⊆{1,…,s+1}δ∑i∈Jai. If a1,…,as+1 are linearly independent, then f(s)a1,…,as+1 equals the indicator of the vector space generated by a1,…,as+1 (and we obtain with the functions f(s)a1,…,at all the minimum weight codewords in RM(r,n)). If a1,…,as+1 are linearly dependent, then the Hamming weight of f(s)a1,…,at is strictly less than the minimum distance of RM(r,n), and it is then 0. Note that, assuming (without loss of generality, thanks to the invariance of f(s)a1,…,at when permuting the ai's) that at=a1+⋯+ak, for some k<t, it is easily seen that each Dirac function obtained after replacing at by its value in the expression of f(s)a1,…,as+1 appears an even number of times. This implies that this expression cancels. □
● For t=s+2, we have μt,s(j)=(s+1−js−j)mod2=(s+1−j)mod2 and f(s)a1,…,at=δ∑ti=1ai+∑⌊s2⌋k=0∑J⊆{1,…,t}|J|=s−2kδ∑i∈Jai.
We have ws+2,s≤1+∑⌊s2⌋k=0(s+2s−2k)=1+∑⌊s2⌋k=0(s+22k+2)=2s+1. More precisely:
Proposition 2. For every s≥0 and every linearly independent a1,…,as+2 in Fn2, f(s)a1,…,as+2 is a minimum weight codeword in RM(r,n). If a1,…,as+1 are linearly dependent, then f(s)a1,…,as+1 can equal a minimum weight codeword in RM(r,n) or the zero function.
● For t=s+3, we have that μt,s(j)=(s+2−js−j)mod2=(s+2−j2)mod2 equals {1 if s+2−jmod4∈{2,3}0 if s+2−jmod4∈{0,1}, and we have:
3.3. On the weights of the constructed functions
The interest of Theorem 1 is that it is possible to calculate mathematically, under some conditions, the Hamming weight of f(s)a1,…,at, and that the weights obtained do not look peculiar.
Proposition 3. Let n, s≥0 and t≥1 be integers such that s<t and s<n. For any elements a1,…,at of Fn2, let f(s)a1,…,at be the Boolean function given by (3.2). If a1,…,at are linearly independent over F2, then f(s)a1,…,at has Hamming weight:
where μt,s(j)=(t−j−1s−j)mod2, and otherwise, it has a Hamming weight of at most wt,s.
Indeed, the former assertion comes from the fact that, for any two distinct J, the corresponding elements ∑i∈Jai are distinct, since a1,…,at are linearly independent over F2, and the latter is obvious. Note that the Hamming weight of f(s)a1,…,at has necessarily the same parity as wt,s since the atomic functions involved in (3.2) cancel by pairs, but since we already know that this weight is even because r=n−s−1 is strictly smaller than n, this only tells us that wt,s is even (while it may not always be a weight in RM(r,n) when t>n). Note also that wt,s≥1+(ts) since μt,s(s)=1 (and then the weight of f(s)a1,…,at cannot equal wt,s if (ts)≥2n), and that if t−s is odd, then wt,s≥1+(ts−1)+(ts), since μt,s(s−1)=t−s (and then the weight of f(s)a1,…,at cannot equal wt,s if (ts−1)+(ts)≥2n).
Example 2. Let us take n=12, r=8. We can check that f(s)a1,…,at can reach weight 166 in two cases where a1,…,at are linearly independent over F2. Indeed, for having r=n−s−1=8, we need to take s=3. For the weight wt,s=1+∑j∈{0,…,s};μt,s(j)=1(tj) given by Proposition 3 to equal 166, we need to take t∈{10,11}. Recall that all these functions are affine equivalent, for a fixed value of t. Denoting by (e1,…,e12) the canonical basis of F122 (made of all weight 1 vectors), we obtain then two classes of functions, that are respectively affine equivalent to f(3)e1,…,e10=δ∑10i=1ei+∑0≤j≤3(9−j3−j)mod2=1∑J⊆{1,…,10};|J|=jδ∑i∈Jei= δ∑10i=1ei+∑J⊆{1,…,10};|J|=2δ∑i∈Jei+∑J⊆{1,…,10};|J|=3δ∑i∈Jei and f(3)e1,…,e11=δ∑11i=1ei+∑0≤j≤3(10−j3−j)mod2∑J⊆{1,…,11};|J|=jδ∑i∈Jei=δ∑11i=1ei+∑J⊆{1,…,11};|J|=3δ∑i∈Jei.
Recall (see e.g., [8, Subsection 10.1.1]) that denoting by 1En,j the n-variable Boolean function whose support is the set En,j of all vectors of a Hamming weight of j in Fn2, we have 1En,j(x)=∑I⊆{1,…,n}(|I|j)=1(mod2)xI. We then have f(3)e1,…,e10(x)=(x11+1)(x12+1)[10∏i=1xj+∑I⊆{1,…,10}|I|∈{2,3,6,7,10}∏i∈Ixi+∑I⊆{1,…,10}|I|∈{3,7}∏i∈Ixi] and f(3)e1,…,e11(x)=(x12+1)[11∏i=1xj+∑I⊆{1,…,11}|I|∈{3,7,11}∏i∈Ixi] and these two functions both have an algebraic degree of 8.
It is interesting to notice that wt,s, defined in Relation (3.3), does not depend on n (we only have the condition that n≥t). Of course, n plays a role through the value of r.
We can see that the weights provided by Proposition 3 are few for low orders (since t ranges from n−r to n) and a little more numerous for large orders.
We now observe a property of wt,s that seems easier to show by considering Relation (3.3) than to infer directly from the way f(s)a1,…,at was derived:
Lemma 1. For every s,i≥0, we have ws+2i+1,s=ws+2i+2,s≤ws+2i+3,s and this latter inequality is strict for s>0.
Proof. According to Lucas' theorem (see, e.g., [22, Page 404]), we have that μs+2i+1,s(s−j)=(2i+jj)mod2 equals 1 if, and only if, the binary expansion of j is covered by that of 2i+j, then μs+2i+1,s(s−j) has the same value for j=2k and j=2k+1, while μs+2i+2,s(s−j)=(2i+j+1j)mod2 shares the same value if j=2k and equals 0 if j=2k+1. We deduce that ws+2i+2,s=1+∑0≤j≤s;jeven;μs+2i+1,s(s−j)=1(s+2i+2s−j)=1+∑0≤j≤s;jeven;μs+2i+1,s(s−j)=1((s+2i+1s−j)+(s+2i+1s−j−1))=1+∑j≥0;jeven;μs+2i+1,s(s−j)=1(s+2i+1s−j)+∑j≥0;jodd;μs+2i+1,s(s−j)=1(s+2i+1s−j)=ws+2i+1,s. This proves the equality.
We have μs+2i+3,s(s−j)=(2i+2+jj)mod2=((2i+1+jj)+(2i+1+jj−1))mod2=μs+2i+2,s(s−j)+μs+2i+3,s(s−j+1). If μs+2i+3,s(s−j+1)=0, then μs+2i+3,s(s−j)=μs+2i+2,s(s−j). Using for μs+2i+3,s(s−j+1)=0 that (s+2i+3s−j) is strictly larger than (s+2i+2s−j) and for μs+2i+3,s(s−j+1)=1 that (s+2i+3s−j+1) equals (s+2i+2s−j)+(s+2i+2s−j+1), we deduce that ws+2i+3,s=1+∑j∈{0,…,s};μs+2i+3,s(s−j)=1(s+2i+3s−j)≥ws+2i+2,s=1+∑j∈{0,…,s};μs+2i+2,s(s−j)=1(s+2i+2s−j) and the inequality is then verified. Moreover, if s>0, then the inequality is strict. □
Open problem: Find a direct explanation of Lemma 1, from the proofs of [11, Theorem 1 and Corollary 1].
Remark 2. We have seen in the proof of Lemma 1 that μs+2i+2,s(s−j) equals 0 for every odd j. Hence, if all the elements ∑i∈Jai are distinct for all J⊂{1,…,s+2i+2} whose sizes are at most s and have the same parity as s, then f(s)a1,…,as+2i+2 has a Hamming weight of ws+2i+2,s as well. This is possible with s+2i+2>n: Take, for instance, s=2, i=1, n=s+2i+1=5, t=6, and a6=a5+a4, then μ(t,s)(0)=0,μt,s(1)=0,μt,s(2)=1, and a1+⋯+a6=a1+a2+a3, a1+a2,a1+a3,a1+a4,a12+a5,a1+a6=a1+a4+a5,a2+a3, a2+a4,a2+a5,a2+a6 = a2+a4+a5,a3+a4, a3+a5,a3+a6=a3+a4+a5, a4+a5,a4+a6=a5, a5+a6=a4 are all distinct.
Open problem: Determine the exact Hamming weight of f(s)a1,…,at by means of s, n and a1,…,at when the latter are linearly dependent over F2.
In the next corollary we call the weight spectrum of RM(r,n) the list of all possible weights in RM(r,n))
Corollary 1. Whatever the positive integers of n and r<n are, the weight spectrum of RM(r,n) contains all the numbers:
Indeed, for every t≤n, there exist t linearly independent elements.
In Table 1, we give for n≤21 and for all r=1,…,n−1, the list in regular roman** of the values wt,n−r−1 where t ranges from n−r to n. All these numbers are weights in RM(r,n), and all the lists displayed for the input pairs (n,r),(n,r−1),…,(n,1) provide weights in RM(r,n). We can check on these lists that Lemma 1 is verified, that is, the numbers go by pairs of consecutive equal values and the lists are nondecreasing.
**The values in bold will be obtained below in Subsection 3.3.1.
We can find in Table 1 many numbers which were not known before as weights in RM(r,n), such as 3004 or 6436 in RM(6,14).
3.3.1. The weights in some cases where a1,…,at are linearly dependent
We have seen that restricting ourselves to the case where a1,…,at are linearly independent over F2 reduces the number of the weights, which can be found by using Theorem 1, because t is then necessarily in the range {n−r,…,n} and since, for fixed n and r (i.e., for fixed n and s), all the obtained functions corresponding to the same t have the same Hamming weight. In the present section, we investigate two cases where a1,…,at are linearly dependent. We shall see that the first does not provide more weights but the second does.
Case where two elements are equal: We study this case by curiosity, to check whether with t elements a1,…,at, it is identical to the case of t−2 elements or not (the formulas are different but the functions and/or the weights may be the same).
To ease the comparison, we start with t+2 elements a1,…,at+2 such that (without loss of generality) at+2=at+1, then for every J⊆{1,…,t+2}, we have that ∑i∈Jai equals {∑i∈Jai if {t+1,t+2}∩J=∅∑i∈J∖{t+1,t+2}ai if {t+1,t+2}⊆J. We get the same atomic function (which cancels then) if exactly one element among {t+1,t+2} belongs to J, whether we choose t+1 or t+2.
We deduce that:
that is: f(s)a1,…,at+2=
where μt,s(j) equals (t−j−1s−j)mod2 if 0≤j≤s and equals 0 otherwise.
For s<t, we obtain f(s)a1,…,at+2=f(s)a1,…,at. Indeed, μt+2,s(j)+μt+2,s(j+2)=((t−j+1s−j)+(t−j−1s−j−2))mod2 equals (t−j−1s−j)mod2=μt,s(j).
Remark 3. We could additionally consider the cases s=t and s=t+1 since, having s<t+2, we can still use Relation (3.2), with t+2 in the place of t. The only difference with the case s<t is that the atomic function δ∑ti=1ai may equal one of the other atomic functions appearing in (3.4). When we evaluate the Hamming weight, we then have to consider particular cases according to whether δ∑ti=1ai is present in ∑sj=0(μt+2,s(j)+μt+2,s(j+2))∑J⊆{1,…,t};|J|=jδ∑i∈Jai (that is, in ∑sj=s−1(μt+2,s(j)+μt+2,s(j+2))∑J⊆{1,…,t};|J|=jδ∑i∈Jai), and then cancels, or not. Anyway, the sum ∑sj=0(μt+2,s(j)+μt+2,s(j+2))(sj) is smaller than or equal to ∑sj=0(sj)=2s and the sum ∑sj=0(μt+2,s(j)+μt+2,s(j+2))(s−1j) is still smaller, and we will necessarily obtain 0 since 2s is strictly smaller than the minimum distance of RM(r,n).
Case where one element equals the sum of two others: We start with t+1 elements a1,…,at+1 such that (without loss of generality) at+1=at+at−1 (and t≥3, so that there remains one element after cancellation in the sum ∑yi=1ai). For every J⊆{1,…,t+1}, we have that ∑i∈Jai equals:
then:
where μt,s(j) equals (t−j−1s−j)mod2 if 0≤j≤s and equals 0 otherwise.
Proposition 4. Let n≥3, s≥0, and t≥3 be integers such that s<t and s<n. For any elements a1,…,at of Fn2, let f(s)a1,…,at+1 be the Boolean function given by (3.2) with at+1=at+at−1. If a1,…,at are linearly independent over F2, then f(s)a1,…,at+1 has Hamming weight:
where μt+1,s(j) equals (t−js−j)mod2 if 0≤j≤s and equals 0 otherwise (and the additions "μt+1,s(j)+μt+1,s(j+3)", etc., are made modulo 2). Here, ϵ equals −1 if s≥t−2 and μt+1,s(t−2)=1, and equals 1 otherwise. If a1,…,at are linearly dependent, then f(s)a1,…,at+1 has a Hamming weight of at most w′t,s.
The value of ϵ is −1 when δ∑t−2i=1ai is equal to one of the other atomic functions present in the formula, and this is possible only when s≥t−2 and μt+1,s(t−2)+μt+1,s(t+1)=1, that is, μt+1,s(t−2)=1.
We obtain again the weights that we had obtained with linearly independent vectors a1,…,at, and we obtain about 50% additional weights, which we display in bold (after these ones) in Table 1.
3.3.2. Making linear combinations of the constructed functions
We have seen in the previous subsection that taking a1,…,at linearly dependent provides more weights than taking them linearly independent, but not in a large proportion (at least for the two cases that we studied: two elements equal and one element equal to the sum of two others). We need then to find other ways to provide more weights. One is very simple. Since all the functions f(s)a1,…,at have an algebraic degree of at most r=n−s−1, we can sum, for every choice of s, some of the functions f(s)a1,…,at,f(s+1)a1,…,at,…,f(t−1)a1,…,at for different choices of t>s and of a1,…,at.
The difficulty is to evaluate the Hamming weight of the resulting functions, but there is a case where the weight is easily determined: when we take disjoint families of vectors ai whose union is made of linearly independent vectors.
In the simplest case, we have (globally) t linearly independent vectors a1,…,at in Fn2 (with t≤n), and we partition {1,…,t} in two subsets (without loss of generality, we can take these subsets equal to {1,…,l} and {l+1,…,t}), then two functions f(s)a1,…,al and f(s′)al+1,…,at with s<l and s′<t−l have algebraic degrees of at most r=n−s−1 and r′=n−s′−1, respectively, and they have disjoint supports. Their sum has then an algebraic degree of at most max(r,r′) and has for Hamming weight the sum of their Hamming weights, that is, wl,s+wt−l,s′.
Example 3. Let us take n=t=12 and s=s′=2, that is, r=r′=9. We must take l and 12−l strictly larger than 2, that is, l between 3 and 9. We find in Table 1 that, when l ranges from 3 to 9, (wl,2,wt−l,2) takes the following values, indicated in the row corresponding to n=12 and r=9: (8,46),(8,30),(16,30),(16,16),(30,16),(30,8),(46,8), respectively. We obtain then the weights 54,38,46,32,46,38,54 in RM(9,12). This way, we obtain two new weights (38 and 54) in RM(9,12).
Example 3 can be generalized:
Proposition 5. Let n and r<n be any positive integers. All the numbers wl,n−r1−1+wt−l,n−r2−1, where t≤n, n−r1≤l≤t−n+r2, r1≤r, r2≤r and r1+r2≥2n−t are weights in RM(r,n).
This is straightforward. The condition l≤t−n+r2 is for having t−l≥n−r2 and the condition r1+r2≥2n−t is for having n−r1≤t−n+r2. The condition l≤t is automatically satisfied thanks to l≤t−n+r2.
Of course, Proposition 5 can be generalized to sums of more than two numbers (taking more than two families partitioning {a1,…,at}).
Remark 4. The conditions r≥r1,r2 and r1+r2≥2n−t imply that 2r≥2n−t, that is, t≥2n−2r and since t cannot be larger than n, this means that Proposition 5 can be used only if n≥2n−2r, that is, r≥n2. Our results are then unfortunately limited to those of Proposition 3 (that is, those of Table 1) for the orders in the lower half of [0,n] (those for which the table provides the least values), in particular for the smallest order for which the weight spectrum is unknown: r=3. We shall see below that, on the contrary, we can derive a very large number of weights as soon as r is large enough.
Note that if we partition {a1,…,at} in three families {a1,…,al}, {al+1,…,ak} and {ak+1,…,at}, we get the weight wl,n−r1−1+wk−l,n−r2−1+wt−k−l,n−r3−1 (instead of wl,n−r1−1+wt−l,n−r2−1 that we had with two families), and conditions l≥n−r1, k−l≥n−r2 and t−k−l≥n−r3 imply t≥3n−(r1+r2+r3), that is, 3r≥r1+r2+r3≥3n−t≥2n, and the condition r≥n2 becomes r≥2n3.
For each n≤23, the weights provided by Proposition 5 can be obtained by adding in Table 1 any number located in any row r1≤r at the k-th position (by taking k=l−(n−r1)+1 so that it starts at position 1 in the list given by Table 1) where k≤t−n+r2−(n−r1)+1=t−2n+r1+r2+1, and the number located in any row r2≤r such that r1+r2≥2n−t, at the position corresponding to t−l, that is at the position t−(k+n−r1−1)−(n−r2)+1=t−k−2n+r1+r2+2. It is for large orders that our method gives the best results, since the weights are then more numerous in Table 1; and making sums (applying Proposition 5) is also possible only when r≥n2, and these sums are more numerous when r is larger.
Example 3, revisited: For n=12 and r=9, the condition t≥2n−2r writes t≥6, and we obtain the following:
For t=12: The conditions r1,r2≤r and r1+r2≥2n−t allow (r1,r2)=(3,9);(4,8),(4,9);(5,7),(5,8),(5,9);…;(9,3),(9,4),…,(9,9), which provide the following weights:
For (3, 9): 520
for (4, 8): 272
for (4, 9): 264 and 264
for (5, 7): 160
for (5, 8): 144 and 144
for (5, 9): 144 and 136 and 264
for (6, 6): 128
for (6, 7): 96 and 96
for (6, 8): 100 and 80 and 152
for (6, 9): 80 and 80 and 144 and 144
for(7, 5), we have the same as for the swap (5, 7)
for (7, 6), we have the same as for the swap
for (7, 7): 104 and 64 and 104
for (7, 8): 68 and 68 and 88 and 88
for (7, 9): 62 and 48 and 88 and 80 and 264
for (8, 4), (8, 5), (8, 6), (8, 7), we have the same as for their swaps,
for (8, 8): 110 and 52 and 72 and 52 and 110
for (8, 9): 46 and 46 and 52 and 52 and 102 and 102
for (9, 3), (9, 4), (9, 5), (9, 6), (9, 7), (9, 8) we obtain the same as for their swaps
for (9, 9): 54 and 38 and 46 and 32 and 46 and 38 and 54.
For this single value of t, we have then obtained in addition to the weights present in Table 1 and to the two weights 38 and 54 found above: 48, 52, 62, 72, 80, 88, 96,100,102,104,110,136,144,152,160,264,272,520.
We would also have to consider all the other values of t, from 11 down to 6.
As mentioned after Proposition 5, we could find more weights by partioning {a1,…,at} in more than two families.
We see that our method gives in fact a large number of weights, for sufficiently large orders, that is, when the usual constructions of Boolean functions (Maiorana-McFarland, etc.) give the worst results. It is then nicely complementary to the method using classic constructions.
Example 4. We have seen in introduction that trying to determine the weight spectrum of all codes RM(n−c,n) for c=6 (the smallest value of c for which this is an open problem) requires determining the weights in RM(6+k,12+k), for some k≥0.
– Let us first consider RM(6,12). Table 1 already provides the weights 64,128,136,208,256,384,496,512,628,736,784,992, 1024, 1288, 1420, 1472, 1744, 2016, 2048, 3004. We could complete with the weights provided by Kasami-Tokura. We could also add the weights obtained by adding 16 weights from RM(2,8) (that are 0, 64, 96,112,120,128,136,144,160,192,256 according to what we know on quadratic functions) and adding 8 weights of RM(3,9) (that are 0, 64, 96,112,120,128,136,144,148,152,156,160,164,168,172,176,180,184,188,192,196,200,204,208,212,216,220,224,228,232,236,240,244,248,252,256,260,264,268,272,276,280,284,288,292,296,300,304,308,312,316,320,324,328,332,336,340,344,348,352,356,360,364,368,376,384,392,400,416,448,512, see the URL: https://isec.ec.okayama-u.ac.jp/home/kusaka/wd/RM/tomita/RM512_130.wd).
The weights of RM(4,10) and RM(5,11) are unknown (but we know from Table 1 that they include respectively 64,128,136,208,256,384,496,512,628 and 64,128,136,208,256,384,496,512,628,736,784,992, 1024, 1420. We can add the weights obtained by adding weights from RM(r1,12) and RM(r2,12) in Table 1 as explained above. For n=12 and r=6, the condition n≥t≥2n−2r writes t=12. The conditions r1,r2≤r and r1+r2≥2n−t allow only one possibility: (r1,r2)=(6,6), which provides only one weight (since the number k∈{1,t−2n+r1+r2+1} in the description we gave can take value 1 only): 128, which is already there.
– Let us then consider RM(7,13). Table 1 already provides the weights 64,128,136,208,256,384,496,512,628,736,784,992, 1024, 1288, 1420, 1472, 1744, 1948, 2016, 2048, 3004, 3008, 3664, 4096, 6008. Note also that the weights of RM(6,12) are also weights of RM(7,13), but this provides no new weight. We could complete with the weights provided by Kasami-Tokura, and we can add the weights obtained by adding weights from RM(r1,13) and RM(r2,13) in Table 1 as explained above. For n=13 and r=7, the condition n≥t≥2n−2r writes t∈{12,13}.
- For t=13, the conditions r1,r2≤r and r1+r2≥2n−t allow (up to a swap between r1 and r2): (r1,r2)=(7,6),(7,7). The case (7, 6) provides one weight (the number k∈{1,t−2n+r1+r2+1} can take value 1 only): 96. The case (7, 7) provides one weight (the number k∈{1,t−2n+r1+r2+1} can take values 1 and 2, which give the same weight): 64 which was already there.
- For t=12, the conditions r1,r2≤r and r1+r2≥2n−t allow: (r1,r2)=(7,7), which provides the weight 64 also already obtained.
We could continue by visiting RM(8,14) (which is the first case where we obtain a weight not divisible by 4: 3474) etc., but with this example, we see the huge difference between low and high orders.
We leave as an open problem the determination of more weights in RM(6,12) (and in particular, some that are not divisible by 4), which will probably need to find another method than exploiting Relation (3.1).
3.4. The ANF of the constructed functions when a1,…,at are linearly independent over F2
We have seen that for t≤n, two choices "a1,…,at", respectively "a′1,…,a′t", of linearly independent elements give linearly equivalent functions, having then the same weight and the same algebraic degree.
Let us then determine the ANF of f(s)e1,…,et, where t≤n. We shall need the following lemma:
Lemma 2. Let n≥1,t≥1,j≥0 be integers such that j≤t≤n and let e1,…,et be the t first elements of the canonical basis of Fn2. The Boolean function:
has for ANF:
where |…| denotes the size and j⪯m means that if j=∑k∈K2k and m=∑l∈L2l are the binary expansions of j and m, then K⊆L.
Proof. Since ∑i∈Jei is the vector of support J, we have, denoting x=(x1,…,xn):
where these sums are taken modulo 2 and (|{1,…,t}∩I|j) equals 0 if |{1,…,t}∩I|<j. The proof is complete thanks to Lucas' theorem [22, page 404]. □
We deduce:
Proposition 6. Let n≥1, s≥0 and t≥1 be integers such that s<t and s<n. Given any linearly independent elements a1,…,at of Fn2, the Boolean function (3.2) is linearly equivalent to the function of ANF:
where μt,s(j)=(t−j−1s−j)mod2=(t−j−1t−s−1)mod2.
This is straightforward since f(s)e1,…,et=ht,e1,…,et+∑sj=0μt,s(j)hj,e1,…,et. □
Remark 5. Even after these caculations, it is not obvious to see (what we already know) that f(s)e1,…,et has an algebraic degree of at most r=n−s−1, that is, for every I⊆{1,…,n} whose size is strictly larger than r, we have ∑0≤j≤sj⪯|{1,…,t}∩I|μt,s(j)=1mod2 if {1,…,t}⊆I and ∑0≤j≤sj⪯|{1,…,t}∩I|μt,s(j)=0mod2 otherwise.
Open problem: Determine the exact algebraic degree of f(s)a1,…,at by means of s, n and a1,…,at.
Subproblem: Determine the algebraic degree of f(s)a1,…,at by means of s and n when a1,…,at are linearly independent.
Still more complex is the following:
Open problem: Determine what can be the ANF of f(s)a1,…,at when a1,…,at are linearly dependent.
4.
Conclusions
We have introduced a novel way of constructing Reed-Muller codewords. It consists of exploiting relations satisfied by all n-variable Boolean or vectorial functions F of an algebraic degree of at most s (corresponding when F is Boolean to codewords in RM(s,n)), these relations being interpretable in terms of the orthogonality between some Boolean function, say f, and (the coordinate functions of) all such F. Function f belongs then to RM(r,n), where r=n−s−1. This construction depends on n, s (or r), a parameter t and the choice of t vectors ai. We showed how it allows us to determine weights in Reed-Muller codes that are not accessible by other methods, as far as we know, and in a simpler way. As a matter of fact, our method for determining weights in Reed-Muller codes is complementary of the classic method, which consists of using the known constructions, since the latter is more efficient for low orders and our method is more efficient for large orders. Anyway, the method using the known constructions poses technical problems (and provides a number of weights that is small compared to the amount of work needed) while ours provides weights with less difficulties. Functions having the weights we can derive with our method can be deduced, as well as a general form of their ANF when the vectors ai are linearly independent, but determining mathematically their exact algebraic degree seems difficult. This is one of the open problems we proposed. We also found more weights by considering cases where the vectors are linearly dependent. We could also identify that with some of the constructed functions having disjoint supports, the weights of the sums are equal to the sums of the weights; this provided for each Reed-Muller code of a sufficiently large order a very large number of new weights.
More work is possible in many directions, for instance, by investigating as many cases of functions as possible where the vectors ai are linearly dependent and studying sums of such functions as well. Moreover, there may be other relations to find that are interpretable in terms of orthogonality, leading to more codewords and weights in Reed-Muller codes. This may provide an avenue for further results, with the ultimate goal of determining all the weight spectra of Reed-Muller codes (starting with those of high orders when they are still unknown, since they seem to be more accessible than those of low orders larger than 2), and still better, their weight distributions.
Use of AI tools declaration
The author declares he has not used Artificial Intelligence (AI) tools in the creation of this article.
Acknowledgments
We deedply thank Stjepan Picek for his kind help with the tables; we are indebted to him.
The research of the author is partly supported by the Norwegian Research Council.
Conflict of interest
The author declares no conflict of interest.