Skip to content

Hypercube Graph

The graph on all n-bit strings with an edge exactly when two strings differ in one bit.

Version
v1 · 2026-10-03 · History
Domain-specific #
13316
Domain group
Formal Sciences
Origin domain
Mathematics
Subdomains
Graph Theory, Combinatorics → Mathematics
Aliases
N Cube Graph, Binary Hypercube Graph, Cube Graph

Core Idea

The hypercube graph \(Q_n\) has every length-\(n\) binary string as a vertex and joins two strings exactly when one bit differs. An equivalent picture uses all subsets of an \(n\)-element set, with an edge when one element is added or removed. This gives \(2^n\) vertices and \(n\) neighbors per vertex. Graph distance equals Hamming distance because each differing coordinate must be changed, and changing each once gives a shortest path. These properties are exact consequences of the construction, not merely its appearance as a drawn cube.[1][2]

How would you explain it like I'm…

Flip-One-Switch Map

Imagine a row of light switches, each on or off. Every way the switches can be set is a dot. Draw a line between two dots if you can get from one to the other by flipping just one switch. That dot-and-line picture is a Hypercube Graph.

The Bit-Flip Network

Write down every string of 0s and 1s of a chosen length n. Each string is a dot (a vertex). Connect two dots with a line (an edge) when their strings differ in exactly one spot. With n = 3 you get 8 dots joined just like the corners and edges of a cube. Every dot has exactly n neighbors, one for each digit you could flip. The fewest steps between two strings is simply how many spots they differ in.

Binary Words, One-Bit Edges

The Hypercube Graph Q_n has one vertex for every binary word of length n. Two vertices are adjacent exactly when their words differ in one coordinate. Equivalently, vertices are subsets of an n-element set, joined when they differ by adding or removing one element. There are 2^n vertices, each with n neighbors, so for n ≥ 1 there are n·2^(n−1) edges. A shortest path between two words must flip each differing bit at least once, and flipping each exactly once works. So graph distance equals Hamming distance, and the farthest two vertices are n apart. What defines it is the bit-flip rule, not any cube-shaped drawing.

 

For a nonnegative integer n, the Hypercube Graph Q_n has vertex set {0,1}^n, with an edge between two words iff they differ in exactly one coordinate. An equivalent model uses the power set of an n-element set, where adjacency means symmetric difference of size one. It is the abstract corner-and-edge graph of the n-cube, independent of any geometric embedding. Counting gives 2^n vertices. Each vertex has exactly n neighbors, one per flippable bit, so Q_n is n-regular, and for n ≥ 1 it has n·2^(n−1) edges. A shortest x–y path must flip every bit where x and y differ at least once, and a path flipping each once achieves that bound. Hence graph distance equals Hamming distance and the diameter is n. These properties are consequences of the edge rule, not extra defining conditions.

Scope of Application

The graph appears in combinatorics, Boolean-lattice cover graphs, binary Gray-code traversals and ideal processor interconnection networks. The original nCUBE 1 design describes processors connected in hypercube fashion, scaling to a possible 1024 processors; a full ideal model would be \(Q_{10}\). The model says which address pairs are directly linked and how many hops a route needs, but not whether a particular machine has all processors installed or whether physical links are fault-free.[3][4]

Clarity

A graph is \(Q_n\) only if it has all \(2^n\) coordinate labels, up to isomorphism, and exactly the one-bit edges. In \(Q_3\), 000 is adjacent to 001, 010 and 100, but not to 111; the latter is three hops away. A partial cube may embed isometrically into a cube without containing all its vertices or edges. Cube-connected cycles changes each cube vertex into a cycle. Neither is an alias for the full \(Q_n\).[2]

Manages Complexity

Instead of listing every edge, the one-bit rule specifies the entire graph. Fixing one coordinate divides \(Q_n\) into two \(Q_{n-1}\) copies joined by a matching, which supports recursive proofs and designs. This compression also exposes a tradeoff in a processor network: the ideal maximum route length is only \(n\) hops among \(2^n\) nodes, while each processor needs \(n\) dimension links. The graph does not measure wiring cost or traffic congestion.[2][4]

Abstract Reasoning

For two addresses, XOR marks exactly the coordinates on which they differ. Flipping each marked coordinate once, in any order, yields an ideal shortest route. A parity split of the words proves bipartiteness, and degree counting gives \(n2^{n-1}\) edges for \(n\geq1\). A cyclic binary Gray code follows a Hamiltonian cycle, but that claim requires \(n\geq2\) under the standard simple-graph convention; \(Q_0\) and \(Q_1\) do not have such cycles.[1][2][4]

Knowledge Transfer

Binary words, subsets and processor addresses instantiate the same structure when they preserve the full coordinate space and exactly one-coordinate-change adjacency. Changing “flip a bit” to “add or remove one subset element” preserves the graph and its Hamming shortest paths. Restricting to a selected codeword subset, dropping network links or adding extra links does not: the result may still be related to a cube, but it is no longer the full \(Q_n\).[2][4]

Relationships to Other Abstractions

Local relationship map for Hypercube GraphParents appear above the current abstraction, mutual partners to the right, and children below. Node labels state whether each abstraction is prime or domain-specific; colors identify relation types.Hypercube GraphDOMAINDomain-specific abstraction: Partial cube — is a kind ofPartial cubeDOMAIN

Current abstraction Hypercube Graph Domain-specific

Parents (1) — outgoing typed relations

  • Hypercube Graph is a kind of Partial cube Domain-specific

    Every hypercube graph embeds isometrically in itself, while many partial cubes are not full hypercubes.

Hierarchy path (1) — routes to 1 parentless root

Neighborhood in Abstraction Space

Hypercube Graph sits in a moderately populated region (53rd percentile for distinctiveness): it has near-neighbors but no dense thicket of look-alikes.

Family — Graph Structures & Combinatorial Objects (48 abstractions)

Nearest neighbors

Computed from structural-signature embeddings · 2026-11-14

References

[1] Elena Konstantinova, Lecture notes on some problems on Cayley graphs (University of Primorska, 2012), §2.3.1 p.14 and §3.1 pp.21–23. Author textbook PDF. registry ↩a ↩b

[2] Darij Grinberg, Math 530 Spring 2022, Lecture 6: Hamiltonian Paths (version 31 March 2026), §1.2.4 Definition 1.2.8 and Theorem 1.2.9 pp.11–12; §1.2.5 Proposition 1.2.11 p.13; §1.2.6 pp.13–14. Author lecture notes. registry ↩a ↩b ↩c ↩d ↩e

[3] S. Colley, J. Palmer, J. P. Hayes, T. N. Mudge and Q. F. Stout, “A Microprocessor-based Hypercube Supercomputer,” IEEE Micro 6 (1986): 6–17, original author-hosted abstract, architecture paragraph. Author record. registry ↩

[4] Bhagirath Narahari, Interconnection Networks lecture notes, “Hypercube Interconnection Network,” pp.7–8. Author course PDF. registry ↩a ↩b ↩c ↩d