Linearly independent subsets
Created at 2023-08-13
The binary words , , and have an interesting property: Whenever we choose three of them, the are linearly independent in the -vector space of binary words of length .
I'd like to turn this observation into a more general question: How large can a set of binary words in be such that any subset with at most elements is linearly independent? (We will call such a set linearly -independent.)
This problem was proposed a few years ago by a fellow student and I made progress when I applied the techniques from the book Making Up Your Own Mind.
Linearly 2-independent sets
This is easy. Let . This is a -independent set, and it is clearly the largest one!
Linearly 3-independent sets
For , a simple argument suffices to see that a linearly -independent set cannot have more than four elements. Assume that contains the three pairwise distinct elements . If is another distinct element, then can uniquely be written as linear combination with coefficients . Because are linearly independent, the coefficient must not be zero. A similar observation holds for and . Therefore, and . This shows that cannot contain more elements than .
How about larger ? The words in that begin with a form a linearly -independent set. Indeed, the sum of three such words again begins with a -- and is therefore nonzero. The linearly -independent set we just found contains elements, exactly half of all words of length . There is a deeper reason why this works: The words that begin with a form a subgroup of of index two. Whenever we have a subgroup of index two, its complement forms a linearly -independent set. Another subgroup I could have used consists of words with an even number of 's.
So we found linearly -independent sets with elements. Can we find even larger sets? As it turns out, no: Let be any linearly -independent set and . Then is disjoint to . Because both sets are contained in , we obtain . In other words, .
A surprising connection
It is not clear how to generalize this argument to , so let us reframe the problem a bit. If we write all vectors in a linearly -independent as columns into a matrix , then is a vector space and all of its nonzero elements have at least non-zero components. Setting and choosing an isomorphism , we obtain a linear block code (see Lineare Blockcodierung) with block length , message length , overhead (block length minus message length) at most and minimum Hamming distance at least .
On the other hand, if we are given a linear block code of block length , overhead at most and minimum Hamming distance , we can construct a linearly -independent set : The space of code words has dimension . If we choose any (rank-) matrix with , then the columns of form a set as desired.
There are some immediate implications. Hamming codes give rise to the linearly -independent set from above. SECDED codes, i.e. Hamming codes with an additional parity bit, are linear codes with block length , overhead and minimum Hamming distance . This confirms our earlier result, this time however as a corollary of an established fact in computer science. Conversely, Richard Hamming might have discovered Hamming codes (which efficiently realize a minimum Hamming distance of ) quite naturally by constructing them from the maximal -linearly independent set from further above (and derive without further calculation that its block size is and that it has bits of overhead).
Linearly 4-independent sets
How about linearly 4-independent sets? There are so-called BCH codes with block length at least , overhead and minimal Hamming distance . Therefore, there are linearly -independent sets with at least elements in . (I quickly derived these numbers from the introduction of this paper by Chen, but I did not do a deep dive into this topic). These codes require a decent amount algebra to derive them, and I find it fascinating that the theory behind these codes can help to find linearly -independent sets.
Can we do better? Probably a bit -- the paper I cite above itself improves on BCH codes, so there seems to be a bit of room for improvement. However, the order of magnitude is as good as it gets. We use an argument similar to the one we used to prove optimality of our linearly -independent sets.
Let be any linearly -independent set with elements. Then there are ways to sum up at most two elements of . Because is linearly -independent, these sums are pairwise distinct elements of , and it follows that . In particular, , and this bound is quite close to the size of the set we constructed with BCH codes.
(The binomial coefficient formula above is conspicuously similar to the so-called Hamming bound, which produces a similar bound for block codes with minimum Hamming distance .)