Bend minimization


In graph drawing styles that represent the edges of a graph by polylines, it is desirable to minimize the number of bends per edge or the total number of bends in a drawing. Bend minimization is the algorithmic problem of finding a drawing that minimizes these quantities.

Eliminating all bends

The prototypical example of bend minimization is Fáry's theorem, which states that every planar graph can be drawn with no bends, that is, with all its edges drawn as straight line segments.
Drawings of a graph in which the edges are both bendless and axis-aligned are sometimes called rectilinear drawings, and are one way of constructing RAC drawings in which all crossings are at right angles. However, it is NP-complete to determine whether a planar graph has a planar rectilinear drawing, and NP-complete to determine whether an arbitrary graph has a rectilinear drawing that allows crossings.

Bend minimization

showed that bend minimization of orthogonal drawings of planar graphs, in which the vertices are placed in an integer lattice and the edges are drawn as axis-aligned polylines, could be performed in polynomial time by translating the problem into one of minimum-cost network flow. However, if the planar embedding of the graph may be changed, then bend minimization becomes NP-complete, and must instead be solved by techniques such as integer programming that do not guarantee both a fast runtime and an exact answer.

Few bends per edge

Many graph drawing styles allow bends, but only in a limited way: the curve complexity of these drawings is bounded by some fixed constant. Allowing this constant to grow larger can be used to improve other aspects of the drawing, such as its area. Alternatively, in some cases, a drawing style may only be possible when bends are allowed; for instance, not every graph has a RAC drawing with no bends, or with curve complexity two, but every graph has such a drawing with curve complexity three.