Theoretical Computer Science Stack Exchange is a question and answer site for theoretical computer scientists and researchers in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Assuming I have a graph $G$, with edges $E$ and vertices $V$, and the length of each edge is known, but the coordinates of vertices are not.

Further assume that this is a graph that can be embedded on a 2D plane, what is the algorithm that can create a "nice" drawing with no edge intersection?

Obviously there are many ways the graph can be drawn, and the definition of nice is a bit fuzzy (for practical purpose I would define it as something that is pleasing to the human eyes), but I would only need a good enough algorithm for this.

Note there could be many graphs with its embedding and I frankly don't care the algorithm gives me which, as long as it is pleasant looking enough and it has all the above constraint satisfied.

The motivation for this question is this: imagine that you have to design a circuit layout, the path that connects between two electronic components is $E$, and the vertex of each component is $V$, as a part of your engineering design you know that the distance between each component is pre-specified. As a designer, you would have to arrange the components on the board so that it looks nice. How can you design the circuit layout?

share|cite|improve this question
@Graviton:The question is essentially not about embeddings but about drawings. So it's desirable to change the title of your question. Further, I guess, it should be specified whether planar embedding of graph is given and if it's not then whether the problem of finding planar embeddings of the considered class is in P. – Oleksandr Bondarenko Mar 28 '11 at 10:23
@oleksandr, question updated. Also, I explicitly mention that the graph can be embedded. – Graviton Mar 28 '11 at 10:27
@Graviton: As I understood you have possibly one graph with its embedding and you care only about aesthetic drawing of only this one, doesn't you? – Oleksandr Bondarenko Mar 28 '11 at 10:41
@Oleksandr, nope. There could be many graphs with its embedding and I frankly don't care the algorithm gives me which, as long as it is pleasant looking enough, – Graviton Mar 28 '11 at 11:15
@Graviton: I mean if you consider arbitrary graphs then how you could find desired drawing with the given edge lengths if even for restricted classes of graphs finding Planar Embedding with Specified Edge Lengths is NP-hard (see…). – Oleksandr Bondarenko Mar 28 '11 at 11:49
up vote 11 down vote accepted

There is considerable work on the problem of finding planar embeddings with specified edge lengths. Survey and some results can be found in $[1]$.

  1. Cabello, S. and Demaine, E.D. and Rote, G., "Planar embeddings of graphs with specified edge lengths," Graph Drawing, 283--294, 2004.
share|cite|improve this answer

Check TULIP -, it might work well for you

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.