Posted by: atri | September 7, 2007

## Lecture 5: Linear Codes

Today we formally defined linear codes and talked about the implications for succinct representations as well as efficient encoding and error detection. Along the way to looked at some basics of finite fields and vector spaces over finite fields.

Than asked in the class for a proof for why linear subsapces of $\mathbb{F}_q^n$ are ncessarily of size $q^k$ for some $k\ge 0$. Here is a proof (there might be a simpler way to prove this).

For the proof I need the notion of linear independence, which I realize I never defined explicitly in class. A set of vectors $B=\{v_1,v_2,\dots,v_k\in\mathbb{F}^n\}$ are linearly independent if for every $v_i (1\le i\le k)$, the following is true
$v_i\not\in \{a_1v_1+\dots +a_{i-1}v_{i-1}+a_{i+1}v_{i+1}+\dots +a_nv_n| \\~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(a_1,\dots a_{i-1},a_{i+1},\dots,a_n)\in \mathbb{F}_q^{k-1}\}.$
In other words, $v_i$ is not in the span of $\{v_1,\dots,v_{i-1},v_{i+1},\dots,v_k\}$. Note that any basis of a linear subspace (as was defined in class today) comprises of linearly independent vectors.

Coming back to the proof. Let $S\subseteq \mathbb{F}_ q^n$ be a linear subspace such that $q^k< |S|, for some $k\ge 0$. Iteratively, we will construct a set of linearly indepdent vectors $B\subseteq S$ such that $|B|\ge k+1$. Note that by the definition of a linear subsapce the span of $B$ should be contained in $S$. However, this is a contradiction as the span of $B$ is at least $q^{k+1}>|S|$.

To complete the proof, we show how to construct the set $B$ in a greedy fashion. In the first step pick $v_1$ to be any non-zero vector in $S$ and set $B\leftarrow \{v_1\}$ (we can find such a vector as $|S|>q^k\ge 1$). Now say after the step $t$ (for some $t\le k$), $|B|=t$. Now the size of the span of the current $B$ is $q^t\le q^k<|S|$. Thus there exists a vector $v_{t+1}\in S\setminus B$ that is linearly independent of vectors in $B$. Set $B\leftarrow B\cup \{v_{t+1}\}$. Thus, we can continue buidling $B$ till $|B|=k+1$, as desired.