Maximizing Ink in Partial Edge Drawings of k-plane Graphs

08/23/2019 ∙ by Matthias Hummel, et al. ∙ TU Wien Yahoo! Inc. 0

Partial edge drawing (PED) is a drawing style for non-planar graphs, in which edges are drawn only partially as pairs of opposing stubs on the respective end-vertices. In a PED, by erasing the central parts of edges, all edge crossings and the resulting visual clutter are hidden in the undrawn parts of the edges. In symmetric partial edge drawings (SPEDs), the two stubs of each edge are required to have the same length. It is known that maximizing the ink (or the total stub length) when transforming a straight-line graph drawing with crossings into a SPED is tractable for 2-plane input drawings, but NP-hard for unrestricted inputs. We show that the problem remains NP-hard even for 3-plane input drawings and establish NP-hardness of ink maximization for PEDs of 4-plane graphs. Yet, for k-plane input drawings whose edge intersection graph forms a collection of trees or, more generally, whose intersection graph has bounded treewidth, we present efficient algorithms for computing maximum-ink PEDs and SPEDs. We implemented the treewidth-based algorithms and show a brief experimental evaluation.

READ FULL TEXT VIEW PDF
POST COMMENT

Comments

There are no comments yet.

Authors

page 1

page 2

page 3

page 4

This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.

1 Introduction

Visualizing non-planar graphs as node-link diagrams is challenging due to the visual clutter caused by edge crossings. The layout readability deteriorates as the edge density and thus the number of crossings increases [18]. Therefore alternative layout styles are necessary for non-planar graphs. A radical approach first used in applied network visualization work by Becker et al. [2] is to start with a traditional straight-line graph drawing and simply drop a large central part of each edge and with it many of the edge crossings. This idea relies on the closure and continuation principles in Gestalt psychology [16], which imply that humans can still see a full line segment based only on the remaining edge stubs by filling in the missing information. User studies have confirmed that such drawings remain readable while reducing clutter significantly [12, 9] and Burch et al. [11] presented an interactive graph visualization tool using partially drawn edges combined with fully drawn edges.

(a)
(b)
(c)
(d)
Figure 5: Drawings of the same graph. (a) A straight-line drawing, (b) a maximum-ink SPED, (c) a maximum-ink PED, and (d) a maximum-ink SHPED.

The idea of drawing edges only partially has subsequently been formalized in graph drawing as follows [7]. A partial edge drawing (PED) is a graph drawing that maps vertices to points and edges to pairs of crossing-free edge stubs of positive length pointing towards each other. These edge stubs are obtained by erasing one contiguous central piece of the straight-line segment connecting the two endpoints of each edge. In other words each straight-line edge is divided into three parts, of which only the two outer ones are drawn (see Fig. 5). More restricted and better readable [4] variations of PEDs are symmetric PEDs, in which both stubs of an edge must have the same length (see Fig. 5(b)), and homogeneous PEDs, in which the ratio of the stub length to the total edge length is the same constant for all edges. Symmetric stubs facilitate finding adjacent vertices due to the identical stub lengths at both vertices, and symmetric homogeneous stubs (see Fig. 5(d)) additionally indicate the distance at which to find a neighboring vertex. Clearly, for very short stubs it is easy to hide all edge crossings, but reading adjacency information gets very difficult [12]. Therefore, the natural optimization problem in this formal setting is ink maximization, i.e., maximizing the total stub length, so that as much information as possible is given in the drawing while all crossings disappear in the negative background space.

We study the ink maximization problem for partial edge drawings (PEDs) and symmetric partial edge drawings (SPEDs) with a given geometric input drawing. These problems are known as MaxPED and MaxSPED, respectively [6, 7]. Note that with a given input drawing, the ink maximization problem for symmetric homogeneous PEDs (SHPEDs) is trivial, as we can simply iterate over all crossings, choose the larger of the two stub ratios resolving the crossing and take the minimum of all these stub ratios, which yields the best solution.

Related Work. As a first result, Bruckdorfer and Kaufmann [7]

presented an integer linear program for solving

MaxSPED on general input drawings. Later, Bruckdorfer et al. [6] gave an -time algorithm for MaxSPED on the class of 2-plane input drawings (no edge has more than two crossings), where is the number of vertices. They also described an efficient 2-approximation algorithm for the dual problem of minimizing the amount of erased ink for arbitrary input drawings. The PhD thesis of Bruckdorfer [5] presents a sketch of an -hardness proof for MaxSPED, but left the complexity of MaxPED as an open problem, as well as the design of algorithms for MaxPED.

There are a number of additional results for PEDs without a given input drawing, i.e., having the additional freedom of placing the vertices in the plane. For example, the existence or non-existence of SHPEDs with a specified stub ratio for certain graph classes such as complete graphs, complete bipartite graphs, or graphs of bounded bandwidth has been investigated [7, 6]. From a practical perspective, Bruckdorfer et al. [8] presented a force-directed layout algorithm to compute SHPEDs for stubs of of the total edge length, but without a guarantee that all crossings are eliminated. Moreover, the idea of partial edge drawings has also been extended to orthogonal graph layouts [10].

Contribution. We extend the results of Bruckdorfer et al. [6] on 2-plane geometric graph drawings to -plane graph drawings for , where a given graph drawing is -plane, if every edge has at most crossings. In particular, we strengthen the -hardness of MaxSPED [5] to the case of 3-plane input drawings without three (or more) mutually crossing edges. For MaxPED we show -hardness, even for 4-plane input drawings, which settles a conjecture of Bruckdorfer [5]. On the positive side, we give polynomial-time dynamic programming algorithms for both MaxSPED and MaxPED of -plane graph drawings whose edge intersection graphs are collections of trees. More generally, we extend the algorithmic idea and obtain FPT algorithms if the edge intersection graph has bounded treewidth and also provide a proof-of-concept implementation. We evaluate the implementation using non-planar drawings from two classical layout algorithms, namely a force-based and a circular layout algorithm.

Statements whose proofs are located in the appendix are marked with .

2 Preliminaries

Let be a simple graph with edge set and a straight-line drawing of in the plane. We call -plane if every edge is crossed by at most other edges from in . We often use edge in and segment in interchangeably. Hence can be seen as a set of line segments.

The intersection graph of is the graph containing a vertex in for every and an edge between vertices if the corresponding edges intersect in . We also denote the segment in corresponding to a vertex by . Observe that the intersection graph of a -plane drawing has maximum degree . Using a standard sweep-line algorithm, computing the intersection graph of a set of line segments takes time [3], where is the number of intersections.

A partial edge drawing (PED) of draws a fraction of each edge by drawing edge stubs of length at and at , s.t., . The ink or ink value of a PED is the total stub length . In the problem MaxPED, the task is to find for a given drawing  a PED such that is maximum over all PEDs. A symmetric partial edge drawing (SPED) of is a PED, s.t., for every edge . Then the MaxSPED problem is defined analogously to MaxPED.

Treewidth.

A tree decomposition [19] for a graph is a pair with being a tree and a collection of subsets . For every edge we find such that and for every vertex we get is a connected and non-empty subtree of . To differentiate the vertices of and we call the vertices of nodes and a set a bag. Now the width of a tree decomposition is defined as . For a graph we say it has treewidth , if the tree decomposition with minimum width has width . For a node we denote with the union of all bags such that is either or a descendent of in .

In our algorithms we are using the well known nice tree decomposition [14]. For a graph a nice tree decomposition is a special tree decomposition, where is a rooted tree and we require that every node in has at most two children. In case has two children , then . Such a node is called join node. For a node with a single child we find either , or , . The former we call insert node and the latter forget node. A leaf is called a leaf node and its bag contains a single vertex. Finally let be the root of , then . It is known that a tree decomposition can be transformed into a nice tree decomposition of the same width and with tree nodes in time linear in the size of the graph  [14].

3 Complexity

We first investigate the complexity of MaxSPED and MaxPED, and prove both problems to be -hard for 3-plane and 4-plane input drawings, respectively.

3.1 Hardness of MaxSPED for

We close the gap between the known -hardness of MaxSPED [5] for general input drawings and the polynomial-time algorithm for 2-plane drawings [6].

Theorem 1

MaxSPED is -hard even for 3-plane graph drawings.

Proof. We reduce from the -hard problem planar 3-Sat [17] using similar ideas as in Bruckdorfer’s sketch of the hardness proof for general MaxSPED [5]. Here we specify precisely the maximum ink contributions of all gadgets needed for a satisfying variable assignment. Our variable gadgets are cycles of edge pairs that admit exactly two maximum-ink states. We construct clause gadgets consisting of three pairwise intersecting edges so that all crossings are between two edges only, while Bruckdorfer’s gadgets have multiple edges intersecting in the same point. Let be a planar 3-Sat formula with variables and clauses , each consisting of three literals. We can assume that comes with a planar drawing of its variable-clause graph , which has a vertex for each variable and a vertex for each clause . Each clause vertex is connected to the three variables appearing in the clause. In the drawing of all variable vertices are placed on a horizontal line and the clause vertices connect to the adjacent variable vertices either from above or from below the horizontal line. In our reduction (see Fig. 6) we mimic the drawing of by creating a 3-plane drawing as a set of line segments of two distinct lengths and define a value such that has a SPED with ink at least if and only if is satisfiable. The whole construction will be drawn onto a triangular grid of polynomial size.

Figure 6: Three variables and a satisfied clause gadget. Dotted parts do not belong to the SPED.

All segments in the clause or variable gadgets are of length 8. The segments used for the connections are of length 4. We use pairs of intersecting segments, alternatingly colored red and green. The intersection point of each red-green segment pair is at distance 1 from an endpoint. Thus, the maximum amount of ink contributed by such a pair is 10 or 6, respectively (one full segment of length 8 or 4, respectively, and two stubs of length 1 each).

Each variable gadget is a cycle of segment pairs, with (at least) one pair for each occurrence of the variable in , see Fig. 6. This cycle has exactly two ink-maximal SPEDs: either all red edges are full segments and all green edges are length-1 stubs or vice versa. We associate the configuration with green stubs and full red segments with the value true and the configuration with red stubs and full green segments with false.

For each clause we construct a triple of mutually intersecting segments, see the gadget on yellow background in the upper part of Fig. 6. Again, their intersection points are at distance 1 from the endpoints. It is clear that in such a clause triangle at most one of the three segments can be fully drawn, while the stubs of the other two can have length at most 1. Hence, the maximum amount of ink in a SPED contributed by a clause gadget is 12.

Finally, we connect variable and clause gadgets, such that a clause gadget can contribute its maximum ink value of 12 if and only if the clause is satisfied by the selected truth assignment to the variables. For a positive (negative) literal, we create a path of even length between a green (red) edge of the variable gadget and one of the three edges of the clause gadget as shown in Fig. 6. The first edge  of this path intersects the corresponding variable segment such that is split into a piece of length 3 and a piece of length 5, whereas is split into a piece of length 1 and a piece of length 3. The last edge of the path intersects the corresponding clause edge again with a length ratio of 3 to 5. The path consists of a chain of red-green segment pairs, each pair contributing an ink value of at most 6.

It remains to argue that the resulting drawing has polynomial size and is a correct reduction. All segments are drawn on the underlying triangular grid and have integer lengths; all intersection points are grid points, too. Since the drawing of has polynomial size, so do the constructed gadgets. Additionally, no segment intersects more than three other segments, so the constructed drawing is 3-plane.

For the correctness of the reduction, let be the ink value obtained by counting 10 for each red-green segment pair in a variable, 6 for each red-green segment pair in a wire, and 12 for each clause gadget. First assume that has a satisfying truth assignment and put each variable gadget in its corresponding state. For each clause, select exactly one literal with value true in the satisfying truth assignment. We draw the clause segment that connects to the selected literal as a full segment and the other two as length-1 stubs. Recall that the literal paths are oriented from the variable gadget to the clause gadget. Since the last segment of the selected literal path must be drawn as two length-1 stubs, the only way of having a maximum contribution of that path is by alternating stubs and full segments. Hence, the first segment of the path must be a full segment. But because the variable is in the state that sets the literal to true

, the intersecting variable segment is drawn as two stubs and the path configuration is valid. For the two non-selected literals, we can draw the last segments of their paths as full segments, as well as every segment at an even position, while the segments at odd positions are drawn as stubs. This is compatible with any of the two variable configurations and proves that we can indeed achieve ink value 

.

Conversely, assume that we have a SPED with ink value . By construction, every red-green segment pair and every clause gadget must contribute its respective maximum ink value. In particular, each variable gadget is either in state true or false. By design of the gadgets it is straight-forward to verify that the corresponding truth assignment satisfies .

3.2 Hardness of MaxPED for

We adapt our -hardness proof for MaxSPED to show that MaxPED is -hard for -plane drawings with .

[]theoremthmmaxpedhard MaxPED is -hard even for 4-plane graph drawings.

Proof (Sketch). As in the proof of Theorem 1, we show the result via a reduction from planar 3-Sat. The key change for MaxPED comes from the fact, that the two stubs are now independent from each other. Take two crossing edges as an example. We now can draw the two segments with almost full ink value by just excluding an -sized gap in one of the two segments for some small . We will use this placement of a gap in the variable and wire gadgets, to create two possible states. As before we use an underlying triangular grid, which we omit in the figures of this section for ease of presentation.

Let be a planar 3-Sat formula. For one variable of we construct a variable gadget consisting of a cycle of line segments , see Fig. (a)a. Such a cycle has exactly two maximum-ink drawings. One, where for each segment the gap is placed at its intersection with and another drawing, in which the gap is placed at its intersection with . Fig. (a)a shows a variable in its true state. We set the length of one segment to , where is the distance between the two intersection points and is the length of each stub sticking out.

A clause gadget is a cycle of three pairwise intersecting segments , which we call triangle segments. All segments are elongated at one end, such that the total length of a segment , , is . Since the stubs are independent we could draw all three triangle segments. To avoid this we attach a big 4-cycle to each . Then intersects the 4-cycle at a segment , see Fig. (b)b. If we place the gap of at its intersection with , we lose more units of ink than we gain by drawing every triangle segment completely. Hence it is never possible to draw more than one full triangle segment in an ink-maximal PED.

Finally, a wire is a chain of segments for each variable occurrence in a clause in . We place the wire such that intersects the corresponding variable gadget at some segment , and intersects the clause gadget of at one if its triangle segments . For the variable we place this intersection point at distance to its intersection with , if it occurs positively, or with , if it occurs negated. At the clause gadget we place the intersection of with the corresponding at distance from the intersection between and its successor , see the small squares in Fig. (b)b. Each segment has length .

(a) Variable gadget
(b) Clause gadget
Figure 9: Gadgets of our reduction. Squares mark connection points for wires.

Correctness follows similarly to the proof of Theorem 1. Let be the set of line segments constructed as above for a planar 3-Sat formula . We determine an ink value , s.t., has a PED with if and only if has a satisfying variable assignment. The key property is that for each clause we find one wire such that its last segment is forced to place its gap at the intersection with the clause gadget in an ink-maximal PED. Then for each other segment , , we must place its gap at the intersection with . Otherwise we would have to remove either units of ink in the middle part of some , or remove units of ink at the variable gadget intersected by . We show that both can be avoided if and only if has a satisfying assignment.

Corollary 1

MaxPED and MaxSPED for -plane drawings are not fixed-parameter tractable, when parameterized solely by .

4 Algorithms

Sections 3.1 and 3.2 showed that MaxSPED and MaxPED are generally -hard for and respectively. Now we consider the special case that the intersection graph of the -plane input drawing is a tree or has bounded treewidth. In both cases we present polynomial-time dynamic programming algorithms for MaxSPED (Sections 4.1 and 4.2) and MaxPED (Section 4.3).

Let be the intersection graph of a given drawing of a graph as defined in Section 2. Let and . Then for the corresponding segment there are relevant stub pairs including the whole segment, see Fig. 10. Let be the stub lengths induced by the intersection points of with the segments of the neighbors of , sorted from shorter to longer stubs. We define as the length of the whole segment .

Figure 10: A segment with five intersecting segments and the induced stub lengths. The boxed stub lengths are considered in and do not affect .

4.1 Trees

Here we assume that is a rooted tree of maximum degree . We give a bottom-up dynamic programming algorithm for solving MaxSPED on . For each vertex we compute and store the maximum ink values for for the subtree rooted at such that is drawn as a pair of stubs of length . For let denote the parent of in and let denote the set of its children. For let be the index of the stub length induced by the intersection point of and . We define the following two values, which allow us to categorize the stub lengths into those not affecting the stubs of the parent and those that do affect the parent:

Figure 10 highlights the stub lengths that are considered in . We recursively define

(1)

The correctness of Recurrence (1) follows by induction. For a leaf in the set is empty and the correctness of is immediate. Further, and are set correctly for the parent . For an inner vertex with degree we can assume by the induction hypothesis that the values and are computed correctly for all children . Each value for is then the stub length plus the sum of the maximum ink we can achieve among the children subject to the stubs of being drawn with length . Setting and as above yields the two maximum ink values that are relevant for .

Recurrence (1) can be solved naively in time, where . Using the order on the stub lengths we can improve this to time by computing all for one in time. Let be a vertex with degree . The values and for the whole segment and the shortest stubs can be computed in time each. Now can be computed from in time as follows. Let be the neighbor of that induces stub length and assume . In we could still count the value , but in the stub length of implies that can contribute only to . Then . If the two values and are equal, as the corresponding change in stub length has no effect on the children of . Then computing and takes time.

Using standard backtracking we are able to find an optimal solution to the MaxSPED problem on with drawing by solving Recurrence (1) in time. Furthermore, the intersection graph with edges can be computed in time. We obtain the following theorem.

Theorem 1

Let be a simple graph with edges and a straight-line drawing of . If the intersection graph of is a tree with maximum degree , then problem MaxSPED can be solved in time and space.

4.2 Bounded Treewidth

Now we extend the case of a simple tree to the case that the intersection graph has treewidth at most . Our algorithm and proof of correctness follow a similar approach as the weighted independent set algorithm presented by Cygan et al. [13]. Let be a nice tree decomposition of and the maximum degree in . For we define the stub set . For , , we say intersects if drawn with stub length intersects drawn with length . Further we call valid if contains exactly one pair for each and no two pairs in intersect, i.e., the stub lengths in imply a SPED in the input drawing . Further we define the ink of a stub set as .

[]lemmalemintersection Let be a simple graph, a straight line drawing of , the intersection graph of , and a tree decomposition of . For any fixed , any two valid stub sets with maximum ink and have equal ink value .

As a consequence of Lemma 4.2 we get that it suffices to store for every set of vertices and a node the value of a maximum-ink valid stub set for the choices of vertices in . Let and a stub set, then we define

If no such exists, we set . In other words, is the maximum ink value achievable by any valid stub set in choosing as the stub set for the vertices in . If the values are computed correctly for every we find the ink-value of a maximum-ink SPED by evaluating with being the root of . Applying standard backtracking we can also reconstruct the stubs themselves. We now describe how to compute for every node type of a nice tree decomposition of . All the recursion formulas are stated here, as well as the correctness proof for the introduce nodes, the correctness proofs for the forget and join nodes can be found in Appendix 0.B.

Leaf node. Let be a leaf node and the vertex contained in its bag, then we store for each pair with .

Introduce node. Suppose next is an introduce node and its only child. Let be the vertex introduced by , , and , s.t., . If is not a valid stub set we set , else

Correctness follows by considering a valid stub set whose maximum is attained in the definition of . Then for the set it follows that it is considered in the definition of and hence we get

On the other hand consider a valid stub set for which the maximum is attained in the definition of . We need to argue that is again a valid stub set. First, by assumption that is a valid stub set, we immediately get that does not intersect any . Additionally, by the properties of the nice tree decomposition, we get that has no neighbors in and with we can conclude that is a valid stub set. Furthermore it is considered in the definition of and we have that

Forget node. Suppose is a forget node and its only child such that for some . Let be any subset of , if is not a valid stub set we set , else .

Join node. Suppose that is a join node and its two children with . Again let be any subset of . If is not a valid stub set we set , else .

It remains to argue about the running time. Let . We know there are many nodes in the tree of the nice tree decomposition [14]. For each bag we know it has at most many elements and each element has at most many possible stubs, hence we have to compute at most values per node . At each forget node we additionally need to compute the maximum of up to entries. Consequently we perform many operations per node . All operations can be implemented in time. The only problematic one is to test a stub set for validity. We use a modified version of the data structure used in the independent set algorithm by Cygan et al. [13]. See Appendix 0.B for details.

Theorem 2

Let be a simple graph with edges and a straight-line drawing of . If the intersection graph of has treewidth at most and maximum degree , problem MaxSPED can be solved in time and space.

We remark that Theorem 1 shows a better running time in the case of being a tree, than would follow from Theorem 2 with . Furthermore, since Theorem 2 is exponential only in the treewidth of , it implies that MaxSPED is in the class 111The class  contains problems that can be solved in time , where is the input size, is a parameter, and is a computable function. when parametrized by .

4.3 Algorithms for MaxPED

Let be the intersection graph in a MaxPED problem. In contrast to MaxSPED we need to consider more combinations of stub lengths since they are not necessarily symmetric anymore. In fact there are possible combinations of left and right stub lengths for a vertex . For the case of being a tree our whole argumentation was based solely on the fact that we can subdivide the stub pairs into sets affecting the parent segment or not. This can also be done with the quadratic size sets of all stub pairs and we only get an additional factor of in the running time.

Corollary 2

Let be a simple graph with edges and a straight-line drawing of . If the intersection graph of is a tree with maximum degree , then problem MaxPED can be solved in time and space.

In case of having bounded treewidth we again did never depend on the symmetry of the stubs, but only on them forming a finite set for each vertex. Consequently we can again just use these quadratic size sets of stub pairs, adding a factor of compared to MaxSPED, and obtain the following.

Corollary 3

Let be a simple graph with edges and a straight-line drawing of . If the intersection graph of has treewidth at most and maximum degree , problem MaxPED can be solved in time and space.

5 Experiments

We implemented222https://bitbucket.org/Remvipomed/partialedgedrawing and tested the tree decomposition based algorithms. To compute the nice tree decomposition we used the “htd” library [1] version , compiled with gcc version 8.3. The algorithm itself was implemented in Python3.7, using the libraries333https://networkx.github.io/ and https://github.com/Toblerity/Shapely NetworkX 2.3 and Shapely 1.6. To run the experiments we used a cluster, each node equipped with an Intel Xeon E5-2640 v4 processors clocked at 2.4GHz, 160GB of Ram, and operating Ubuntu 16.04. Each run had a memory limit of at most 80GB of RAM.

We generated random graphs using the NetworkX gnm algorithm. The graphs have vertices and between and edges in increments of 5. This makes a total of 800 graphs, 100 for each . For the layouts we used the NetworkX implementation of the spring embedder by Fruchterman and Reingold [15] and the graphviz444https://www.graphviz.org/ implementation “circo” of a circular layout, version 2.40.1. We could successfully run MaxSPED for all but four of the spring layouts and for all circle layouts with up to edges.

Figure 11: Experimental results for the MaxSPED algorithm.

Since the time complexity of the algorithm depends exponentially on the treewidth of the intersection graph, we evaluated the running time relative to treewidth and number of crossings, see Fig. 11. The results are as expected, with the runtime quickly increasing to about 16 minutes (1,000 sec) for 80 crossings in case of the spring and 50 crossings in case of the circle layouts – or for a treewidth of for both layouts. On the other hand we can handle up to 50 crossings and a treewidth of 4 for the spring layouts in about 10 seconds. The discrepancy in the runtime relative to the number of crossings between spring and circle layouts likely comes from different numbers of crossings per edge. To confirm this we took for each intersection graph its maximum degree divided by the total number of input crossings. For the spring layouts this resulted in a ratio of and for the circle layouts . Recall that the running time is dominated by . Hence an increase by a of factor 1.5 in the aforementioned value also results in an additional factor of in the asymptotic running time. Concerning ink, for the circle layouts an average of 84% () and for spring layouts an average of 90% () of the ink could be preserved. For MaxPED we conducted the same experiments. In general one can say that the additional factor of makes a big difference. For details see Appendix 0.C.

In summary, our experiment confirmed the predicted running time behavior and showed that the amount of removed ink was moderate. Moreover, the “htd” library [1] performed very well for computing a nice tree decomposition so that we could focus on implementing the dynamic programming algorithm itself.

6 Conclusion

We extended the work by Bruckdorfer et al. [6] and showed -hardness for the MaxPED and MaxSPED problems, as well as polynomial-time algorithms for the case of the intersection graph of the input drawing being a tree or having bounded treewidth. For the latter, our proof-of-concept implementation worked reasonably well for small to medium-size instances.

An interesting open problem is to close the gap for MaxPED. While we showed it to be -hard for and it is easy to solve for  [7], the case of remains open. Another direction is to consider the existential question for homogeneous (but non-symmetric) PEDs with a fixed ratio , for which we can freely distribute the fraction of the ink to both stubs. We expect that our algorithms for trees and intersection graphs of bounded treewidth extend to that case, but we could not resolve if the problem is -hard or not.

References

  • [1] Abseher, M., Musliu, N., Woltran, S.: htd - A free, open-source framework for (customized) tree decompositions and beyond. In: Salvagnin, D., Lombardi, M. (eds.) Integration of AI and OR Techniques in Constraint Programming (CPAIOR’17). LNCS, vol. 10335, pp. 376–386. Springer (2017). https://doi.org/10.1007/978-3-319-59776-8_30
  • [2] Becker, R.A., Eick, S.G., Wilks, A.R.: Visualizing network data. IEEE Trans. Visualization and Computer Graphics 1(1), 16–28 (1995). https://doi.org/10.1109/2945.468391
  • [3] de Berg, M., Cheong, O., van Kreveld, M., Overmars, M.: Computational Geometry: Algorithms and Applications. Springer, 3rd edition edn. (2008)
  • [4] Binucci, C., Liotta, G., Montecchiani, F., Tappini, A.: Partial edge drawing: Homogeneity is more important than crossings and ink. In: Information, Intelligence, Systems Applications (IISA’16). IEEE (2016). https://doi.org/10.1109/IISA.2016.7785427
  • [5] Bruckdorfer, T.: Schematics of Graphs and Hypergraphs. Ph.D. thesis, Universität Tübingen (2015), http://dx.doi.org/10.15496/publikation-8904
  • [6] Bruckdorfer, T., Cornelsen, S., Gutwenger, C., Kaufmann, M., Montecchiani, F., Nöllenburg, M., Wolff, A.: Progress on partial edge drawings. J. Graph Algorithms Appl. 21(4), 757–786 (2017). https://doi.org/10.7155/jgaa.00438
  • [7] Bruckdorfer, T., Kaufmann, M.: Mad at edge crossings? Break the edges! In: Kranakis, E., Krizanc, D., Luccio, F. (eds.) Fun with Algorithms (FUN’12). LNCS, vol. 7288, pp. 40–50. Springer (2012). https://doi.org/10.1007/978-3-642-30347-0_7
  • [8] Bruckdorfer, T., Kaufmann, M., Lauer, A.: A practical approach for 1/4-SHPEDs. In: Information, Intelligence, Systems and Applications (IISA’15). IEEE (2015). https://doi.org/10.1109/IISA.2015.7387994
  • [9] Bruckdorfer, T., Kaufmann, M., Leibßle, S.: PED user study. In: Di Giacomo, E., Lubiw, A. (eds.) Graph Drawing (GD’15). LNCS, vol. 9411, pp. 551–553. Springer (2015). https://doi.org/10.1007/978-3-319-27261-0_47
  • [10] Bruckdorfer, T., Kaufmann, M., Montecchiani, F.: 1-bend orthogonal partial edge drawings. J. Graph Algorithms Appl. 18(1), 111–131 (2014). https://doi.org/10.7155/jgaa.00316
  • [11] Burch, M., Schmauder, H., Panagiotidis, A., Weiskopf, D.: Partial link drawings for nodes, links, and regions of interest. In: Information Visualisation (IV’14). pp. 53–58 (2014). https://doi.org/10.1109/IV.2014.45
  • [12] Burch, M., Vehlow, C., Konevtsova, N., Weiskopf, D.: Evaluating partially drawn links for directed graph edges. In: van Kreveld, M., Speckmann, B. (eds.) Graph Drawing (GD’11). LNCS, vol. 7034, pp. 226–237. Springer (2012). https://doi.org/10.1007/978-3-642-25878-7_22
  • [13] Cygan, M., Fomin, F.V., Kowalik, Ł., Lokshtanov, D., Marx, D., Pilipczuk, M., Pilipczuk, M., Saurabh, S.: Parameterized algorithms, vol. 3. Springer (2015)
  • [14] Downey, R.G., Fellows, M.R.: Parameterized complexity. Springer Science & Business Media (2012)
  • [15] Fruchterman, T.M.J., Reingold, E.M.: Graph drawing by force-directed placement. Softw., Pract. Exper. 21(11), 1129–1164 (1991). https://doi.org/10.1002/spe.4380211102
  • [16] Koffka, K.: Principles of Gestalt Psychology. Routledge (1935)
  • [17] Lichtenstein, D.: Planar formulae and their uses. SIAM J Comput 11(2), 329–343 (1982). https://doi.org/10.1137/0211025
  • [18] Purchase, H.: Which aesthetic has the greatest effect on human understanding? In: Di Battista, G. (ed.) Graph Drawing (GD’97). LNCS, vol. 1353, pp. 248–261. Springer (1997). https://doi.org/10.1007/3-540-63938-1_67
  • [19] Robertson, N., Seymour, P.D.: Graph minors. III. Planar tree-width. Journal of Combinatorial Theory, Series B 36(1), 49–64 (1984). https://doi.org/10.1016/0095-8956(84)90013-3

Appendix 0.A Omitted Proofs from Section 3.2

Let be a line segment in the plane. We define the fractions , such that is the fraction of drawn from its left endpoint and the fraction drawn from its right endpoint. Note that already Bruckdorfer and Kaufmann [7] observed that any 2-plane drawing admits a PED where for every segment we find for . In the following we will omit this and simply assume it is drawn with its full ink value of , i.e., . This will simplify the calculations in the proof of Theorem 3.2 significantly. Still the information where the gap of size would be placed is preserved by evaluating if or .

*

Proof

Let be a planar 3-Sat formula with variables and clauses , each consisting of three literals. Analogously to Section 3.1 we assume that comes with a polynomial-size planar drawing of its variable-clause graph , which has a vertex for each variable and a vertex for each clause . Similarly to above we create a 4-plane drawing (given as a set of line segments) such that has a PED with ink at least if and only if is satisfiable.

Let be the maximum number of occurrences of any variable in . Then for a variable of , we create a gadget consisting of a cycle of line segments , where each pair of segments and intersect as well as the pair and . Observe that every is 2-planar and hence admits a PED with . Further, a gadget admits exactly two different PEDs of this kind, one where for all segments it holds that and one where the inverse holds, see Fig. 14. We associate these two configurations with being set to true or false, respectively.

(a) true state
(b) false state
Figure 14: Ink-maximal PED of the variable gadget in both truth states; left stubs are green, right stubs are red.

It remains to fix the length of each segment in a variable gadget . We subdivide such a segment into three parts. The ones left and right of the intersection points with and and the one in between. Let with . The former ones are of length each and the latter one of length . Then and for one variable gadget we get the maximum ink value in any PED.

Next we describe the clause gadget. Let be a clause in and its gadget. As mentioned above we use a similar triangular arrangement as in the proof of Theorem 1. We split the gadget into multiple components. The three segments forming the central triangle we name the internal component of , compare Fig. (a)a. In contrast to the proof of Theorem 1 we extend every such segment and intersect it with a so called weight component. Such a weight component is a cycle made up of four segments.

More precisely we subdivide one segment of the internal component into four parts. The two outermost ones are of length each, the one between the two intersection points with the internal component is of length , and the fourth one of length , which we will call the connecting section of , see Fig. (a)a. For a segment of the weight component we pick its length left and right of the intersections with the weight component to be of length and the one enclosed by the two intersection points to be of length . Finally let let be the segment intersecting with , then their point of intersection is exactly at the midpoint of .

In total the clause gadget has units of ink available. As we will argue below the maximum ink value of any PED configuration is at most

(a) complete clause gadget
(b) optimal ink-value
Figure 17: A straight-line graph drawing (a) and a maximum-ink SPED (b) of the same graph.

Therefore we find . The value can be obtained only if we draw the weight components with their maximum ink value, i.e., each segment of the internal component has to have a gap at the intersection between and the corresponding segment of the weight component intersected by , see Fig. (b)b. If we place the gap of anywhere else, we lose at least units of ink in its weight component. This already exceeds the difference of . Since one connecting section has units of ink, it is never beneficial to draw all three yellow sections of the central triangle in Fig. (b)b, since this would again lose at least units of ink.

The final component of our reduction is the connection between a variable and a clause in which occurs in the formula . This gadget we call a wire gadget . One is a set of line segments for some . Each line segment intersects the next line segment . Further, intersects a segment in and intersects a segment in . All segments have length , where again the length left and right of the intersection points is and the length between the two intersection points is . We will call the latter part the middle section of a segment . We call the endpoint of that is next to the intersection with , the right endpoint of , and the stub connected to this endpoint, the right stub.

Let be the wire gadget for some variable appearing in clause in . Then intersects a segment . If occurs as a positive literal in , the intersection point has a distance of to the intersection point between and . If occurs as a negative literal in , the intersection point has a distance of to the intersection point between and , compare the two cases in Fig (a)a.

Now let be a segment of the internal component of . Then intersects in the connecting section, at a distance of to the intersection with the next segment of the internal component, see Fig. (b)b. Observe that each of the three wire gadgets intersecting a clause gadget is intersecting a different connecting section. The maximum ink value of a wire gadget in a PED is .

(a) Wires at variable gadget
(b) Wires at clause gadget. The red circle marks the gap being placed at the clause.
Figure 20: Wire connections at the variable gadget (a) and the clause gadget (b).

We now analyze the possible ways a wire gadget can be drawn in an ink-maximal PED of . First let be a wire gadget for variable and clause and assume is drawn with a gap at the intersection with and let the connecting section of be drawn. Since we can ever only draw one connecting section of the internal component of , the two other wire gadgets intersecting segments in are free to have their last segments drawn completely. Let be one of those two wires. We can draw the middle section of every segment as part of the right stub. Now has an intersection point with , splitting into a left part with length and a right part with length . Therefore has a PED with , i.e., all segments can be drawn with full ink. We are left to consider the one wire with a gap at the clause gadget.

Let be this wire gadget for a variable and clause in . Then has two options at the intersection with . Either the middle section of is drawn as part of its right stub, in which case we lose at least at or it is drawn as part of its left stub, in which case we do not lose any ink, but instead force the middle section of each other segment of to be draw as part of its left stub. In particular this means that the middle section of can only be drawn as part of its left stub. This leaves again two options. Either omits its middle section and is only drawn with its two -sized stubs, resulting in a loss of units of ink, or we draw the middle section of as part of its left stub, in which case we either lose or , depending on the chosen state of .

We can now compute the exact optimal ink value for a maximum-ink PED of by adding for every variable in , for every clause in , for every literal in and finally subtracting for every clause in .

We claim that has a PED with an ink value of at least , if and only if is satisfiable. We will now argue the space requirements and correctness of our reduction now. For the space requirements we can use a similar approach as in Theorem 1. We draw all gadgets with their segment endpoints and intersection points on a triangular grid, using as the unit length of this grid. Further we set as a suitably large even multiple of . Since the original drawing of was of polynomial size this yields a drawing of polynomial size in the number of clauses and variables with integer coordinates in the triangle grid.

Assume has a satisfying variable assignment. Then every clause contains at least one literal set to true. First assume this literal is positive then the corresponding variable is set to true. We draw in its true state (see Fig. 14), then we can draw of with its gap at the intersection with and we only lose units of ink; analogously for the case of a negative literal and set to false. In either case we can place the gap of at its intersection with , which allows to draw the connecting section of . As argued above, the other two wire gadgets can be drawn with maximum ink. Since we started with a satisfying assignment, this holds for every and therefore has a PED with .

Now conversely assume has a PED with . Construct a variable assignment of by assigning to each variable in the state derived from the corresponding gadget . Assume for contradiction that this assignment is not satisfying. Then by construction we find three variable gadgets , and connected to one clause gadget , s.t., is not satisfied by the assignment derived for . As argued above we know exactly one such connection is of the form that places its gap at the intersection with the corresponding segment in . Consequently we find that forces the corresponding segment to be drawn without its units long section, but this contradicts . Alternatively we could omit the middle section for some , but then again we would lose units of ink, which contradicts .

Appendix 0.B Omitted Proofs from Section 4.2

*

Proof

Let be two maximum ink valid stub sets with . Assume for contradiction . We can construct a new solution by exchanging the stubs in by the stubs in . Then is again a valid stub set, since separates the graph induced by from the one induced by while the intersection of with is the same. By assumption though we find , a contradiction.

Forget node.

Suppose is a forget node and its only child such that for some . Let be any subset of , if is not a valid stub set we set , else

Let be a valid stub set whose maximum is attained in and , s.t., . Then is considered in and hence and it follows

On the other hand, observe that every stub set in the definition of for some is also considered in the definition of and hence

Join node.

Suppose that is a join node and its two children with . Again let be any subset of . If is not a valid stub set we set , else

Let be a valid stub set whose maximum is attained in . Let and . Since is a valid stub set we find that and are also valid stub sets and further . Hence is considered in and . Analogously and we find with that