Two fundamental primitives for highlighting structural properties of a graph in a drawing are alignment of vertices such that they are collinear, and geometric separation of unrelated graph parts, e.g., by a straight line. Both these techniques have been previously considered from a theoretical point of view in the case of planar straight-line drawings.
Da Lozzo et al.  study the problem of producing a planar straight-line drawing of a given embedded graph (i.e., has a fixed combinatorial embedding and a fixed outer face) such that a given set of vertices is collinear. It is clear that if such a drawing exists, then the line containing the vertices in is a simple curve starting and ending at infinity that for each edge of either fully contains or intersects in at most one point, which may be an endpoint. We call such a curve a pseudoline with respect to . Da Lozzo et al.  show that this is a full characterization of the alignment problem, i.e., a planar straight-line drawing where the vertices in are collinear exists if and only if there exists a pseudoline with respect to that contains the vertices in . However, the computational complexity of deciding whether such a pseudoline exists is an open problem, which we consider in this paper.
Likewise, for the problem of separation, Biedl et al.  considered so-called -drawings where, given an embedded graph and a partition , one seeks a -monotone planar polyline drawing of with few bends in which and can be separated by a line. Again, it turns out that such a drawing exists if there exists a pseudoline with respect to such that the vertices in and are separated by . As a side-result Cano et al.  extend the result of Biedl et al. to planar straight-line drawings with a given star-shaped outer face.
The aforementioned results of Da Lozzo et al.  show that given a pseudoline with respect to one can always find a planar straight-line drawing of such that the vertices on are collinear and the vertices contained in the half-planes defined by are separated by a line . In other words, a topological configuration consisting of a planar embedded graph and a pseudoline with respect to can always be stretched. In this paper, we initiate the study of this stretchability problem with more than one given pseudoline.
More formally, a pair is a -aligned graph if is a planar embedded graph and is an arrangement of (pairwise intersecting) pseudolines with respect to . In case that every pair of distinct pseudolines intersect at most once, we refer to as a pseudoline arrangement. If the number of pseudolines is clear from the context, we drop it from the notation and simply speak of aligned graphs. For -aligned graphs we write instead of . Let be a line arrangement and be a planar drawing of . A tuple is an aligned drawing of if and only if the arrangement of the union of and is homeomorphic to the arrangement of the union of and . A (pseudo)-line arrangement divides the plane into a set of cells . If is homeomorphic to , then there is a bijection between the cells of and the cells of . If is an aligned drawing of ), then it has the following properties; refer to Fig. 4(a-b). (i) The arrangement of is homeomorphic to the arrangement of (i.e., is stretchable to ), (ii) is homeomorphic to the planar embedding of , (iii) the intersection of each vertex and each edge with a cell of is non-empty if and only if the intersection of and with in , respectively, is non-empty, (iv) if an edge (directed from to ) intersects a sequence of cells in this order, then intersects in the cells in this order, and (v) each line intersects in the same vertices and edges as in , and it does so in the same order. We focus on straight-line aligned drawings. For brevity, unless stated otherwise, the term aligned drawing refers to a straight-line drawing throughout this paper.
Note that the stretchability of is a necessary condition for the existence of an aligned drawing. Since testing stretchability is -hard [13, 15], we assume that a geometric realization of is provided. Line arrangements of size up to 8 are always stretchable , and only starting from nine lines non-stretchable arrangements exist; see the Pappus configuration  in Fig. (c)c. This figure also illustrates an example of an -aligned graph with a single edge that does not have an aligned drawing. It is conceivable that in practical applications, e.g., stemming from user interactions, the number of lines to stretch is small, justifying the stretchability assumption.
The aligned drawing convention generalizes the problems studied by Da Lozzo et al. and Biedl et al. who focused on the case of a single line. We study a natural extension of their setting and ask for alignment on general line arrangements.
In addition to the strongly related works mentioned above, there are several other works that are related to the alignment of vertices in drawings. Ravsky and Verbitsky  used the fact that -trees have a drawing with at least collinear vertices to show that at least vertices of a -tree can be fixed to arbitrary positions. Dujmović  shows that every -vertex planar graph has a planar straight-line drawing such that vertices are aligned, and Da Lozzo et al.  show that in planar treewidth-3 and planar treewidth- graphs, one can align and vertices, respectively. Chaplik et al.  study the problem of drawing planar graphs such that all edges can be covered by lines. They show that it is -hard to decide whether such a drawing exists. The computational complexity of deciding whether there exists a drawing where all vertices lie on lines is an open problem . Drawings of graphs on lines where a mapping between the vertices and the lines is provided have been studied by Dujmović et al. [6, 7].
Contribution & Outline. After introducing notation in Section 2, we first study the topological setting where we are given a planar graph and a set of vertices to align in Section 3. We show that it is -complete to decide whether is alignable. On the positive side, we prove that this problem is fixed-parameter tractable (FPT) with respect to . Afterwards, in Section 4, we consider the geometric setting where we seek an aligned drawing of an aligned graph. Based on our proof strategy in Section 4.1, we strengthen the result of Da Lozzo et al. and Biedl et al. in Section 4.2, and show that there exists a 1-aligned drawing of with a given convex drawing of the outer face. In Section 4.3 we consider -aligned graphs with a stretchable pseudoline arrangement, where every edge either entirely lies on a pseudoline or intersects at most one pseudoline, which can either be in the interior or an endpoint of . We utilize the result of Section 4.2 to prove that every such -aligned graph has an aligned drawing, for any value of . In the preliminaries we define the alignment complexity of an aligned graph. It is a triple that indicates how many intersections an edge has with the pseudoline arrangement depending on the number of endpoints that lie on a pseudoline. Table 1 summarizes the results of our paper.
|– Theorem 2.1|
|– Theorem 4.3|
|2||open – Fig. 42|
|✗ – Fig. 4(c)|
Let be a pseudoline arrangement with pseudolines and be an aligned graph with vertices. The set of cells in is denoted by . A cell is empty if it does not contain a vertex of . Removing from a pseudoline its intersections with other pseudolines gives its pseudosegments.
Let be a planar embedded graph with vertex set and edge set . We call interior if does not lie on the boundary of the outer face of . An edge is interior if does not lie entirely on the boundary of the outer face of . An interior edge is a chord if it connects two vertices on the outer face. A point of an edge is an interior point of if is not an endpoint of . A triangulation is a biconnected planar embedded graph whose inner faces are all triangles and whose outer face is bounded by a simple cycle. A triangulation of a graph is a triangulation that contains as a subgraph. A -aligned triangulation of is a -aligned graph with being a triangulation of . A graph is a subdivision of if is obtained by placing subdivision vertices on edges of . For an abstract graph and an edge of the graph is obtained from by contracting and merging the resulting multiple edges and removing self-loops. Routing the edges incident to close to yields a planar embedding of in case of a planar embedded graph . A -wheel is a simple cycle with vertices on the outer face and one additional interior vertex that has an edge to each vertex in . Let be a drawing of and let be a cycle in . We denote with the drawing of in . Let be a separating triangle in and let and be the vertices in the interior and exterior of , respectively. We refer to the graphs induced by and as the split components of and denote them by and .
A vertex is -aligned (or simply aligned to ) if it lies on the pseudoline . A vertex that is not aligned is free. An edge is -aligned (or simply aligned) if it completely lies on . Let be the set of all aligned edges. An intersection vertex lies on the intersection of two pseudolines and . A non-aligned edge is -anchored () if of its endpoints are aligned to distinct pseudolines. An -aligned edge is -anchored () if of its endpoints are aligned to distinct pseudolines which are different from . For example, the single aligned edge in Fig. (a)a is -anchored. Let be the set of -anchored edges; note that, the set of edges is the disjoint union . An edge is (at most) -crossed if (at most) distinct pseudolines intersect in its interior. A -anchored -crossed non-aligned edge is also called free. A non-empty edge set is -crossed if is the smallest number such that every edge in is at most -crossed.
The alignment complexity of an aligned graph describes how “complex” the relationship between the graph and the pseudoline arrangement is. It is formally defined as a triple , where , , indicates that is at most -crossed or has to be empty, if . For example, an aligned graph where every vertex is aligned and every edge has at most interior intersections has the alignment complexity . For further examples, see Fig. 8.
Every -aligned graph of alignment complexity with a stretchable pseudoline arrangement has an aligned drawing.
We modify the graph as follows; see Fig. 9. We place a vertex on each intersection of two or more pseudolines (if the intersection is not already occupied). In case that is at least two, every unbounded cell of has two pseudosegments of infinite length. We place a vertex on each of them at infinity and connect them by an edge routed through the interior of .
Further, let and be two -aligned vertices, that are consecutive along . If is not already an edge of , we insert it into and route it on . Note that, since does not contain edges that cross a pseudoline, the resulting graph is again an aligned graph of alignment complexity . The boundary of every cell is covered by aligned edges. Thus, we can triangulate without introducing intersections between edges and a pseudoline.
We obtain an aligned drawing of the modified graph as follows. Note that the only interaction between two cells are the aligned vertices and edges on their common boundary, i.e., there are no edges crossing the boundary. Hence, for every pseudosegments of we place the aligned vertices on it, arbitrarily (but respecting their order) on the corresponding line segment in . Since, every cell is covered by aligned edges, we can draw the interior of two cells independently from each other. More formally, the vertex placements of the vertices of the pseudolines prescribes a convex drawing of the outer face of the graph , i.e., the graph induced by the vertices in the interior or on the boundary of a cell . Thus, we obtain a drawing of by applying the result of Tutte  to each graph , independently.
3 Complexity and Fixed-Parameter Tractability
In this section, we deal with the topological setting where we are given a planar embedded graph and a subset . We ask for a straight-line drawing of where the vertices in are collinear. According to Da Lozzo et al. , this problem is equivalent to deciding the existence of a pseudoline with respect to passing exactly through the vertices in . We refer to this problem as pseudoline existence problem and the corresponding search problem is referred to as pseudoline construction problem. Using techniques similar to Fößmeier and Kaufmann , we can show that the pseudoline existence problem is -hard.
Let be the graph obtained from the dual graph of by placing every vertex in its dual face and connecting it to every vertex on the boundary of the face .
Let be a 3-connected 3-regular planar graph. There exists a pseudoline through with respect to the graph if and only if is Hamiltonian.
Recall that the dual of a -connected -regular graph is a triangulation with a single combinatorial embedding.
Assume that there exists a pseudoline through with respect to . Then the order of appearance of the vertices of on defines a sequence of adjacent faces in , i.e., vertices of the primal graph that are connected via primal edges. This yields a Hamiltonian cycle in .
Let be a Hamiltonian cycle of and consider a simultaneous embedding of and on the plane, where each pair of a primal and its dual edge intersects exactly once. Thus, the cycle crosses each dual edge at most once and passes through exactly the vertices . There is a vertex on the cycle such that lies in the unbounded face of . Thus, the cycle can be interpreted as a pseudoline in through all vertices in by splitting it in the unbounded face of .
Since computing a Hamiltonian cycle in 3-connected 3-regular planar graphs is -complete , we get that the pseudoline construction problem is -hard. On the other hand, we can guess a sequence of vertices, edges and faces of , and then test in polynomial time whether this corresponds to a pseudoline with respect to that traverses exactly the vertices in . Thus, the pseudoline construction problem is in . This proves the following theorem.
The pseudoline existence problem is -complete.
In the following, we show that the pseudoline construction problem is fixed-parameter tractable with respect to . To this end, we construct a graph and a set with such that contains a simple cycle traversing all vertices in if and only if there exists a pseudoline that passes exactly through the vertices in such that is an aligned graph.
We observe that if the vertices of a positive instance are not independent, they can only induce a linear forest, i.e., a set of paths, as otherwise, there is no pseudoline through all the vertices in with respect to . We call the edges on the induced paths aligned edges. An edge that is not incident to a vertex in is called crossable, in the sense that only crossable edges can be crossed by , otherwise is not a pseudoline with respect to . Let be the subset of vertices that are endpoints of the paths induced by (an isolated vertex is a path of length 0). We construct in several steps; refer to Fig. 10.
- Step 1
Let be the graph obtained from by subdividing each aligned edge with a new vertex and let be the set consisting of all isolated vertices in and the new subdivision vertices. Additionally, we add to one new vertex that we embed in the outer face of and also add to . Observe that by construction . Finally, subdivide each crossable edge by a new vertex . We call these vertices traversal nodes and denote their set by is crossable. Intuitively, a curve will correspond to a path that uses the vertices in to hop onto paths of aligned edges and the subdivision vertices of crossable edges to traverse from one face to another. Moreover, the vertex plays a similar role, forcing the curve to visit the outer face.
- Step 2
For each face of we perform the following construction. Let denote the traversal nodes that are incident to . For each vertex we create two new vertices and , add the edges and to , and draw them in the interior of . Finally, we create a clique on the vertex set , and embed its edges in the interior of .
- Step 3
To obtain remove all edges of that correspond to edges of except those that stem from subdividing an aligned edge of .
There exists a pseudoline traversing exactly the vertices in such that is an aligned graph if and only if there exists a simple cycle in that traverses all vertices in .
Suppose is a cycle in that visits all vertices in . Without loss of generality, we assume that there is no face such that contains a subpath from via to (or its reverse) for some vertex , as otherwise we simply shortcut this path by the edge .
Consider a path of aligned edges in that contains at least one edge; refer to Fig. 13. By definition, visits all the subdivision vertices of the edges of , and thus it enters on an endpoint of , traverses and leaves at the other endpoint. All isolated vertices of are contained in , and therefore indeed traverses all vertices in (and thus also all aligned edges). As described above, is indeed a topological graph, and thus corresponds to a closed curve that traverses exactly the vertices in and the aligned edges.
We now show that can be transformed to a pseudoline with respect to . Let be a non-aligned edge of that has a common point with in its interior; see Fig. 16. Thus, contains the subdivision vertex . In particular, this implies that is crossable. Moreover, from our assumption on , it follows that enters via or and leaves it via or , where and are the faces incident to , and it is as we could shortcut otherwise. Therefore, indeed intersects and uses it to traverse to a different face of . Moreover, since has only a single subdivision vertex in and is simple, it follows that is intersected only once. Thus is a curve that intersects all vertices in , traverses all aligned edges, and crosses each edge of (including the endpoints) at most once. Moreover, traverses the outer face since contains .
The only reasons why is not necessarily a pseudoline with respect to are that it is a closed curve and it may cross itself. However, we can break in the outer face and route both ends to infinity, and remove such self-intersections locally as follows; see Fig. 17. Consider a circle around an intersection that neither contains a second self-intersection nor a vertex, nor an edge of . Let be the intersections of with . We replace the pseudosegment with a pseudosegment , and with a pseudosegment . We route the pseudosegments and through the interior of such that they do not intersect. Thus, we obtain a pseudoline with respect to that contains exactly the vertices in .
For the converse assume that is a pseudoline that traverses exactly the vertices in such that is an aligned graph. The pseudoline can be split into three parts , and such that and have infinite length and do not intersect with , and has its endpoints in the outer face of . We transform into a closed curve by removing and adding a new piece connecting the endpoints of without intersecting or . Additionally, we choose an arbitrary direction for in order to determine an order of the crossed edges and vertices.
We show that contains a simple cycle traversing the vertices in . By definition consists of two different types of pieces, see Fig. 13. The first type traverses a path of aligned edges between two vertices in . The other type traverses a face of by entering and exiting it either via an edge or from a vertex in ; see Fig. 20. We show how to map these pieces to paths in ; the cycle is obtained by concatenating all these paths.
Each piece of the first type indeed corresponds directly to a path in ; see Fig. 13. Consider now a piece of the second type traversing a face ; refer to Fig. 20. The piece enters either from a vertex in or by crossing a crossable edge . In either case, contains a corresponding traversal node . Likewise, contains a traversal node for the edge or vertex that intersects next. We map to the path in . By construction, paths corresponding to consecutive pieces of share a traversal node, and therefore concatenating all paths yields a cycle in . Moreover, is simple, since intersects each edge and each vertex at most once. Note that contains at least one edge of the outer face (as traverses the outer face), and we modify so that it also traverses the special vertex .
It remains to show that contains all vertices in . There are three types of vertices in ; the subdivision vertices of aligned edges, the isolated vertices in , and the special vertex . The latter is in by the last step of the construction. The isolated vertices in are traversed by and contained in , and they are therefore visited also by . Finally, the subdivision vertices of aligned edges are traversed by the paths corresponding to the first type of pieces, since traverses all aligned edges.
Theorem 3.2 (Wahlström )
Given an -vertex graph and a subset , it can be tested in time whether a simple cycle through the vertices in exists. If affirmative the cycle can be reported within the same asymptotic time.
The pseudoline construction problem is solvable in time, where is the number of vertices.
Let with be an instance of the pseudoline construction problem. By Lemma 3.2 the pseudoline construction problem is equivalent to determining whether contains a simple cycle visiting all vertices in . Since the size of is and it can be constructed in time, and , Theorem 3.2 can be used to solve the latter problem in the desired running time.
We note that indeed the construction of only allows leaving a path of aligned edges at an endpoint in . Therefore, a single vertex in for each path of aligned edges would be sufficient to ensure that traverses the whole path. Thus, by removing for each path all but one vertex from we obtain an algorithm that is FPT with respect to the number of paths induced by .
The pseudoline construction problem is solvable in time, where is the number of vertices and is the number of paths induced by the vertex set to be aligned.
4 Drawing Aligned Graphs
We show that every aligned graph where each edge either entirely lies on a pseudoline or is intersected by at most one pseudoline, i.e., alignment complexity , has an aligned drawing. For -aligned graphs we show the stronger statement that every -aligned graph has an aligned drawing with a given aligned convex drawing of the outer face. We first present our proof strategy and then deal with - and -aligned graphs.
4.1 Proof Strategy
Our general strategy for proving the existence of aligned drawings of an aligned graph is as follows. First, we show that we can triangulate by adding vertices and edges without invalidating its properties. We can thus assume that our aligned graph is an aligned triangulation. Second, we show that unless has a specific structure (e.g., a -wheel or a triangle), it contains an aligned or a free edge. Third, we exploit the existence of such an edge to reduce the instance. Depending on whether the edge is contained in a separating triangle or not, we either decompose along that triangle or contract the edge. In both cases the problem reduces to smaller instances that are almost independent. In order to combine solutions, it is, however, crucial to use the same arrangement of lines for both of them.
In the following, we introduce the necessary tools used for all three steps on -aligned graphs of alignment complexity . Recall, that for this class (i) every non-aligned edge is at most -crossed, (ii) every -anchored edge is -crossed, and (iii) there is no edge with its endpoints on two pseudolines.
Lemmas 4.1 – 4.3 show that every aligned graph of alignment complexity has an aligned triangulation with the same alignment complexity. If contains a separating triangle, Lemma 4.4 shows that admits an aligned drawing if both split components have an aligned drawing. Finally, with Lemma 4.5 we obtain a drawing of from a drawing of the aligned graph where one particular edge is contracted.
Let be a -aligned -vertex graph of alignment complexity . Then there exists a biconnected -aligned graph that contains as a subgraph. The set has alignment complexity and does not contain aligned edges. The size of is in .
Our procedure works in two steps. First, we connect disconnected components. Second, we assure that the graph is biconnected by inserting edges around a cut-vertex. Initially, we place a vertex in every cell that does not contain a vertex in its interior.
Consider a cell of that contains two vertices and that belong to distinct connected components and . We refer to two vertices that lie in the interior or on the boundary of as -visible if there is a curve in the interior of that connects to and that does not intersect except at its endpoints. In the following, we exhaustively connect -visible pairs of vertices of distinct connected components of . If and are -visible, we simply connect them by an edge . In case that both vertices are aligned, we have to subdivide the edge with a vertex to avoid introducing -anchored edges to the graph. Assume that are not -visible. Consider any curve in the interior of that connects and . Then intersects a set of edges of either in their interior or in a vertex. Thus, there are two edges and consecutive along , that belong two distinct connected components. Since and are at most -crossed, there is an endpoint of and an endpoint of that are -visible and thus can be connected by an edge. Overall it is sufficient to add a linear number of edges to join distinct connected components that have vertices in a common cell.
By construction, every cell contains at least one free vertex. Thus, in order to connect the graph we consider two cells with a common boundary. Assume that there is a vertex on the common boundary. In this case, the previous step ensures that there is a path from to every vertex that lies in the interior or on the boundary of or . Hence, consider the case where no vertex lies on the common boundary of the two cells. Moreover, the common boundary does also not contain an edge, since this edge would be -anchored or -crossed, . Similar to the previous step, we can connect two arbitrary vertices of and with a curve that intersects the common boundary. If this curve does not intersect an edge we can simply connect the two vertices with an edge. Otherwise, at least in one cell the curve intersects at least one edge. Therefore, there is an edge that comes immediately before the intersection of with the boundary of . Since every edge is at most -crossed, there are two vertices in and that can be connected by an edge. Due to the previous step, we can assume that the vertices in the interior of each cell are connected by a path. Thus, we add at most one edge for each pair of adjacent cells. Since there are cells we add vertices and edges to , i.e., the size of is .
We now assume that is connected but not biconnected and has vertices. Consider a single cut vertex ; refer to Fig. 23. We consider the common arrangement of and , i.e., a face can be restricted by pseudosegments of and edges of . Let be the set of faces in with on their boundary. We place a vertex in every face of . Let and be two distinct faces of with a common edge on their boundary. If is an edge of , we insert the edges and . Since is at most -crossed, the new edges are as well at most -crossed. If corresponds to a pseudosegment, we insert the edge such that it crosses . Since and are free vertices, the edge is by construction -crossed.
This procedure adds vertices and edges around , since at most pseudolines intersect in a single point. The degree of vertices adjacent to is increased by at most . Thus, the size of increases to . Thus, we have that the size of is .
Let be a biconnected -aligned -vertex graph of alignment complexity . There exists a -aligned triangulation of whose size is . The set has alignment complexity and does not contain aligned edges.
We call a face non-triangular if its boundary contains more than three vertices. An aligned vertex or an aligned edge is isolated if all faces with or on their boundaries are triangles. A pseudosegment is isolated if does not intersect the interior of a simple cycle. Our proof distinguishes four cases. Each case is applied exhaustively in this order.
If the interior of contains the intersection of two or more pseudolines, we split the face so that there is a vertex that lies on the intersection.
If the boundary of a face has an aligned vertex or an aligned edge, we isolate the vertex or the edge from .
If the interior of a face intersects a pseudoline , then it subdivides into a set of pseudosegments. We isolate each of the pseudosegments independently.
Finally, if none of the previous cases apply, i.e., neither the boundary nor the interior of contains parts of a pseudoline, the face can be triangulated with a set of additional free edges.
Let be the arrangement of restricted to the interior of .
Let be a non-triangular face of with an aligned vertex or an aligned edge on its boundary. Further, the interior of does not contain the intersection of a set of pseudolines; see Fig. (b)b and (c)c. In case of an aligned vertex we simply assume . Since is biconnected, there exist two edges , on the boundary of . Let be cells with or on their boundary, such that is adjacent to . Since does not contain -anchored edges, at most one of the vertices and can be an intersection vertex. Thus, is at most . We construct an aligned graph from as follows. We place a vertex in the interior of each cell . Let and . We insert edges in the interior of so that the interior of crosses the common boundary of and exactly once and it crosses no other boundary. Thus, if the edge is either incident to or to , it at most -anchored and -crossed. Otherwise, it is -anchored and -crossed. The added path splits into two faces with a unique face containing and on its boundary. If is on the boundary of cell , we insert an edge . Each edge is -anchored and -crossed. Let and be two cells incident to . Then, the vertices form a triangle. If , there is a unique cell incident to and . Hence, the vertices form a triangle. Moreover, for , every edge and is incident to two triangles. Therefore, is triangulated. By construction, we do not insert aligned vertices and edges, thus the number of aligned edges and aligned vertices of is one less compared to . Hence, we can inductively proceed on .
Assume the aligned vertex is an intersection vertex. Thus, isolating uses additional vertices and edges. Therefore, all intersection vertices can be isolated with vertices and edges.
Now consider an aligned vertex that is not an intersection vertex. In this case is incident to at most two cells. We can isolate all such vertices with vertices and edges. The same bound holds for aligned edges. Finally, we obtain an aligned graph of size .
Let be a non-triangular face of whose interior intersects a pseudoline and has no aligned edge and no aligned vertex on its boundary. Further, the interior of does not contain the intersection of two or more pseudolines. Then the face subdivides into a set of pseudosegments; see Fig. (d)d. We iteratively isolate such a pseudosegment . Since does not contain the intersection of two or more pseudolines in its interior, there are two distinct cells and with on their boundary. Since neither contains an aligned vertex nor an aligned edge and is biconnected, there are exactly two edges and with the endpoints of in the interior of these edges and and on the boundaries of and , respectively. Since does not have an -crossed edge, , and every -crossed edge is -anchored, the vertices , , , are free. We construct a graph by placing a vertex on and inserting edges , , , and . We route each edge so that the interior of an edge does not intersect the boundary of a cell . Thus, the edges and are free and the others are -anchored and -crossed.
Every edge in is at most -crossed, thus the number of pseudosegments is linear in the size of . Therefore, we add a number of vertices and edges that is linear in the size of .
Thus, we obtain an aligned graph of size .
If none of the cases above applies to a non-triangular face of , then neither the interior nor the boundary of the face intersects a pseudoline . Thus, we can triangulate with a number of free edges linear in the size of . Thus, in total we obtain an aligned triangulation of of size .
Observe that the correctness of the previous triangulation procedure only relies on the fact that every non-triangular face contains at most -crossed edges. While Lemma 4.2 is sufficient for our purposes, for the sake of generality, we show how to isolate -crossed edges. This allows us to triangulate biconnected aligned graphs without increasing the alignment complexity.
Every biconnected -aligned -vertex graph of alignment complexity has an aligned triangulation . The alignment complexity of is and the size of this set is .
For , we iteratively isolate -crossed edges from a non-triangular face as sketched in Fig. 29. Let be the cells in that occur in this order along . If one of these vertices is free, say , we place a new vertex in the interior of . We insert the two edges and route both edges close to . This isolates the edge from . Notice that the edge is -anchored and -crossed and the edge -crossed. In case that , the alignment complexity of the new aligned graph is . Otherwise, the alignment complexity is . If and are aligned, we place on the boundary of and and route the edges and as before. The alignment complexity is not affected by this operation. The face is triangular and therefore the edge is processed as above at most twice.
This procedure introduces a new -crossed edge. Repeating the process times generates a new face from where edge is substituted by a path of at most -crossed edges. To isolate all -crossed edges in , we add vertices and edges.
By isolating all -crossed edges in this way, we obtain an aligned graph where every non-triangular face is bounded by at most -crossed edges. The proof of Lemma 4.2 handles all non-triangular faces independently. For the correctness of the triangulation it is sufficient to ensure that every non-triangular face does neither contain -anchored edges nor -crossed edges. Thus, we can apply the methods used in the proof of Lemma 4.2 to triangulate with additional vertices and edges.
We now return to the treatment of aligned graphs with alignment complexity . To simplify the proofs, we augment the input graph with an additional cycle in the outer face that contains all intersections of in its interior, and we add subdivision vertices on the intersections of -aligned edges with pseudolines , . A -aligned graph is proper if (i) every aligned edge is -crossed, (ii) for , every edge on the outer face is -crossed, (iii) the boundary of the outer face intersects every pseudoline exactly twice, and (iv) the outer face does not contain any intersection of .
An aligned graph is a rigid subdivision of an aligned graph if and only if is a subdivision of and every subdivision vertex is an intersection vertex with respect to . We show that we can extend every -aligned graph to a proper -aligned triangulation.
For every and every -aligned -vertex graph of alignment complexity , let be a rigid subdivision of . Then there exists a proper -aligned triangulation of alignment complexity such that is a subgraph of . The size of is in . The set has alignment complexity and does not contain aligned edges.
We construct a rigid subdivision from by placing subdivision vertices on the intersections of -aligned edges with pseudolines . The number of vertices of is in .
We obtain a proper biconnected -aligned graph by embedding a simple cycle in the outer face of and applying Lemma 4.1. In order to construct , we place a vertex in each unbounded cell of and connect two vertices and if the boundaries of the cells and intersect. The size of is . We obtain a proper -aligned triangulation of with the application of Lemma 4.2. The size of is in .
The following two lemmas show that we can reduce the size of the aligned graph and obtain a drawing by merging two drawings or by geometrically uncontracting an edge.
Let be a -aligned triangulation. Let be a separating triangle splitting into subgraphs so that and contains the outer face of . Then, (i) and are -aligned triangulations, and (ii) has an aligned drawing if and only if there exists a common line arrangement such that has an aligned drawing and has an aligned drawing with the outer face drawn as .
It is easy to verify that and are aligned triangulations. An aligned drawing of immediately implies the existence of an aligned drawing of and of .
Let be an aligned drawing of . Since is an aligned drawing, is an aligned drawing of . Let be an aligned drawing of with the outer face drawn as . Let be the drawings obtained by merging the drawing and . Since and are aligned drawings on the same line arrangement , is an aligned drawing of .
Let be a proper -aligned triangulation of alignment complexity and let be an interior -anchored aligned edge or an interior free edge of that does not belong to a separating triangle and is not a chord. Then is a proper -aligned triangulation of alignment complexity . Further, has an aligned drawing if has an aligned drawing.
We first prove that is a proper -aligned triangulation. Consider a topological drawing of the aligned graph . Let be the vertex in obtained from contracting the edge . We place at the position of . Thus, all the edges incident to keep their topological properties. We route the edges incident to close to the edge within the cell from which they arrive to in . Since is not an edge of a separating triangle, is simple and triangulated.
Consider a free edge . Observe that the triangular faces incident to do not contain an intersection of two pseudolines in their interior, since does not contain -crossed edges, for . Therefore, is an aligned triangulation. Since is not a chord, is proper. Further, and lie in the interior of the same cell, thus, the edges incident to have the same alignment complexity as in .
If is aligned, it is also -crossed, since is proper. Since is also -anchored, the triangles incident to do not contain an intersection of two pseudolines and therefore is a proper aligned triangulation. The routing of the edges incident to , as described above, ensures that the alignment complexity is .
Let be an aligned drawing of . We now prove that has an aligned drawing. Let denote the drawing obtained from by removing together with its incident edges and let denote the face of where used to lie. Since is triangulated and is an interior edge and not a chord, is star-shaped and lies inside the kernel of ; see Fig. 32. We construct a drawing of as follows. If one of vertices and lies on the outer face, we assume, without loss of generality, that vertex to be . First, we place at the position of and insert all edges incident to . This results in a drawing of the face in which we have to place . Since is placed in the kernel of , is star-shaped. If is a free edge, the vertex has to be placed in the same cell as . We then place inside sufficiently close to so that it lies inside the kernel of and in the same cell as . All edges incident to are at most -crossed, thus, is an aligned drawing of .
Likewise, if is an -aligned edge, then has to be placed on the line corresponding to . In this case, also and therefore lie on . Since is an interior edge, there exist two triangles and sharing the edge . Since, is not part of a separating triangle, and are on different sides of . Therefore the face contains a segment of the line of positive length that is within the kernel of . Thus, we can place close to on the line such that the resulting drawing is an aligned drawing of .
Note that contracting a -anchored aligned edge can result in a graph with an alignment complexity that does not coincide with the alignment complexity of . Further, for general alignment complexities there is an aligned graph and an -anchored aligned edge such that is not an aligned graph.
4.2 One Pseudoline
We show that every -aligned graph has an aligned drawing , where is a single pseudoline and is the corresponding straight line. Using the techniques from the previous section, we can assume that is a proper -aligned triangulation. We show that unless is very small, it contains an edge with a certain property. This allows for an inductive proof to construct an aligned drawing of .
Let be a proper -aligned triangulation without chords and with vertices on the outer face. If is neither a triangle nor a -wheel whose center is aligned, then contains an interior aligned or an interior free edge.
We first prove two useful claims.
Claim 1. Consider the order in which intersects the vertices and edges of . If vertices and are consecutive on , then the edge is in and aligned.
Observe that the edge can be inserted into without creating crossings. Since is a triangulation, it therefore already contains , and further, since every non-aligned edge has at most one of its endpoints on , it follows that indeed is aligned. This proves the claim.
Claim 2. If is an aligned triangulation without aligned edges and is an interior free vertex of , then is incident to a free edge.
Assume for a contradiction that all neighbors of lie either on or on the other side of . First, we slightly modify to a curve that does not contain any vertices. Assume is an aligned vertex; see Fig. 35. Since there are no aligned edges, enters from a face incident to and leaves it to a different face incident to . We then reroute from to locally around . If is incident to , we choose the rerouting such that it crosses the edge .
Notice that if an edge intersects in its endpoints, then either does not intersect it or intersects it in an interior point. Moreover, cannot intersect twice as in such a case would pass through both its endpoints. Now, since is a triangulation and the outer face of is proper, corresponds to a simple cycle in the dual of , and hence corresponds to a cut of . Let denote the connected component of that contains and note that all edges of are free. By the assumption and the construction of , is the only vertex in . Thus, intersects only the faces incident to , which are interior. This contradicts the assumption that passes through the outer face of and finishes the proof of the claim.
We now prove the lemma. Assume that is neither a triangle nor a -wheel whose center is aligned. If is a -wheel whose center is free, we find a free edge by Claim 2. Otherwise, contains at least two interior vertices. If one of these vertices is free, we find a free edge by Claim 2. Otherwise, all interior vertices are aligned. Since does not contain any chord, there is a pair of aligned vertices consecutive along . Thus by Claim 1 the instance has an aligned edge.
Let be a proper aligned graph and let be a convex aligned drawing of the aligned outer face of . There exists an aligned drawing of with the same line and the outer face drawn as .
We prove the claim by induction on the size of . If is just a triangle, then clearly is the desired drawing. If is the -wheel whose center is aligned, placing the vertex on the line in the interior of yields an aligned drawing of . This finishes the base case.
If contains a chord , then splits into two graphs with . It is easy to verify that is an aligned graph. Let be a drawing of the face of whose interior contains . By the inductive hypothesis, there exists an aligned drawing of with the outer face drawn as . We obtain a drawing by merging the drawings and . The fact that both and