Let $X \subseteq \{0,1\}^n$ be a nonempty set of vectors of length $n \geq 1$ with binary components such that the zero vector $\vec{0}$ having all components equal to $0$ belongs to $X$. Along with the sum $\oplus$ defined as the component-wise xor (modulo 2 sum) of two vectors (i.e. consider the usual GF(2) field), i.e. let $x_i, y_i$ be the $i$-th component of $\vec{x}, \vec{j}$ respectively, then $$ (\vec{x} \oplus \vec{y})_i :=\quad x_i + y_i\quad\text{(mod 2)} $$
I stumbled upon the problem of finding (one of) the biggest (w.r.t. set inclusion) vector spaces contained in $X$.
I tried to look around but I don't seem to be able to find any mention of this problem in literature, not even in its more general formulation involving arbitrary vectors (thus not restricting to binary components and the component-wise modulo 2 sum).
(the considerations below on how I feel about the problem being NP-complete, and about the bounds are inexact and refer to a slightly different problem, which I asked here: Finding a biggest (in size) vector space in a finite set)
While the "dual" problem of finding the smallest vector subspace containing $X$ is well-known, and easy to solve, I feel like this problem of finding the biggest subset which is a vector space constitutes a harder problem, in terms of computational complexity. What can we say about the complexity of this problem? Is there any reduction from a NP-complete problem to the above problem? Is there any efficient way to solve this problem? Any information about this problem is welcome, I find no mentions of it in literature.
Update with some more (useful) informations:
The existence of a solution is obvious, since the set $\{\vec{0}\}$ is a vector space contained in $X$ by definition, and there are finitely many subsets of $X$ (since $X$ is finite). Note that it might not be unique, if multiple maximal spaces exist in $X$, finding one of them is enough.
It would also be useful to find some bounds on the size of the solution, for example, if $|X| \geq 2$ then we can infer that any solution has at least dimension 1. Maybe this reasoning extends to a general bound? If I were to guess such a bound would probably end up being very loose.
I provide an upper bound on the computational complexity by giving you a Python function
find_maximal_subspacewhich, given a finite set of vectors, finds a maximal vector subspace included in it.An example of usage:
This prints
It's clear that this program is polynomial time in $n |X|$, and I can't be bothered to calculate the computation complexity more accurately than that. Also, it's possible that a more efficient algorithm exists.
I also provide a pseudocode program: