Layered graph drawing explained

Layered graph drawing or hierarchical graph drawing is a type of graph drawing in which the vertices of a directed graph are drawn in horizontal rows or layers with the edges generally directed downwards.[1] [2] [3] It is also known as Sugiyama-style graph drawing after Kozo Sugiyama, who first developed this drawing style.[4]

The ideal form for a layered drawing would be an upward planar drawing, in which all edges are oriented in a consistent direction and no pairs of edges cross. However, graphs often contain cycles, minimizing the number of inconsistently oriented edges is NP-hard, and minimizing the number of crossings is also NP-hard; so, layered graph drawing systems typically apply a sequence of heuristics that reduce these types of flaws in the drawing without guaranteeing to find a drawing with the minimum number of flaws.

Layout algorithm

The construction of a layered graph drawing proceeds in a sequence of steps:

Implementations

In its simplest form, layered graph drawing algorithms may require O(mn) time in graphs with n vertices and m edges, because of the large number of dummy vertices that may be created. However, for some variants of the algorithm, it is possible to simulate the effect of the dummy vertices without actually constructing them explicitly, leading to a near-linear time implementation.[18]

The "dot" tool in Graphviz produces layered drawings.[9] A layered graph drawing algorithm is also included in Microsoft Automatic Graph Layout[19] and in Tulip.[20]

Variations

Although typically drawn with vertices in rows and edges proceeding from top to bottom, layered graph drawing algorithms may instead be drawn with vertices in columns and edges proceeding from left to right.[21] The same algorithmic framework has also been applied to radial layouts in which the graphs are arranged in concentric circles around some starting node[3] [22] and to three-dimensional layered drawings of graphs.[3] [23]

In layered graph drawings with many long edges, edge clutter may be reduced by grouping sets of edges into bundles and routing them together through the same set of dummy vertices.[24] Similarly, for drawings with many edges crossing between pairs of consecutive layers, the edges in maximal bipartite subgraphs may be grouped into confluent bundles.[25]

Drawings in which the vertices are arranged in layers may be constructed by algorithms that do not follow Sugiyama's framework. For instance, it is possible to tell whether an undirected graph has a drawing with at most k crossings, using h layers, in an amount of time that is polynomial for any fixed choice of k and h, using the fact that the graphs that have drawings of this type have bounded pathwidth.[26]

For layered drawings of concept lattices, a hybrid approach combining Sugiyama's framework with additive methods (in which each vertex represents a set and the position of the vertex is a sum of vectors representing elements in the set) may be used. In this hybrid approach, the vertex permutation and coordinate assignment phases of the algorithm are replaced by a single phase in which the horizontal position of each vertex is chosen as a sum of scalars representing the elements for that vertex.[27] Layered graph drawing methods have also been used to provide an initial placement for force-directed graph drawing algorithms.[28]

Notes and References

  1. .
  2. .
  3. .
  4. .
  5. .
  6. .
  7. .
  8. .
  9. .
  10. .
  11. .
  12. .
  13. .
  14. .
  15. .
  16. .
  17. .
  18. .
  19. .
  20. .
  21. .
  22. .
  23. .
  24. .
  25. .
  26. .
  27. Richard. Cole. Proceedings of the 24th Australian Computer Science Conference. ACSC 2001 . Automated layout of concept lattices using layered diagrams and additive diagrams . 23. 1. 2001. 47–53. 10.1109/ACSC.2001.906622. 0-7695-0963-0. 7143873 .
  28. 18. Benno Schwikowski. Peter Uetz. Stanley Fields. amp. Nature Biotechnology. A network of protein−protein interactions in yeast. 2000. 11101803. 1257–61. 10.1038/82360. 12. 3009359 .