Drawing Directed Acyclic Graphs: Minimizing edge crossing?

Posted by Robert Fraser on Stack Overflow See other posts from Stack Overflow or by Robert Fraser
Published on 2010-05-17T21:47:26Z Indexed on 2010/05/17 22:50 UTC
Read the original article Hit count: 297

Laying out the verticies in a DAG in a tree form (i.e. verticies with no in-edges on top, verticies dependent only on those on the next level, etc.) is rather simple without graph drawing algorithms such as Efficient Sugimiya. However, is there a simple algorithm to do this that minimizes edge crossing? (For some graphs, it may be impossible to completely eliminate edge crossing.) A picture says a thousand words, so is there an algorithm that would suggest:

No edge crossing

instead of:

Serious edge crossing

EDIT: As the picture suggests, a vertex's inputs are always on top and outputs are always below, which is another barrier to just pasting in an existing layout algorithm.

© Stack Overflow or respective owner

Related posts about graph-drawing

Related posts about graph