The treewidth and pathwidth of hypercubes

The d-dimensional hypercube, H"d, is the graph on 2^d vertices, which correspond to the 2^dd-vectors whose components are either 0 or 1, two of the vertices being adjacent when they differ in just one coordinate. The notion of Hamming graphs (denoted by K"q^d) generalizes the notion of hypercubes: The vertices correspond to the q^dd-vectors where the components are from the set {0,1,2,...,q-1}, and two of the vertices are adjacent if and only if the corresponding vectors differ in exactly one component. In this paper we show that the pw(H"d)=@?"m"="0^d^-^1mm2 and the tw(K"q^d)=@q(q^d/d).