# Dimension (graph theory)

The dimension of the Petersen graph is 2.

In mathematics, and particularly in graph theory, the dimension of a graph is the least integer ${\displaystyle n}$ such that there exists a "classical representation" of the graph in the Euclidean space of dimension ${\displaystyle n}$ with all the edges having unit length.

In a classical representation, the vertices must be distinct points, but the edges may cross one another.[1]

The dimension of a graph ${\displaystyle G}$ is written: ${\displaystyle dim\,G}$.

For example, the Petersen graph can be drawn with unit edges in ${\displaystyle E^{2}}$, but not in ${\displaystyle E^{1}}$: its dimension is therefore 2 (see the figure to the right).

This concept was introduced in 1965 by Paul Erdős, Frank Harary and William Tutte.[2] It generalises the concept of unit distance graph to more than 2 dimensions.

## Examples

With 4 equally spaced points, we need 3 dimensions.

### Complete graph

In the worst case, every pair of vertices is connected, giving a complete graph.

To immerse the complete graph ${\displaystyle K_{n}}$ with all the edges having unit length, we need the Euclidean space of dimension ${\displaystyle n-1}$. For example, it takes two dimensions to immerse ${\displaystyle K_{3}}$ (an equilateral triangle), and three to immerse ${\displaystyle K_{4}}$ (a regular tetrahedron) as shown to the right.

In other words, the dimension of the complete graph is the same as that of the simplex having the same number of vertices.

The complete bipartite graph ${\displaystyle K_{4,2}}$ drawn in Euclidean 3-space.

### Complete bipartite graphs

A star graph drawn in the plane with edges of unit length.

All star graphs ${\displaystyle K_{m,1}}$, for ${\displaystyle m\geq 3}$, have dimension 2, as shown in the figure to the left. Star graphs with ${\displaystyle m}$ equal to 1 or 2 need only dimension 1.

The dimension of a complete bipartite graph ${\displaystyle K_{m,2}}$, for ${\displaystyle m\geq 3}$, can be drawn as in the figure to the right, by placing ${\displaystyle m}$ vertices on a circle whose radius is less than a unit, and the other two vertices one each side of the plane of the circle, at a suitable distance from it. ${\displaystyle K_{2,2}}$ has dimension 2, as it can be drawn as a unit rhombus in the plane.

Template:Collapse top To show that 4-space is sufficient, as with the previous case, we use circles.

Denoting the coordinates of the 4-space by ${\displaystyle w,x,y,z}$, we arrange one set of vertices arbitrarily on the circle given by ${\displaystyle w^{2}+x^{2}=a,y=0,z=0}$ where ${\displaystyle 0, and the other set arbitrarily on the circle ${\displaystyle y^{2}+z^{2}=1-a,w=0,x=0}$. Then we see that the distance between any vertex in one set and any vertex in the other set is ${\displaystyle {\sqrt {w^{2}+x^{2}+y^{2}+z^{2}}}={\sqrt {a+1-a}}=1}$.

We can also show that the subgraph ${\displaystyle K_{3,3}}$ does not admit such a representation in a space of dimension less than 3:

If such such a representation exists, then the three points ${\displaystyle A_{1}}$, ${\displaystyle A_{2}}$ and ${\displaystyle A_{3}}$ lie on a unit sphere with center ${\displaystyle B_{1}}$. Likewise, they lie on unit spheres with centers ${\displaystyle B_{2}}$ and ${\displaystyle B_{3}}$. The first two spheres must intersect in a circle, in a point, or not at all; to accommodate the three distinct points ${\displaystyle A_{1}}$, ${\displaystyle A_{2}}$ and ${\displaystyle A_{3}}$, we must assume a circle. Either this circle lies entirely on the third unit sphere, implying that the third sphere coincides with one of the other two, so ${\displaystyle B_{1}}$, ${\displaystyle B_{2}}$ and ${\displaystyle B_{3}}$ are not all distinct; or it does not, so its intersection with the third sphere is no more than two points, insufficient to accommodate ${\displaystyle A_{1}}$, ${\displaystyle A_{2}}$ and ${\displaystyle A_{3}}$. Template:Collapse bottom

To summarise:

${\displaystyle dim\,K_{m,n}=1,2,3{\text{ or }}4}$, depending on the values of ${\displaystyle m}$ and ${\displaystyle n}$.

## Dimension and chromatic number

Template:Collapse top This proof also uses circles.

We write ${\displaystyle n}$ for the chromatic number of ${\displaystyle G}$, and assign the integers ${\displaystyle (1..n)}$ to the ${\displaystyle n}$ colours. In ${\displaystyle 2n}$-dimensional Euclidean space, with its dimensions denoted ${\displaystyle x_{1},x_{2},..x_{2n}}$, we arrange all the vertices of colour ${\displaystyle n}$ arbitrarily on the circle given by ${\displaystyle x_{2n-2}^{2}+x_{2n-1}^{2}=1/2,\quad x_{i}|(i\neq 2{n-2},i\neq 2{n-1})=0}$.

Then the distance from a vertex of colour ${\displaystyle p}$ to a vertex of colour ${\displaystyle q}$ is given by ${\displaystyle {\sqrt {x_{2p-2}^{2}+x_{2p-1}^{2}+x_{2q-2}^{2}+x_{2q-1}^{2}}}={\sqrt {1/2+1/2}}=1}$. Template:Collapse bottom

## Euclidean dimension

The wheel graph with one spoke removed is of dimension 2.
The same wheel is of Euclidean dimension 3.

The definition of the dimension of a graph given above says, of the minimal-${\displaystyle n}$ representation:

This definition is rejected by some authors. A different definition was proposed in 1991 by Alexander Soifer, for what he termed the Euclidean dimension of a graph.[3] Previously, in 1980, Paul Erdős and Miklós Simonovits had already proposed it with the name faithful dimension.[4] By this definition, the minimal-${\displaystyle n}$ representation is one such that two vertices of the graph are connected if and only if their representations are at distance 1.

The figures opposite show the difference between these definitions, in the case of a wheel graph having a central vertex and six peripheral vertices, with one spoke removed. Its representation in the plane allows two vertices at distance 1, but they are not connected.

We write this dimension as ${\displaystyle Edim\,G}$. It is never less than the dimension defined as above:

${\displaystyle dim\,G\leq Edim\,G}$

## Euclidean dimension and maximal degree

Paul Erdős and Miklós Simonovits proved the following result in 1980:[4]

## Computational complexity

It is NP-hard, and more specifically complete for the existential theory of the reals, to test whether the dimension or the Euclidean dimension of a given graph is at most a given value. The problem remains hard even for testing whether the dimension or Euclidean dimension is two.[5]

## References

1. Some mathematicians regard this strictly as an "immersion", but many graph theorists, including Erdős, Harary and Tutte, use the term "embedding".
2. {{#invoke:Citation/CS1|citation |CitationClass=journal }}
3. {{#invoke:citation/CS1|citation |CitationClass=book }}
4. {{#invoke:Citation/CS1|citation |CitationClass=journal }}
5. {{#invoke:citation/CS1|citation |CitationClass=citation }}.