Hamming graph

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search
Hamming graph
Named afterRichard Hamming
Table of graphs and parameters
H(3,3) drawn as a unit distance graph

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.[1]

In some cases, Hamming graphs may be considered more generally as the Cartesian products of complete graphs that may be of varying sizes.[2] 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[edit]

  • H(2,3), which is the generalized quadrangle G Q (2,1)[3]
  • H(1,q), which is the complete graph Kq[4]
  • H(2,q), which is the lattice graph Lq,q and also the rook's graph[5]
  • H(d,1), which is the singleton graph K1
  • H(d,2), which is the hypercube graph Qd.[1] Hamiltonian paths in these graphs form Gray codes.
  • Because Cartesian products of graphs preserve the property of being a unit distance graph,[6] the Hamming graphs H(d,2) and H(d,3) are all unit distance graphs.


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

Computational complexity[edit]

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.[2]


  1. ^ a b c Brouwer, Andries E.; Haemers, Willem H. (2012), Spectra of graphs, Universitext, New York: Springer, p. 178, doi:10.1007/978-1-4614-1939-6, ISBN 978-1-4614-1938-9, MR 2882891.
  2. ^ a b Imrich, Wilfried; Klavžar, Sandi (2000), "Hamming graphs", Product graphs, Wiley-Interscience Series in Discrete Mathematics and Optimization, Wiley-Interscience, New York, pp. 104–106, ISBN 978-0-471-37039-0, MR 1788124.
  3. ^ Blokhuis, Aart; Brouwer, Andries E.; Haemers, Willem H. (2007), "On 3-chromatic distance-regular graphs", Designs, Codes and Cryptography, 44 (1–3): 293–305, doi:10.1007/s10623-007-9100-7, MR 2336413. See in particular note (e) on p. 300.
  4. ^ a b Dekker, Anthony H.; Colbert, Bernard D. (2004), "Network robustness and graph topology", Proceedings of the 27th Australasian conference on Computer science - Volume 26, ACSC '04, Darlinghurst, Australia, Australia: Australian Computer Society, Inc., pp. 359–368.
  5. ^ Bailey, Robert F.; Cameron, Peter J. (2011), "Base size, metric dimension and other invariants of groups and graphs", Bulletin of the London Mathematical Society, 43 (2): 209–242, doi:10.1112/blms/bdq096, MR 2781204.
  6. ^ Horvat, Boris; Pisanski, Tomaž (2010), "Products of unit distance graphs", Discrete Mathematics, 310 (12): 1783–1792, doi:10.1016/j.disc.2009.11.035, MR 2610282
  7. ^ Sloane, N. J. A. (1989), "Unsolved problems in graph theory arising from the study of codes" (PDF), Graph Theory Notes of New York, 18: 11–20.
  8. ^ Koolen, Jacobus H.; Lee, Woo Sun; Martin, William J. (2010), "Characterizing completely regular codes from an algebraic viewpoint", Combinatorics and graphs, Contemp. Math., 531, Providence, RI: Amer. Math. Soc., pp. 223–242, arXiv:0911.1828, doi:10.1090/conm/531/10470, ISBN 9780821848654, MR 2757802. On p. 224, the authors write that "a careful study of completely regular codes in Hamming graphs is central to the study of association schemes".

External links[edit]