. Every
tree is a partial cube. For, suppose that a tree has edges, and number these edges (arbitrarily) from to . Choose a root vertex for the tree, arbitrarily, and label each vertex with a string of bits that has a 1 in position whenever edge lies on the path from to in . For instance, itself will have a label that is all zero bits, its neighbors will have labels with a single 1-bit, etc. Then the
Hamming distance between any two labels is the
distance between the two vertices in the tree, so this labeling shows that is a partial cube. Every
hypercube graph is itself a partial cube, which can be labeled with all the different bitstrings of length equal to the dimension of the hypercube. More complex examples include the following: • Consider the graph whose vertex labels consist of all possible -digit bitstrings that have either or nonzero bits, where two vertices are adjacent whenever their labels differ by a single bit. This labeling defines an embedding of these graphs into a hypercube (the graph of all bitstrings of a given length, with the same adjacency-condition) that turns out to be distance-preserving. The resulting graph is a
bipartite Kneser graph; the graph formed in this way with has 20 vertices and 30 edges, and is called the
Desargues graph. • All
median graphs are partial cubes. The trees and hypercube graphs are examples of median graphs. Since the median graphs include the
squaregraphs,
simplex graphs, and
Fibonacci cubes, as well as the covering graphs of finite
distributive lattices, these are all partial cubes. • The
planar dual graph of an
arrangement of lines in the
Euclidean plane is a partial cube. More generally, for any
hyperplane arrangement in
Euclidean space of any number of dimensions, the graph that has a vertex for each cell of the arrangement and an edge for each two adjacent cells is a partial cube. • A partial cube in which every vertex has exactly three neighbors is known as a
cubic partial cube. Although several infinite families of cubic partial cubes are known, together with many other sporadic examples, the only known cubic partial cube that is not a
planar graph is the Desargues graph. • The underlying graph of any
antimatroid, having a vertex for each set in the antimatroid and an edge for every two sets that differ by a single element, is always a partial cube. • The
Cartesian product of any finite set of partial cubes is another partial cube. • A
subdivision of a
complete graph is a partial cube if and only if either every complete graph edge is subdivided into a two-edge path, or there is one complete graph vertex whose incident edges are all unsubdivided and all non-incident edges have been subdivided into even-length paths. ==The Djoković–Winkler relation==