# Hamming graph

Jump to navigation Jump to search
Hamming graph
Named afterRichard Hamming
Vertices$q^{d}$ Edges${\frac {d(q-1)q^{d}}{2}}$ Diameter$d$ Spectrum$\{(d(q-1)-qi)^{{\binom {d}{i}}(q-1)^{i}};i=0,\ldots ,d\}$ Properties$d(q-1)$ -regular
Vertex-transitive
Distance-regular
Notation$H(d,q)$ Table of graphs and parameters

Hamming graphs are a special class of graphs named after Richard Hamming and used in several branches of mathematics and computer science. Let S be a set of q elements and d a positive integer. The Hamming graph H(d,q) has vertex set Sd, the set of ordered d-tuples of elements of S, or sequences of length d from S. Two vertices are adjacent if they differ in precisely one coordinate; that is, if their Hamming distance is one. The Hamming graph H(d,q) is, equivalently, the Cartesian product of d complete graphs Kq.

In some cases, Hamming graphs may be considered more generally as the Cartesian products of complete graphs that may be of varying sizes. Unlike the Hamming graphs H(d,q), the graphs in this more general class are not necessarily distance-regular, but they continue to be regular and vertex-transitive.

## Special Cases

• H(2,3), which is the generalized quadrangle G Q (2,1)
• H(1,q), which is the complete graph Kq
• H(2,q), which is the lattice graph Lq,q and also the rook's graph
• H(d,1), which is the singleton graph K1
• H(d,2), which is the hypercube graph Qd
• Because Cartesian products of graphs preserve the property of being a unit distance graph, the Hamming graphs H(d,2) and H(d,3) are all unit distance graphs.

## Applications

The Hamming graphs are interesting in connection with error-correcting codes and association schemes, to name two areas. They have also been considered as a communications network topology in distributed computing.

## Computational complexity

It is possible in linear time to test whether a graph is a Hamming graph, and in the case that it is, find a labeling of it with tuples that realizes it as a Hamming graph.