construct hypercube graph
The HypercubeGraph(n) command creates the hypercube graph of dimension n on 2n vertices. The vertex labels are strings of binary vectors of length n, and two vertices are joined by an edge if and only if they differ in exactly one coordinate. Note, the hypercube graph for n=2 is a square and for n=3 it is a cube.
H ≔ HypercubeGraph⁡3
H≔Graph 1: an undirected graph with 8 vertices and 12 edge(s)
Hypercube graphs have Hamiltonian cycles.
Download Help Document