On RAC Drawings of Graphs with Two Bends per Edge

. It is shown that every n -vertex graph that admits a 2-bend RAC drawing in the plane, where the edges are polylines with two bends per edge and any pair of edges can only cross at a right angle, has at most 24 n − 26 edges for n ≥ 3. This improves upon the previous upper bound of 74 . 2 n ; this is the first improvement in more than 12 years. A crucial ingredient of the proof is an upper bound on the size of plane multigraphs with polyline edges in which the first and last segments are either parallel or orthogonal.


Introduction
Right-angle-crossing drawings (for short, RAC drawings) were introduced by Didimo et al. [9].In a RAC drawing of a graph G = (V, E), the vertices are distinct points in the plane, edges are polylines, each composed of finitely many line segments, and any two edges can cross only at a 90 • angle.For an integer b ≥ 0, a RAC b drawing is a RAC drawing in which every edge is a polyline with at most b bends; and a RAC b graph is an abstract graph that admits such a drawing.Didimo et al. [9] proved that every RAC 0 graph on n ≥ 4 vertices has at most 4n − 10 edges, and this bound is tight when n = 3h − 5 for all h ≥ 3; see also [11].They also showed that every graph is a RAC 3 graph.
Angelini et al. [2] proved that every RAC 1 graph on n vertices has at most 5.5n − O(1) edges, and this bound is the best possible up to an additive constant.The only previous bound on the size of RAC 2 graphs is due to Arikushi et al. [6]: They showed that every RAC 2 graph on n vertices has at most 74.2n edges, and constructed RAC 2 graphs with 47  6 n − O( Recently, Angelini et al. [4] constructed an infinite family of RAC 2 graphs with 10n − O(1) edges; and conjectured that this lower bound is the best possible.See recent surveys [8,10] and results [3,12,14,15] for other aspects of RAC drawings.The concept of RAC drawings was also generalized to angles other than 90 • , and to combinatorial constraints on the crossing patterns in a drawing [1].
The main result of this note is the following theorem.
This improves upon the upper bound 24n − 26 in the conference version of this paper [16], which in turn was the first improvement on the size of RAC 2 graphs in more than 12 years.
Related Results and Open Problems.Several special cases of the problem have also been considered: A drawing of a graph is simple if any pair of edges share at most one point, which may be a crossing or a common endpoint.In a non-simple drawing, a lens is a region bounded by a closed Jordan curve, comprised of two Jordan arcs, each of which is part of the drawing of an edge.A drawing of a graph is non-homotopic if the interior of every lens contains a vertex or a crossing.Note that every simple drawing is non-homotopic (since it does not contain any lens).In the general case (e.g., the setting of Theorem 1), there are no such restrictions on the drawings.
Recently, Kaufmann et al. [13] proved an upper bound of 10n − 19 for the number of edges in non-homotopic RAC 2 drawings with n ≥ 3 vertices.They also constructed a simple RAC 2 drawing with 10n − O(1) edges and n = k 2 + 8 vertices for all k ≥ 1 (the earlier lower bound construction for 10n − O(1) by Angelini et al. [4] was neither simple nor non-homotopic).Thus the bound 10n − O(1) is tight for non-homotopic and for simple RAC 2 drawings.It is also known that every simple (resp., non-homotopic) RAC 1 drawing with n vertices has at most 5n − O(1) edges, and this bound is the best possible [2,13].
Schaefer [15] proved that recognizing RAC 0 graphs is ∃R-complete (this problem was previously known to be NP-hard [5]).It is also ∃R-complete to decide whether a graph admits a RAC 0 drawing isomorphic to a given drawing in which every edge has at most eleven crossings.It is an open problem whether RAC 1 and RAC 2 graphs can be recognized efficiently; this problem is open even if all crossing edge pairs are given.

Multigraphs with Angle-Constrained End Segments
A plane multigraph G = (V, E) is a multigraph embedded in the plane such that the vertices are distinct points, and the edges are Jordan arcs between the corresponding vertices (not passing through any other vertex), and any pair of edges may intersect only at vertices.The multiplicity of an edge between vertices u and v is the total number of edges in E between u and v.
We define a plane ortho-fin multigraph as a plane multigraph G = (V, E) such that every edge e ∈ E is a polygonal path e = (p 0 , p 1 , . . ., p k ) where the first and last edge segments are either parallel or orthogonal, that is, p 0 p 1 ∥p k−1 p k or p 0 p 1 ⊥ p k−1 p k .See Fig. 1 for examples.
It is not difficult to see that in a plane ortho-fin multigraph, every vertex is incident to at most three loops and the multiplicity of any edge between two distinct vertices is at most eight; both bounds can be attained (see Fig. The key technical tool is the following.For a face P of a plane multigraph G = (V, E), let the potential Φ(P ) be the sum of interior angles of P over all vertices in V incident to P .
Lemma 1 Let G = (V, E) be a plane ortho-fin multigraph.Then for every face P , the potential Φ(P ) is a multiple of π/2.
Proof: Let G = (V, E) be a plane ortho-fin multigraph with n vertices.We may assume w.l.o.g. that G is connected.Since Φ(P ) is determined by the edges and vertices of G on the boundary of P , we may assume that all edges and vertices of G are incident to P .
Cycle Multigraphs.Assume first that G is a cycle (possibly a loop or a double edge); this assumption is dropped later.We may further assume, w.l.o.g., that P lies in the interior of the cycle G.Indeed, denote the interior and exterior face of G by P int and P ext , respectively.At each vertex of G, the interior and exterior angles sum to 2π.Consequently, Φ(P int ) + Φ(P ext ) = 2π • n.
It follows that if Φ(P int ) is a multiple of π/2, then so is Φ(P ext ).We distinguish between three cases based on the number of vertices in V .(1) Assume that G has only one vertex, denoted v ∈ V .Then P is bounded by a counterclockwise loop e = (p 0 , p 1 , . . ., p k ) incident to the vertex v = p 0 = p k .Since p 0 p 1 ∥p k−1 p k or p 0 p 1 ⊥ p k−1 p k , then the interior angle of P at v is π/2, π, or 3π/2.We see that Φ(P ) is a multiple of π/2.
(3) Let P be bounded by a simple closed curve γ that passes through k ≥ 3 vertices, v 1 , . . ., v k ∈ V , in counterclockwise order.Let γ ′ = (v 1 , . . ., v k ) be a (not necessarily simple) polygonal curve, with straight-line edges between consecutive vertices in V .Then the sum of angles on the left side of γ ′ at the vertices is V is a multiple of π.We can transform γ ′ to γ by successively replacing the straight-line edges v i v i+1 with the corresponding polyline edges of the ortho-fin multigraph G.If the first and last edge of the ortho-fin edge between v i and v i+1 have the same direction, then replacing the straight-line edge with such an ortho-fin edge does not change the sum of interior angles.In any other case, the sum of interior angles changes by a multiple of π/2.Consequently, the sum of angles over vertices in V in the polygon in the interior of γ is also a multiple of π/2.This proves that Φ(P ) is a multiple of π/2.General Case.It remains to address the general case when G is not necessarily a cycle.We proceed by induction on the number of cut vertices of G.In the base case, G does not have any cut vertices, so it is a simple cycle.
For the induction step, assume that G has c ≥ 1 cut vertices.Let v 0 ∈ V be a cut vertex; see Fig. 2. Then G decomposes into k ≥ 2 maximal multigraphs G 1 , . . ., G k , in which v 0 is not a cut vertex.Clearly, v 0 is the only common vertex of any two of these multigraphs, and they each have fewer than c cut vertices.The face P of G is contained in some face of every sub-multigraph.Let P i denote the face of G i such that P ⊂ P i for all i ∈ {1, . . ., k}.Since v 0 is not a cut vertex of G i , then P i has a unique interior angle incident to v 0 , ∠u i v 0 w i (possibly u i = w i ), which contributes to Φ(P i ).The exterior angles ∠w i v 0 w i are pairwise disjoint, and P has k disjoint angles at v 0 .Since P ⊂ P i for all i ∈ {1, . . ., k}, then all k interior angles of G at v 0 are contained in ∠u i v 0 w i .Using inclusion-exclusion, they sum to 2π − . By induction, Φ(P 1 ), . . ., Φ(P k ) are multiples of π/2, consequently Φ(P ) is also a multiple of π/2.This completes the induction step, hence the entire proof.□ Theorem 2 Every plane ortho-fin multigraph on n ≥ 1 vertices has at most 5n − 2 edges, and this bound is the best possible.
Proof: Let G = (V, E) be a plane ortho-fin multigraph, and denote its faces by P 1 , . . ., P f .Assume first that G is connected.Lemma 1 implies Φ(P i ) ≥ π/2 for all i ∈ {1, . . ., f }.Since the faces of G have pairwise disjoint interiors, then at each vertex v ∈ V , the interior angles at v over all faces sum to 2π.Summation of the potential over all faces yields f • n, which implies f ≤ 4n.We combine this inequality with Euler's polyhedron formula, n − |E| + f = 2 (which holds for connected multigraphs), and obtain It remains to consider the case that G is disconnected.Assume that G has k components with n 1 , . . .n k vertices, resp., where  For a matching lower bound, we construct plane ortho-fin multigraphs with n vertices and 5n − 2 edges for n ≥ 1.It is enough to construct ortho-fin multigraphs in which the potential of every face is precisely π/2.For n = 1, consider a single vertex v and three loops, each of which is a unit square with a corner at v. For n = 2, let G 2 be the orho-fin multigraph on vertex set {v 1 , v 2 } and eight parallel edges as shown in Fig. 3.For every n ≥ 3, we construct G n from G n−1 by adding vertex v n and five new edges, as indicated in Fig. 3: Two straight-line edges v 1 v n and v 2 v n , and three square-shaped loops incident to v n : one loop inside the obtuse triangle ∆(v 1 v 2 v n ) and two loops outside.By induction, G n is a plane ortho-fin multigraph with n vertices and 5n − 2 edges.□

Proof of Theorem 1
Let G = (V, E) be a RAC 2 drawing with n ≥ 3 vertices.Assume w.l.o.g. that every edge has two bends (by subdividing edge segments if necessary), and the middle segment of every edge has positive or negative slope (not 0 or ∞), by rotating the entire drawing by a small angle if necessary.Each edge has two end segments and one middle segment.We classify crossings as end-end, end-middle, and middle-middle based on the crossing segments.Arikushi et al. [6] defined a "block" on the set of 3|E| edge segments.First define a symmetric relation on the edge segments: s 1 ∼ s 2 iff s 1 and s 2 cross.The transitive closure of this relation is an equivalence relation.A block is the set of segments in an equivalence class.Equivalently, two edge segments, s a and s b , are in the same block if there exists a sequence of segments (s a = s 1 , s 2 , . . ., s t = s b ) such that any two consecutive segments cross (necessarily at 90 • angle).Note each block consists of segments of exactly two orthogonal directions, and the union of segments in a block is connected; see Fig. 4(a) for examples.

Matching End Segments in Blocks
Let B be a block of G = (V, E) (refer to Fig. 4 a terminal if it is a vertex in V (that is, an endpoint of some edge in E).If a terminal p is incident to k > 1 edges of the arrangement A, we shorten these edges in a sufficiently small ε-neighborhood of p, and split p into k terminals (Fig. 4(b)).We may now assume that each terminal has degree 1 in A, hence there are end(B) terminals in A.
Let T be a minimum tree in A that spans all terminals.It is well known that one can find ⌊ 1  2 end(B)⌋ pairs of terminals such that the (unique) paths between these pairs in T are pairwise edge-disjoint (e.g., take a minimum-weight matching of ⌊ 1  2 end(B)⌋ pairs of terminals).If k > 1 terminals correspond to the same vertex p ∈ V , then we can extend the paths by ε > 0 to p, and the extended paths are still edge-disjoint.Let E(B) be the set of these paths (Fig. 4(c)).
Let E be the union of the sets E(B) over all blocks B; see Fig. 5(left).Since every path in E is a simple polygonal path between points in V , it can be interpreted as the drawing of an edge in a multigraph on the vertex set V , and so E is a set of edges on V .With this interpretation, H = (V, E) is a plane ortho-fin multigraph.Indeed, the edges of H are paths in E. This means that no two edges of H cross.Each edge of H is a path within the same block, and so the first and last segment of each edge of H are either parallel or orthogonal to each other.
We say that an edge e ∈ E represents an edge f ∈ E if the first or last edge segment of f contains the first or last edge segment of the edge e.By definition, each edge e ∈ E represents at most two edges in E.

H
G 1 G 2

Gap Planar Graphs
Let E 0 ⊂ E be the set of edges in G = (V, E) that are not represented in H, and let G 0 = (V, E 0 ).Clearly G 0 is a RAC 2 drawing with n vertices.
Lemma 2 In the drawing G 0 = (V, E 0 ), there is no end-end crossing, and each middle segment is crossed by at most one end segment.
Proof: A block of G 0 is a subarrangement of a block of G.In every block of G, there is at most one end segment whose edge is not represented by some edge in H = (V, E).Consequently, in every block of G 0 , there is at most one end segment.Both claims follow. □ ), such that E 1 contains all edges in E whose middle segments have negative slopes, and E 2 = E 0 \ E 1 ; see Fig. 5 for an example.

Lemma 3
In each of G 1 = (V, E 1 ) and G 2 = (V, E 2 ), all crossings are end-middle crossings, and every middle segment has at most one crossing.
Proof: Since G 1 (resp., G 2 ) is a RAC 2 drawing, where all middle segments have positive (resp., negative) slopes, then the middle segments do not cross.Combined with Lemma 2, this implies that all crossings are end-middle crossings, and every middle segment crosses at most one end segment.□ Bae et al. [7] defined a k-gap planar graph, for an integer k ≥ 0, as a graph G that can be drawn in the plane such that (1) exactly two edges of G cross in any point, (2) each crossing point is assigned to one of its two crossing edges, and (3) each edge is assigned with at most k of its crossings.
Proof: Every crossing is an end-middle crossing by Lemma 3. Assign each crossing to the edge that contains the middle segment involved in the crossing.Then each edge is assigned with at most one crossing by Lemma 3; see Fig. 6. □ Bae et al. [7] proved that every 1-gap planar graph on n ≥ 3 vertices has at most 5n − 10 edges, and this bound is the best possible for n ≥ 5.They have further proved that a multigraph with n ≥ 3 vertices that has a 1-gap planar drawing in which no two parallel edges are homotopic has at most 5n − 10 edges.It follows that G 1 and G 2 each have at most 5n − 10 edges if n ≥ 3.
Proof of Theorem 1: Let G = (V, E) be a RAC 2 drawing.Graph H = (V, E) represents at most 2(5n − 2) = 10n − 4 edges of G by Theorem 2. The remaining edges of G are partitioned between G 1 and G 2 , each containing at most 5n − 10 edges for n ≥ 3; see Fig. 6.Overall, G has at most 20n − 24 edges if n ≥ 3. □

Figure 1 :
Figure 1: (a) A plane ortho-fin multigraph with 3 vertices and 7 edges.The parallel edges e and f form a simple polygon P with potential Φ(P ) = π/2.(b) A plane ortho-fin multigraph with 2 vertices and 7 edges.

Figure 2 :
Figure 2: A plane ortho-fin multigraph G with a cut vertex v 0 ; and its decomposition into three plane ortho-fin multigraphs G 1 , G 2 and G 3 .Face P is the intersection of a bounded face P 1 of G 1 and two unbounded faces P 2 and P 3 of G 2 and G 3 , respectively.

Figure 4 :
Figure 4: (a) Three blocks in a RAC 2 drawing.(b) A spanning tree T , after splitting five terminals in V into nine terminals (red dots).(c) A plane ortho-fin multigraph on the five terminals in V .

Figure 5 :
Figure 5: Graphs H (left), G 1 (middle) and G 2 (right) for the RAC 2 drawing in Fig. 4. The original RAC 2 drawing is shown in light gray for comparison.

Figure 6 :
Figure 6: A RAC 2 drawing: All crossings are between end-and middle-segments, and every middlesegment has positive slope and at most one crossing.