GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Algebra
  • Applied Mathematics
  • Calculus and Analysis
  • Discrete Mathematics
  • Foundations of Mathematics
  • Geometry
  • History and Terminology
  • Number Theory
  • Probability and Statistics
  • Recreational Mathematics
  • Topology
  • Alphabetical Index
  • Random Entry
  • New in MathWorld

This view

  • Original page
  • New address

GeezerVison is showing mathworld.wolfram.com — Hypercube Graph -- from Wolfram MathWorld

Search

Hypercube Graph


DOWNLOAD Mathematica NotebookDownload Wolfram Notebook
HypercubeGraphs

The n-hypercube graph, also called the n-cube graph and commonly denoted Q_n or 2^n, is the graph, for a nonnegative integer n, whose vertices are the 2^n binary strings (epsilon_1,...,epsilon_n) where epsilon_i=0 or 1 and two vertices are adjacent iff the symbols differ in exactly one coordinate.

For n>=1, each vertex of Q_n has vertex degree n. The handshaking lemma therefore gives 2^(n-1)n edges. Including the singleton graph Q_0, the edge counts are 0, 1, 4, 12, 32, 80, ... (OEIS A001787).

The graph of the n-hypercube is given by the graph Cartesian product of path graphs P_2 square ... square P_2_()_(n). The hypercube graph Q_n is isomorphic to the Hasse diagram for the Boolean algebra of subsets of an n-element set. Q_n is also isomorphic to the simplex graph of the complete graph K_n (Alikhani and Ghanbari 2024).

The locally twisted cube graph LTQ_n (n>=2) modifies the recursive perfect matching between two copies of the preceding graph. It retains the 2^n vertices and n2^(n-1) edges of Q_n, while reducing the graph diameter from n to approximately n/2 (Yang et al. 2005). Unlike hypercube graphs, these graphs are not bipartite for n>=3.

HypercubeGraphIsometricEmbeddings

The above figures show orthographic projections of some small n-hypercube graphs using the first two of each vertex's set of n coordinates. Note that Q_3 above is a projection of the usual cube looking along a space diagonal so that the top and bottom vertices coincide, and hence only seven of the cube's eight vertices are visible. In addition, three of the central edges connect to the upper vertex, while the other three connect to the lower vertex.

Hypercube graphs may be computed in the Wolfram Language using the command HypercubeGraph[n], and precomputed properties of hypercube graphs are implemented in the Wolfram Language as GraphData[{"Hypercube", n}].

Special cases are summarized in the following table.

nQ_n
0singleton graph K_1
1path graph P_2
2square graph C_4
3cubical graph Q_3
4tesseract graph Q_4

For n>=2, hypercube graphs are Hamiltonian, and any Hamiltonian cycle of a labeled hypercube graph defines a cyclic binary Gray code (Skiena 1990, p. 149; Mütze 2024). The numbers of Hamiltonian cycles in hypercube graphs were considered by Dixon and Goodman (1975).

Hypercube graphs are also graceful (Maheo 1980, Kotzig 1981, Gallian 2026), antipodal, and (most likely) dominating unique.

The numbers of (directed) Hamiltonian paths whose endpoints are nonadjacent on an n-hypercube graph for n=1, 2, ... are 0, 0, 48, 48384, 129480729600, ... (OEIS A006070; extending the result of Gardner 1986, pp. 23-24). The numbers of (directed) Hamiltonian cycles for n=2, 3, ... are 2, 12, 2688, 1813091520, ... (Harary et al. 1988; OEIS A003042). For n=1, the graph Q_1=K_2 has no Hamiltonian cycle under the convention that a graph cycle has at least three vertices.

Closed formulas for the numbers c_k of cycles of length k in Q_n are given by c_k=0 for k odd and

c_4=2^(n-3)(n-1)n
(1)
c_6=(2^n(n-2)(n-1)n)/3
(2)
c_8=2^(n-4)(n-2)(n-1)n(27n-79)
(3)
c_(10)=(2^(n-1)(n-3)(n-2)(n-1)n(124n-441))/5
(4)

(E. Weisstein, Nov. 16, 2014 and Apr. 19, 2023).

Hypercube graphs are distance-transitive, and therefore also distance-regular.

Alspach (2010) reports that Ringel showed in 1954 that the hypercube graphs Q_n admit Hamilton decompositions whenever n is a power of 2. Alspach et al. (1990) showed that every Q_n for n>2 admits a Hamilton decomposition.

HypercubeGraphUnitDistance

For n>=1, the hypercube graphs are also unit-distance (Gerbracht 2008), as illustrated above for the first few hypercube graphs. This follows by induction starting with a single unit-length edge. Given a unit-distance embedding of Q_n, choose a unit translation vector that is not the difference of any two existing vertices. There are only finitely many forbidden vectors, so such a choice exists. The original embedding and its translate have disjoint vertex sets. Joining corresponding vertices by unit-length edges constructs Q_(n+1).

Determining the domination number gamma(Q_n) is intrinsically difficult (Azarija et al. 2017) and exact values are known for n<=9 (Östergård and Blass 2001, Bertolo et al. 2004) and the infinite families n=2^k-1 and n=2^k for k>=1 (Azarija et al. 2017, Theorem 3). Azarija et al. (2017) showed that domination and total domination numbers of the hypercube graph are related by gamma_t(Q_(n+1))=2gamma(Q_n).

Q_n is planar for n<=3, so has graph crossing number cr(Q_n)=0 for n<=3. Eggleton and Guy (1970) claimed to have discovered an upper bound for the graph crossing number of cr(Q_n)<=a(n) for n>=3, where

a(n)=5/(32)4^n-|_(n^2+1)/2_|2^(n-2)
(5)
=2^(n-5)(5·2^n-4n^2+2(-1)^n-2).
(6)

The first few values for n=3, 4, ... are 0, 8, 56, 352, 1760, 8192, 35712, ... (OEIS A307813).

An error was subsequently found, but Erdős and Guy (1973) then conjectured that not only was the original bound correct (though not yet proved), but that cr(Q_n)=a(n) (Clancy et al. 2020, pp. 258-259). While it is known that cr(Q_4)=8, exact values for larger n are not known (Clancy et al. 2020, p. 259). However, upper bounds are directly computable using QuickCross (Haythorpe) which correspond to the Eggleton and Guy values for n<=6 (E. Weisstein, Apr. 30, 2019). In addition, the Erdős and Guy (1973) conjecture has now been refuted since it is known that cr(Q_7)<=1744<a(7) (Clancy et al. 2020, p. 259).

The coil-in-the-box problem asks for the maximum length of an induced cycle in Q_n. The induced condition excludes edges between nonconsecutive vertices of the cycle.

The geodesic transversal number is the minimum cardinality of a vertex set meeting every inclusion-maximal graph geodesic. Chen et al. (2026) proved

 [(2^n)/([n/2]+1)]<=gt(Q_n)<=(n; |_n/2_|)
(7)

for n>=2, where [x] and |_x_| denote the ceiling function and floor function.


See also

Cube-Connected Cycle Graph, Cube Polynomial, Cubical Graph, Distance-Regular Graph, Distance-Transitive Graph, Fibonacci Cube Graph, Folded Cube Graph, Hypercube, Locally Twisted Cube Graph, Norine's Antipodal-Coloring Conjecture, Square Graph, Tesseract Graph

Explore with Wolfram|Alpha

WolframAlpha

More things to try:

  • hypercube graph
  • area between the curves y=1-x^2 and y=x
  • directrix of parabola x^2+3y=16

References

Alikhani, S. and Ghanbari, N. "Golden Ratio in Graph Theory: A Survey." 9 Jul 2024. https://arxiv.org/abs/2407.15860.Alspach, B. "Three Hamilton Decomposition Problems." University of Western Australia. May 11, 2010. https://symomega.wordpress.com/wp-content/uploads/2010/05/talk8.pdf.Alspach, B.; Bermond, J.-C.; and Sotteau, D. "Decomposition Into Cycles. I. Hamilton Decompositions." In Proceedings of the NATO Advanced Research Workshop on Cycles and Rays: Basic Structures in Finite and Infinite Graphs Held in Montreal, Quebec, May 3-9, 1987 (Ed. G. Hahn, G. Sabidussi, and R. E. Woodrow). Dordrecht, Holland: Kluwer, pp. 9-18, 1990.Azarija, J.; Henning, M. A.; and Klavžar, S. "(Total) Domination in Prisms." Elec. J. Combin. 24, P1.19, 2017. https://doi.org/10.37236/6288.Bertolo, R.; Östergård, P. R. J.; and Weakley, W. D. "An Updated Table of Binary/ternary Mixed Covering Codes." J. Combin. Des. 12, 157-176, 2004.Biggs, N. L. Algebraic Graph Theory, 2nd ed. Cambridge, England: Cambridge University Press, p. 161, 1993.Chen, S.; Ma, X.; and Wu, T. "On Two Problems Concerning the Geodesic Transversal Number of Graphs." 29 Oct 2026. https://arxiv.org/abs/2610.39298.Clancy, K.; Haythorpe, M.; and Newcombe, A. "A Survey of Graphs with Known or Bounded Crossing Numbers." Australas. J. Combin. 78, 209-296, 2020. https://ajc.maths.uq.edu.au/pdf/78/ajc_v78_p209.pdf.Čunát, V. "Hypercube Problems." Lecture 13. Oct. 1, 2013. https://ktiml.mff.cuni.cz/~gregor/hypercube/hypercubes_lec13.pdf.DistanceRegular.org. "Hamming Graphs H(d,q)." https://www.math.mun.ca/distanceregular/indexes/hamminggraphs.html.Dixon, E. and Goodman, S. "On the Number of Hamiltonian Circuits in the n-Cube." Proc. Amer. Math. Soc. 50, 500-504, 1975.Eggleton, R. B. and Guy, R. K. "The Crossing Number of the n-Cube." Not. Amer. Math. Soc. 17, 757, 1970.Erdős, P. and Guy, R. K. "Crossing Number Problems." Amer. Math. Monthly 80, 52-58, 1973.Gallian, J. A. "A Dynamic Survey of Graph Labeling." Elec. J. Combin., Dynamic Survey DS6, Nov. 6, 2026. https://doi.org/10.37236/27.Gardner, M. "The Binary Gray Code." In Knotted Doughnuts and Other Mathematical Entertainments. New York: W. H. Freeman, pp. 23-24, 1986.Gerbracht, E. H.-A. "On the Unit Distance Embeddability of Connected Cubic Symmetric Graphs." Kolloquium über Kombinatorik. Magdeburg, Germany. Nov. 15, 2008.Gross, J. T. and Yellen, J. Graph Theory and Its Applications. Boca Raton, FL: CRC Press, p. 14, 1999.Harary, F.; Hayes, J. P.; and Wu, H.-J. "A Survey of the Theory of Hypercube Graphs." Comput. Math. Appl. 15, 277-289, 1988.Haythorpe, M. "QuickCross--Crossing Number Problem." https://web.archive.org/web/20191121044911/http://www.flinders.edu.au:80/science_engineering/csem/research/programs/flinders-hamiltonian-cycle-project/quickcross.cfm.House of Graphs. Hypercube Graphs. Singleton Graph, K_2, Square Graph (C_4), The cube Q_3, Tesseract Graph (Q_4), and others.Kotzig, A. "Decomposition of Complete Graphs Into Isomorphic Cubes." J. Combin. Th. 31, 292-296, 1981.Maheo, M. "Strongly Graceful Graphs." Disc. Math. 29, 39-46, 1980.Mütze, T. "On Hamilton Cycles in Graphs Defined by Intersecting Set Systems." Not. Amer. Math. Soc. 71, 583-592, 2024. https://doi.org/10.1090/noti2907.Östergård, P. R. J. and Blass, U. "On the Size of Optimal Binary Codes of Length 9 and Covering Radius 1." IEEE Trans. Inform. Th. 47, 2556-2557, 2001.Skiena, S. "Hypercubes." §4.2.5 in Implementing Discrete Mathematics: Combinatorics and Graph Theory with Mathematica. Reading, MA: Addison-Wesley, pp. 148-150, 1990.Yang, X.; Evans, D. J.; and Megson, G. M. "The Locally Twisted Cubes." Int. J. Comput. Math. 82, 401-413, 2005. https://doi.org/10.1080/0020716042000301752.Sloane, N. J. A. Sequences A001787, A003042, A006070, and A307813 in "The On-Line Encyclopedia of Integer Sequences."

Referenced on Wolfram|Alpha

Hypercube Graph

Cite this as:

Weisstein, Eric W. "Hypercube Graph." From MathWorld--A Wolfram Resource. https://mathworld.wolfram.com/HypercubeGraph.html

Subject classifications

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.