Codes consisting of one codeword are perfect.

163 Views Asked by At

the text I am reading makes the statement that the trivial codes are perfect, including when $C$ is the entire space, and when $C$ consists of exactly one codeword. It provides no proof of these, so I was doing them on my own.

I was able to find how to show when $C$ was the entire space, but I am having some issues when $C$ consists of just one codeword. I have been trying to expand:

$\sum_{i=0}^n{{n}\choose{i}}(q-1)^i$ to show that it equals $q^n$, which would result in:

${{q^n}\over{q^n}}=1$

Any suggestions would be appreciated.

1

There are 1 best solutions below

6
On BEST ANSWER

Let $x=q-1$, so that $x+1=q$. Then by the binomial theorem

$$q^n=(x+1)^n=\sum_{i=0}^n\binom{n}ix^i1^{n-i}=\sum_{i=0}^n\binom{n}i(q-1)^i\;.$$