# User:ECCclass/Plotkin

In the mathematics of coding theory, the Plotkin bound, named after Morris Plotkin, is a bound on the maximum possible number of codewords in binary codes of given length n and given minimum distance d.

## Statement of the bound

We say a code is binary, if the codewords use symbols from the binary alphabet ${\displaystyle \{0,1\}}$. In particular, if all codewords have a fixed length n, we speak of a binary code of length n. Equivalently, we may consider in this case the codewords as elements of vector space ${\displaystyle \mathbb {F} _{2}^{n}}$ over the finite field ${\displaystyle \mathbb {F} _{2}}$. Let ${\displaystyle d}$ be the minimum distance of ${\displaystyle C}$, i.e.

${\displaystyle d=\min _{x,y\in C,x\neq y}d(x,y)}$

where ${\displaystyle d(x,y)}$ is the Hamming distance between ${\displaystyle x}$ and ${\displaystyle y}$. The expression ${\displaystyle A_{2}(n,d)}$ represents the maximum number of possible codewords in a binary code of length ${\displaystyle n}$ and minimum distance ${\displaystyle d}$. The Plotkin bound places a limit on this expression.

Theorem (Plotkin bound):

i) If ${\displaystyle d}$ is even and ${\displaystyle 2d>n}$, then

${\displaystyle A_{2}(n,d)\leq 2\left\lfloor {\frac {d}{2d-n}}\right\rfloor .}$

ii) If ${\displaystyle d}$ is odd and ${\displaystyle 2d+1>n}$, then

${\displaystyle A_{2}(n,d)\leq 2\left\lfloor {\frac {d+1}{2d+1-n}}\right\rfloor .}$

iii) If ${\displaystyle d}$ is even, then

${\displaystyle A_{2}(2d,d)\leq 4d.}$

iv) If ${\displaystyle d}$ is odd, then

${\displaystyle A_{2}(2d+1,d)\leq 4d+4}$

where ${\displaystyle \left\lfloor ~\right\rfloor }$ denotes the floor function.

## Proof of case i

Let ${\displaystyle d(x,y)}$ be the Hamming distance of ${\displaystyle x}$ and ${\displaystyle y}$, and ${\displaystyle M}$ be the number of elements in ${\displaystyle C}$ (thus, ${\displaystyle M}$ is equal to ${\displaystyle A_{2}(n,d)}$). The bound is proved by bounding the quantity ${\displaystyle \sum _{x,y\in C}d(x,y)}$ in two different ways.

On the one hand, there are ${\displaystyle M}$ choices for ${\displaystyle x}$ and for each such choice, there are ${\displaystyle M-1}$ choices for ${\displaystyle y}$. Since by definition ${\displaystyle d(x,y)\geq d}$ for all ${\displaystyle x}$ and ${\displaystyle y}$, it follows that

${\displaystyle \sum _{x,y\in C,x\neq y}d(x,y)\geq M(M-1)d.}$

On the other hand, let ${\displaystyle A}$ be an ${\displaystyle M\times n}$ matrix whose rows are the elements of ${\displaystyle C}$. Let ${\displaystyle s_{i}}$ be the number of zeros contained in the ${\displaystyle i}$'th column of ${\displaystyle A}$. This means that the ${\displaystyle i}$'th column contains ${\displaystyle M-s_{i}}$ ones. Each choice of a zero and a one in the same column contributes exactly ${\displaystyle 2}$ (because ${\displaystyle d(x,y)=d(y,x)}$) to the sum ${\displaystyle \sum _{x,y\in C}d(x,y)}$ and therefore

${\displaystyle \sum _{x,y\in C}d(x,y)=\sum _{i=1}^{n}2s_{i}(M-s_{i}).}$

If ${\displaystyle M}$ is even, then the quantity on the right is maximized if and only if ${\displaystyle s_{i}=M/2}$ holds for all ${\displaystyle i}$, then

${\displaystyle \sum _{x,y\in C}d(x,y)\leq {\frac {1}{2}}nM^{2}.}$

Combining the upper and lower bounds for ${\displaystyle \sum _{x,y\in C}d(x,y)}$ that we have just derived,

${\displaystyle M(M-1)d\leq {\frac {1}{2}}nM^{2}}$

which given that ${\displaystyle 2d>n}$ is equivalent to

${\displaystyle M\leq {\frac {2d}{2d-n}}.}$

Since ${\displaystyle M}$ is even, it follows that

${\displaystyle M\leq 2\left\lfloor {\frac {d}{2d-n}}\right\rfloor .}$

On the other hand, if ${\displaystyle M}$ is odd, then ${\displaystyle \sum _{i=1}^{n}2s_{i}(M-s_{i})}$ is maximized when ${\displaystyle s_{i}={\frac {M\pm 1}{2}}}$ which implies that

${\displaystyle \sum _{x,y\in C}d(x,y)\leq {\frac {1}{2}}n(M^{2}-1).}$

Combining the upper and lower bounds for ${\displaystyle \sum _{x,y\in C}d(x,y)}$, this means that

${\displaystyle M(M-1)d\leq {\frac {1}{2}}n(M^{2}-1)}$

or, using that ${\displaystyle 2d>n}$,

${\displaystyle M\leq {\frac {2d}{2d-n}}-1.}$

Since ${\displaystyle M}$ is an integer,

${\displaystyle M\leq \left\lfloor {\frac {2d}{2d-n}}-1\right\rfloor =\left\lfloor {\frac {2d}{2d-n}}\right\rfloor -1\leq 2\left\lfloor {\frac {d}{2d-n}}\right\rfloor .}$

This completes the proof of the bound.