Number [n,k]-linear codes with one fixed vector

473 Views Asked by At

I need to find the number of $[n,k]$-linear binary codes with one fixed codeword x (non zero) in it.

So I guess, I need to count the number of $k$-dimensional linear codes with vector $x$ in basis:

We have $2^n-2$ codewords (excluded $0$ and $x$) to choose as a basis vector. if we add vectors in basis (with vector $x$ in it) subsequently, we will get:

the number of $k$-linear codes with $x$ in basis = $\frac{\prod 2^n - 2^i,i=1..k-1}{\prod 2^n - 2^i, i=1,..k-1}$

I think something is wrong here.

Can I just say that required number = the number of $k$-linear codes with $x$ **in basis ?

1

There are 1 best solutions below

1
On BEST ANSWER

$\newcommand{\span}{\operatorname{span}}$Let $C$ be a $[n,k]$-linear binary code containing a fixed codeword $0 \ne x \in \mathbb{F}_2^n$. Then $\span(x)$ is a subspace of $C$, so $C = \span(x) + V$ ($ = \{ ax + b \mid a \in \mathbb{F}_2, b \in V \}$) for some $(k-1)$-dimensional subspace $V \le \mathbb{F}_2^n$ not containing $\span(x)$.

As $V \cap \span(x) = 0$ and $\span(x)$ is $1$-dimensional, there are as many ways to choose $V$ as there are to choose a $(k-1)$-dimensional subspace of a $(n-1)$-dimensional space (think of it as "choosing the dimensions other than $\span(x)$"). The number of ways to choose a $(k-1)$-dimensional subspace out of a $(n-1)$-dimensional space is the q-binomial coefficient (with $q=2$),

$$ \binom{n-1}{k-1}_2 = \frac{ (1 - 2^{n-1}) (1 - 2^{n-2}) \cdots (1 - 2^{n-k+1}) }{ (1 - 2) (1 - 2^2) \cdots (1 - 2^{k-1}) }. $$

So, given a fixed $0 \ne x$, there are $\binom{n-1}{k-1}_2$ binary $[n,k]$-linear codes containing $x$.