The Hamming scheme, named after Richard Hamming, is also known as the hyper-cubic association scheme, and it is the most important example for coding theory. In this scheme X = F n , {\displaystyle X={\mathcal {F}}^{n},} the set of binary vectors of length n , {\displaystyle n,} and two vectors x , y ∈ F n {\displaystyle x,y\in {\mathcal {F}}^{n}} are i {\displaystyle i} -th associates if they are Hamming distance i {\displaystyle i} apart.
Recall that an association scheme is visualized as a complete graph with labeled edges. The graph has v {\displaystyle v} vertices, one for each point of X , {\displaystyle X,} and the edge joining vertices x {\displaystyle x} and y {\displaystyle y} is labeled i {\displaystyle i} if x {\displaystyle x} and y {\displaystyle y} are i {\displaystyle i} -th associates. Each edge has a unique label, and the number of triangles with a fixed base labeled k {\displaystyle k} having the other edges labeled i {\displaystyle i} and j {\displaystyle j} is a constant c i j k , {\displaystyle c_{ijk},} depending on i , j , k {\displaystyle i,j,k} but not on the choice of the base. In particular, each vertex is incident with exactly c i i 0 = v i {\displaystyle c_{ii0}=v_{i}} edges labeled i {\displaystyle i} ; v i {\displaystyle v_{i}} is the valency of the relation R i . {\displaystyle R_{i}.} The c i j k {\displaystyle c_{ijk}} in a Hamming scheme are given by
Here, v = | X | = 2 n {\displaystyle v=|X|=2^{n}} and v i = ( n i ) . {\displaystyle v_{i}={\tbinom {n}{i}}.} The matrices in the Bose-Mesner algebra are 2 n × 2 n {\displaystyle 2^{n}\times 2^{n}} matrices, with rows and columns labeled by vectors x ∈ F n . {\displaystyle x\in {\mathcal {F}}^{n}.} In particular the ( x , y ) {\displaystyle (x,y)} -th entry of D k {\displaystyle D_{k}} is 1 {\displaystyle 1} if and only if d H ( x , y ) = k . {\displaystyle d_{H}(x,y)=k.}