RAC drawing

In graph drawing, a RAC drawing of a graph is a drawing in which the vertices are represented as points, the edges are represented as straight line segments or polylines, at most two edges cross at any point, and when two edges cross they do so at right angles to each other. In the name of this drawing style, "RAC" stands for "right angle crossing".

The right-angle crossing style and the name "RAC drawing" for this style were both formulated by, motivated by previous user studies showing that crossings with large angles are much less harmful to the readability of drawings than shallow crossings. Even for planar graphs, allowing some right-angle crossings in a drawing of the graph can significantly improve measures of the drawing quality such as its area or angular resolution.

Examples
The complete graph K5 has a RAC drawing with straight edges, but K6 does not. Every 6-vertex RAC drawing has at most 14 edges, but K6 has 15 edges, too many to have a RAC drawing.

A complete bipartite graph Ka,b has a RAC drawing with straight edges if and only if either min(a,b) ≤ 2 or a + b ≤ 7. If min(a,b) ≤ 2, then the graph is a planar graph, and (by Fáry's theorem) every planar graph has a straight-line drawing with no crossings. Such a drawing is automatically a RAC drawing. The only two cases remaining are the graphs K3,3 and K3,4. A drawing of K3,4 is shown; K3,3 can be formed from it by deleting one vertex. Neither of the next two larger graphs, K4,4 and K3,5, has a RAC drawing.

Edges and bends
If an n-vertex graph (n &geq; 4) has a RAC drawing with straight edges, it can have at most 4n − 10 edges. This is tight: there exist RAC-drawable graphs with exactly 4n − 10 edges. For drawings with polyline edges, the bound on the number of edges in the graph depends on the number of bends that are allowed per edge. The graphs that have RAC drawings with one or two bends per edge have O(n) edges; more specifically, with one bend there are at most 5.5n edges and with two bends there are at most 74.2n edges. Every graph has a RAC drawing with three bends per edge.

Relation to 1-planarity
A graph is 1-planar if it has a drawing with at most one crossing per edge. Intuitively, this restriction makes it easier to cause this crossing to be at right angles, and the 4n − 10 bound on the number of edges of straight-line RAC drawings is close to the bounds of 4n − 8 on the number of edges in a 1-planar graph, and of 4n − 9 on the number of edges in a straight-line 1-planar graph. Every RAC drawing with 4n − 10 edges is 1-planar. Additionally, every outer-1-planar graph (that is, a graph drawn with one crossing per edge with all vertices on the outer face of the drawing) has a RAC drawing. However, there exist 1-planar graphs with 4n − 10 edges that do not have RAC drawings.

Computational complexity
It is NP-hard to determine whether a given graph has a RAC drawing with straight edges, even if the input graph is 1-planar and the output RAC drawing must be 1-planar as well. More specifically, RAC drawing is complete for the existential theory of the reals. The RAC drawing problem remains NP-hard for upward drawing of directed acyclic graphs. However, in the special case of outer-1-planar graphs, a RAC drawing can be constructed in linear time.