The Hamming graph H(d, q), sometimes also denoted q^d, is the graph Cartesian product of d copies of the complete graph K_q. H(d, q) therefore has q^d vertices. H(d, q) has chromatic number q, is distance-regular, and has graph diameter d. Special cases are summarized in the following table.