Journal of Graph Algorithms and Applications Drawing K N in Three Dimensions with One Bend per Edge

We give a drawing of Kn in three dimensions in which vertices are placed at integer grid points and edges are drawn crossing-free with at most one bend per edge in a volume bounded by O(n 2.5).


Introduction
Drawing graphs in three dimensions has been considered by several authors in the graph-drawing field under a variety of models.One natural model is to draw vertices at integer-valued grid points in a 3D Cartesian coordinate system and represent edges as straight line segments between adjacent vertices with no pair of edges intersecting.The volume of such a drawing is typically defined in terms of a smallest bounding box containing the drawing and with sides orthogonal to one of the coordinate axes.If such a box B has width w, length l and height h, then we refer to the dimensions of B as (w + 1) × (l + 1) × (h + 1) and define the volume of B as (w + 1) • (l + 1) • (h + 1).Note that the volume of B then exactly measures the number of grid points in (or on) the box B.
It was shown by Cohen, Eades, Lin and Ruskey [6] that it is possible to draw any graph in this model, and indeed the complete graph K n is drawable within a bounding box of volume Θ(n 3 ).A lower bound of Ω(n 3 ) on the volume of any such drawing of K n is easily seen via a sweeping plane argument.An axis-parallel plane cannot contain 5 vertices as an edge crossing would then be necessarily produced.Thus, the size of each dimension is n/4 or greater.
Restricted classes of graphs may however be drawn in smaller asymptotic volume.For example, Calamonieri and Sterbini [8] showed that 2-, 3-, and 4-colourable graphs can be drawn in O(n 2 ) volume.Pach, Thiele and Tóth [2] showed a volume bound of Θ(n 2 ) for r-colourable graphs (r a constant).Dujmović, Morin and Wood [11] investigated the connection of bounded treewidth to 3D layouts.Felsner, Liotta and Wismath [7] showed that outerplanar graphs can be drawn in O(n) volume.Establishing tight volume bounds for planar graphs remains an open problem.Dujmović and Wood [9] showed an upper bound of O(n 1.5 ) on the volume of planar graphs at Graph Drawing 2003.
In 2-dimensional graph drawing, the effect of allowing bends in edges has been well studied.For example, Kaufmann and Wiese [3] showed that all planar graphs can be drawn with only 2 bends per edge and all vertices located on a straight line.
The consequences of allowing bends in 3 dimensions has received little attention.Note that bend points must also occur at integer grid points.Bose, Czyzowicz, Morin, and Wood [4] showed that the number of edges in a graph provides an asymptotic lower bound on the volume regardless of the number of bends permitted, thus establishing Ω(n 2 ) as the lower bound on the volume for K n .This lower bound was explicitly achieved by Dyck, Joevenazzo, Nickle, Wilsdon and Wismath [1] who presented a construction with at most 2 bends per edge.The upper bound is also a consequence of a more general result of Dujmović and Wood [10].In [5], Morin and Wood presented a one-bend drawing of K n that achieves O(n 3 / log 2 n) volume.It is the gap between this result and the Ω(n 2 ) lower bound that motivates this paper; we improve the Morin and Wood result to achieve a one-bend non-crossing drawing with volume O(n 2.5 ).
We call the axes of our 3D Cartesian coordinate system respectively X, Y and Z.
The one-bend construction of K n by Morin and Wood [5] considers O(log n) packets of O( n log n ) collinear vertices.All the vertices lie in the XY -plane and edges joining vertices of different packets lie above this plane.Edges joining vertices within a packet lie below this plane and the volume of these (complete) subgraphs is a consequence of the following lemma.Lemma 1 ( [5]) For all q 1, K m has a one-bend non-crossing drawing in an axis-parallel box of size q × m × π 2 3 m 2 q with all the vertices on the Y -axis.
Indeed, Ω(n 3 ) volume is required for a collinear one-bend drawing of K n as shown by Morin and Wood.We present here a brief description of the construction behind Lemma 1 because we will use it in our construction.The edges are divided into Θ(m 2 ) chains of edges (i.e., sequences of edges).A chain connects all vertices with index equal to i modulo j such that the vertices on the chain are ordered with increasing indices.In each chain, the bends are placed on a line parallel to the Y -axis through a point of integer coordinates (x, z) in the XZ-plane.The chains thus lie in planes that contain the Y -axis (where the vertices lie).In the XZ-plane, the points (x, z) are chosen so that they are all strictly visible from the origin.The well-known fact that there are Θ(m 2 ) such choices in a rectangle of size q × m 2 q ensures that all the Θ(m 2 ) chains can be placed in distinct planes, and thus in a way that the edges do not cross.

The construction
Recall that the problem we solve is to draw a complete graph on a threedimensional integer-valued grid where the edges do not cross, and they have at most one bend.Both the vertices and the bends are placed at nodes of the grid.The goal is to minimize the volume of the bounding box of this drawing.In this section, we present our construction.
The construction is roughly as follows (see Figures 1 and 2).We split the n vertices into k packets of n k vertices, where all vertices in one packet have the same X and Z coordinates.All edges of the complete graph contain a bend.All edges joining two vertices of one packet are placed below and right (positive X direction) of the packet, and all edges joining two vertices of different packets are placed "above".We present our construction for an arbitrary k and show later that the volume of the bounding box of the drawing is minimized for k = n 1 4 .We assume for simplicity that n k is an integer.
X and Y coordinates of the vertices.We first describe the X and Ycoordinates of the vertices.Refer to Figure 1(a).All vertices have different Y-coordinates, ranging between 0 and n − 1.We divide the set of n vertices into k packets, denoted V 0 , . . ., V k−1 , of n k vertices.All vertices in the same packet V i have the same X-coordinate 2i, the same Z-coordinate z i (which we will define later), and consecutive Y-coordinates.Precisely, the j-th vertex in the i-th packet, denoted v i,j , has coordinates (2i, i n k + j, z i ), with 0 Edges joining vertices of one packet.Refer to Figure 1(b).Since all the vertices of one packet are collinear, we can draw the complete graph on these vertices using the q × m × O(m 2 /q) volume construction of Morin and Wood [5] described in Section 2. In that construction there are m collinear vertices; here we have m = n k vertices.We choose q = k and draw the edges such that the bounding box of this complete subgraph is below (negative Z) and to the right (positive X) of the vertices.Notice that we have chosen q = k so that these complete subgraphs do not asymptotically increase the width of the final drawing.
In the sequel of the construction, we only consider edges that join vertices of distinct packets, and their bends.
X and Y coordinates of the bends.Recall that v i,j denotes the j-th vertex of the i-th packet.The bend of an edge joining vertex v i1 ,j1 to vertex v i2,j2 , with i 1 < i 2 , is denoted e i1,j1→i2,j2 .It separates the edge into two distinct segments, the outgoing segment which starts at v i1,j1 and ends at e i1,j1→i2,j2 , and the incoming segment which starts with e i1,j1→i2 ,j2 and ends at v i2 ,j2 .
Refer to Figure 2. A bend e i1,j1→i2,j2 has coordinates (2i ), that is, its X-coordinate is one less than the X-coordinate of v i2,j2 , its Ycoordinate is the same as for v i1 ,j1 , and its Z-coordinate, which only depends on v i2,j2 , will be defined later.(Notice that the bends of all edges ending at the same vertex have the same Z-coordinate).
Z-coordinates of the vertices and bends.We assign values to z i and z i,j so that edges do not cross.In fact, our construction is designed to verify the following lemma.In the following, we consider the projection on the XZ-plane of the vertices v i, and bends e , →i,j where can take any value.Note that the projections of v i, and e , →i,j are independent of the choice of .Refer to Figures 2 and 3(a).
Lemma 2 Consider the projection of the drawing onto the XZ-plane.Then, the polar ordering ≺ i0 about v i0, of all vertices v i, and bends e , →i,j such that i 0 < i < k and 0 j < n k satisfies Before proving Lemma 2, we describe our construction.The general idea is that, in projection onto the XZ-plane, all bends e , →i, should lie above the line joining v i−2, to v i−1, , and below the line joining v i−1, to v i, (see Figure 3(a)).Hence, if s i−1 and s i denote the slopes of these two lines, they should obey the recurrence s i = s i−1 + n k + 1.More precisely, the construction goes as follows.
First, let z 0 = 0 and z 1,j = j + 1, then z 1 is chosen such that v 1, is at the same polar angle about v 0, as e 0, →1, n k −1 , which gives Assume now that we have placed vertices and bends up to index i.To get a correct polar ordering around v i−1, we need to have the next bends above the line through v i−1, and v i, thus we place the next bend at z i+1,0 = z i + 1 2 (z i − z i−1 ) + 1 and the following bends on edges going to v i+1, at z i+1,j = z i + 1 2 (z i − z i−1 ) + 1 + j.The next vertex v i+1, is placed at the same polar angle about v i, as e , →i+1, n k −1 which gives To summarize, the coordinates of the vertices and bends are Proof of Lemma 2: The correct polar ordering of the v i, viewed from v i0 , is guaranteed since all these points are ordered on a convex curve (i.e. a parabola).Let L i be the line through v i, and v i+1, .The correct polar ordering of v i, , the e , →i+1,j and v i+1, , viewed from v i, , comes directly from the construction; moreover, this ordering is the same for all viewpoints v i0, , i 0 < i, since these viewpoints lie above L i−1 (see Figure 3(a)).2

Proof of correctness
We say that two edges cross if their relative interiors intersect.We prove in this section that no two edges of our construction cross.We first show that an edge joining two vertices within the same packet crosses no other edge in the drawing.Then, we show that there is no crossing between two outgoing segments, two incoming segments, and finally one outgoing and one incoming segment.
1 An inductive verification is easy since with this formula we have: Edges joining vertices within packets.Two edges joining vertices within a given packet do not cross by Lemma 1 (proved in [5]).An edge joining vertices within a packet crosses no other edge joining vertices within another packet since the projection onto the Y -axis of the bounding boxes of the Morin-Wood constructions do not intersect.Finally, the bounding box of the Morin-Wood construction properly intersects no edge joining distinct packets since they do not properly intersect in XZ-projection (see Figure 3(b)).Hence, the edges joining vertices within a packet cross no other edge.
Outgoing-outgoing segments.Refer to Figure 2(a).If two outgoing segments start from different vertices, they lie in two different planes parallel to the XZ-plane.Otherwise, by Lemma 2, the two segments only share their starting point.Hence no two outgoing segments cross.
Incoming-incoming segments.Refer to Figure 2(b).We first remark that an incoming segment joining e , →i,j to v i,j lies in the plane P i,j through the two lines parallel to the Y -axis and containing, respectively, all the e , →i,j and all the v i, .
For a pair of incoming segments, we consider three cases according to whether both segments finish at the same vertex, at distinct vertices of the same packet, or at vertices of different packets.In the first case, the segments live in a plane P i,j ; they start at different bends and end at the same vertex, hence they do not cross.In the second case, the two segments live in two planes P i,j and P i,j whose intersection is the line v i,j v i,j .The segments end there and thus cannot cross.In the third case, the segments do not overlap in the X-direction, thus they do not cross.

Volume analysis
The dimension of the bounding box of our construction for edges between packets has size smaller than 2k × n × kn since the highest vertex has Z-  .Recall that we assumed for simplicity that k and n k were integers; for any n we can apply our construction with n

Conclusion
We have presented a construction of volume O(n 2.5 ) for a one-bend drawing of the complete graph K n by a hierarchical organisation of the graph where edges inside packets are drawn with the cubic result of Pat Morin and David Wood for collinear vertices.By arranging the packets of points on different planes, the remaining edges can be drawn more compactly.
While our result is a significant improvement over previous constructions, it remains to close the gap between our O(n 2.5 ) upper bound and the Ω(n 2 ) lower bound.Another open problem is to minimize the bounding box aspect ratio of the drawing without increasing its volume.

Figure 1 :
Figure 1: (a) k packets of n k vertices; (b) bounding boxes of the complete graphs of packets of vertices.Here, n = 16 and k = 4.

Figure 2 :
Figure 2: (a) all edges starting from one vertex; (b) all edges ending at one vertex.Here, n = 16 and k = 4.

Figure 3 :
Figure 3: (a) Construction of the Z-coordinates of the vertices (dots) and bends (squares); (b) XZ-projection of the bounding boxes of the interpacket edges.

Figure 4 :
Figure 4: Incoming and outgoing segments in XY and XZ-projections.

1 4 4 Theorem 3 4 ) 4 )
vertices and then remove the extra vertices and edges.We thus have the following result.Every complete graph K n has a one-bend non-crossing drawing in an axis-parallel box of dimensions O(n 1 × n × O(n 5 and volume O(n 2.5 ).