Skip to main content
4 of 8
deleted 5 characters in body
M. Winter
  • 13.6k
  • 3
  • 28
  • 70

If the graph $G=(V,E)$ has a lot of symmetries, then using spectral embeddings might give you nice drawings that reflects these symmetries. The success of this method (e.g. whether the drawing is planar, whether all vertices are on a sphere) depends on a lot of factors, some of which are not completely clear to me. However, what I can tell you is that it works for the graphs of all uniform 3-polytopes (so, e.g., the dodecahedron).

I explain the most straight forward way to do it, some tweaks might be neccessary for the general case:

Costruction. Let $\theta$ be an eigenvalue of (the adjacency matrix of) $G$, and $v_1,v_2,v_3\in\Bbb R^n$ three ortho-normal eigenvectors to $\theta$. Construct the matrix $M:=(v_1,v_2,v_3)\in\Bbb R^{n\times 3}$ with the $v_i$ as columns. The rows of that matrix are a 3-dimensional embedding of the vertices of $G$.

Usually, you should take $\theta_2$, i.e., the second-largest eigenvalue of the adjacency matrix of $G$. Surprisingly, this eigenvalue has multiplicity three for most symmetric graphs that come from 3-polytopes (exceptions are, as far as I know, only prisms). This means, you cannot do anything wrong by choosing just any orthonormal basis of eigenvectors.

Here is code for Mathematica to automatically find a nice drawing of the dodecahedral graph:

G = GraphData["DodecahedralGraph"];

A = AdjacencyMatrix[G];
n = VertexCount[G];
eval = Eigenvalues[A // N];
th2 = RankedMax[eval, 2];
evec = NullSpace[A - th2*IdentityMatrix[n]];

GraphPlot3D[G,
    VertexCoordinateRules -> Table[i -> evec[[{1,2,3}, i]], {i, 1, n}]
]

Output:

If $\theta_2$ does have multiplicity $<3$, you can add eigenvectors of other eigenvalues until you have three, preferably from the next largest eigenvalues. Just do not use the largest eigenvalue.

M. Winter
  • 13.6k
  • 3
  • 28
  • 70