## 1 Hybrid Representations

A common problem in the visual analysis of real-world networks is that dense subnetworks create occlusions and hairball-like structures in node-link diagrams generated by standard layout algorithms, e.g., force-directed methods. On the other hand, different representations, such as adjacency matrices, are well suited for dense graphs but make neighbor identification and path-tracing more difficult [6, 11].
*Hybrid graph representations* combine different representation metaphors in order to exploit their strengths and overcome their drawbacks.

The first example of hybrid representation was the *NodeTrix* model [7], which combines node-link diagrams with adjacency-matrix representations of the denser subgraphs [3, 4, 7, 13]. Another example of hybrid representations are *intersection-link representations* [1]. In this model vertices are geometric objects and edges are either intersections between objects (*intersection edges*), or crossing-free Jordan arcs attaching at their boundary (*link edges*).
Different types of objects determine different intersection-link representations.

In [1], *clique-planar* drawings are defined as intersection-link representations in which the objects are isothetic rectangles, and the partition into intersection- and link-edges is given in the input, so that the graph induced by the intersection-edges is composed of a set of vertex-disjoint cliques. The corresponding recognition problem is called Clique-planarity, and it has been proved NP-complete in general and polynomial-time solvable in restricted cases.

We study Clique-planarity when all cliques have bounded size. As proved in [1], the Clique-planarity problem can be reformulated in the terminology of *beyond-planarity* [5, 9], as follows. Given a graph and a partition of its vertex set into subsets such that the subgraph of induced by each subset is a clique, the goal is to compute a planar subgraph of by replacing the clique induced by , for each , with a path spanning the vertices of . We call -Clique2Path Planarity (for short, -C2PP) the version of this problem in which each clique has size at most ; see Fig. 3.

We remark that the version of -C2PP in which the input graph is a *geometric graph*, i.e., it is drawn in the plane with straight-line edges, has been recently studied by Kindermann et al. [8] in a different context. The input of their problem is a set of colored points in the plane, and the goal is to decide whether there exist straight-line spanning trees, one for each same-colored point subset, that do not cross each other. Since edges are straight-line, their drawings are determined by the positions of the points, and hence each same-colored point subset can in fact be seen as a straight-line drawing of a clique, from which edges have to be removed so that each clique becomes a tree and the drawing becomes planar. They proved NP-completeness for the case in which the spanning tree must be a path, even when there are at most vertices with the same color. This implies that -C2PP for geometric graphs in NP-complete. On the other hand, they provided a linear-time algorithm when there exist at most vertices with the same color, which then extends to -C2PP for geometric graphs.

In this paper, we study the version of -C2PP in which the input graph is a *simple topological graph*, that is, it is embedded in the plane so that each edge is a Jordan arc connecting its end-vertices; by simple we mean that a Jordan arc does not pass through any vertex, and does not intersect any arc more than once (either with a proper crossing or sharing a common end-vertex); finally, no three arcs pass through the same point.
Our main goal is to study the complexity of this problem in relation to the well-studied class of *-planar graphs*, i.e., those that admit drawings in which each edge has at most crossings [1, 2, 5, 12].

We observe that the NP-completeness of -C2PP for geometric graphs already implies the NP-completeness of -C2PP for simple topological graphs; also, though not explicitly mentioned in [8], it is possible to show that the instances produced by that reduction are -plane (see Appendix 0.A). We strengthen this result by proving in Section 2 that -C2PP is NP-complete even for simple topological -plane graphs. On the positive side, we prove in Section 3 that the -C2PP problem for simple topological -plane graphs can be solved in linear time for any value of . We finally remark that the 2-SAT formulation used in [8] to solve -C2PP for geometric graphs can be easily extended to solve -C2PP for any simple topological graph.

For space reasons, some proofs have been omitted or sketched, and can be found in the appendix; the corresponding statements are marked with [*].

## 2 Np-completeness for simple topological -plane graphs

In this section we prove that the -C2PP problem remains NP-complete for even when the input is a simple topological -plane graph.

Since the planarity of a simple topological graph can be checked in linear time, the -C2PP problem for simple topological -plane graphs belongs to NP for all values of and .
In the following, we prove the NP-hardness by means of a reduction from the Planar Positive 1-in-3-SAT problem. In this version of the Satisfiability problem, which is known to be NP-complete [10], each variable appears only with its positive literal, each clause has at most three variables, the graph obtained by connecting each variable with all the clauses it belongs to is planar, and the goal is to find a truth assignment in such a way that, for each clause, exactly one of its three variables is set to True.
For each -clique we use in the reduction, there is a *base edge*, which is crossing-free in the constructed topological graph, while the other two edges always have crossings. We call *left* (*right*) the edge that follows (precedes) the base edge in the clockwise order of the edges along the -clique. Also, if an edge of a clique does not belong to the path replacing the clique, we say that is *removed*, and that all the crossings involving in are *resolved*.
For each variable , let be the number of clauses containing . We construct a simple topological graph gadget for , called *variable gadget*; see the left dotted box in Fig. 1(a). This gadget contains -cliques , forming a ring, so that the left (right) edge of only crosses the left (right) edge of and of , for each . Also, gadget contains additional -cliques, called , so that the right edge of crosses the left edge of and the right edge of , while the left edge of crosses the left edge of and the right edge of .

Then, for each clause , we construct a topological graph gadget , called *clause gadget*, which is composed of a planar drawing of a -clique, together with three -cliques whose left and right edges cross the edges of the -clique as in the right dotted box in Fig. 1(a). In particular, observe that the right (left) edge of each -clique crosses exactly one (two) edges of the -clique.
Every -clique in corresponds to one of the three variables of . Let be one of such variables; assuming that is the -th clause that contains according to the order of the clauses in the given formula, we connect the -clique corresponding to in the clause gadget to the -clique of the variable gadget of by a chain of

-cliques of odd length, as in Fig.

1(a).By construction, the resulting simple topological graph contains cliques of size at most , namely one per clause, and hence is a valid instance of -C2PP. Also, by collapsing each variable and clause gadget into a vertex, and each chain connecting them into an edge, the resulting graph preserves the planarity of the Planar Positive 1-in-3-SAT instance. This implies that the only crossings for each edge of are with other edges in the gadget it belongs to and, possibly, with the edges of the -cliques of a chain. Hence, is -plane. Namely, each base edge is crossing-free; each internal edge of a -clique has one crossing; each external edge of a -clique has two crossings, and the same is true for the left and right edges of each -clique in a chain; finally, the left and right edges of each -clique in either a variable or a clause gadget has three crossings.

In the following we prove the equivalence between the original instance of Planar Positive 1-in-3-SAT and the constructed instance of -C2PP. For this, we first give a lemma stating that variable gadgets correctly represent the behavior of a variable; indeed they can assume one out of two possible states in any solution for -C2PP. The proof of the next lemma is in Appendix 0.B.

###### Lemma 1 ()

*[*]*
Let be the variable gadget for a variable in . Then, in any solution for -C2PP, either the left edge of each -clique , with , is removed, or the right edge of each -clique is removed.

Given Lemma 1, we can associate the truth value of a variable with the fact that either the left or the right edge of each -clique in the variable gadget of is removed. We use this association to prove the following theorem.

###### Theorem 2.1 ()

*[*]*
The -C2PP problem is NP-complete, even for -plane graphs.

###### Proof (sketch)

Given an instance of Planar Positive 1-in-3-SAT, we construct an instance of -C2PP in linear time as described above. We prove one direction of the equivalence between the two problems. The other direction follows a similar reasoning. Suppose that there exists a solution for -C2PP, i.e., a set of edges of whose removal resolves all crossings. By Lemma 1, for each variable either the left or the right edge of each -clique in gadget is removed. We assign True (False) to if the right (left) edge is removed.

We first claim that for each clause that contains variable , the right (left) edge of the -clique of the clause gadget corresponding to is removed if and only if the right (left) edge of each -clique is removed. Consider the chain that connects with a -clique of . For any two consecutive -cliques along the chain the left edge of one -clique and the right edge of the other -clique must be removed. Since the chain has odd length, the truth value of is transferred to the -clique of and thus the claim follows.

Consider now a clause with variables , , and . Let , , and be the -cliques of the clause gadget of corresponding to , , and , respectively. Let be the central vertex of the -clique of , and let , , be the vertices of this -clique lying inside , , and (see Fig. 1). Assume that , , and appear in this clockwise order around . We now show that, for exactly one of , , and the right edge is removed, which implies that exactly one of , , and is True and hence the instance of Planar Positive 1-in-3-SAT is positive. Assume that for each of , , and the left edge is removed (i.e., all the three variables are set to False), as in Fig. 1(b). The crossings between the right edges of the three -cliques and the three edges of triangle are not resolved. All edges of this triangle should be removed, which is not possible since the remaining edges of the -clique do not form a path. Assume now that for at least two of the -cliques, say and , the right edge is removed (i.e., and are set to True), as in Fig. 1(c). Since each edge of triangle is crossed by the left edge of one of and , by construction, these crossings are not resolved. Hence, all edges of should be removed, which is not possible since the remaining edges of the -clique do not form a path of length . Finally, assume that for exactly one of the -cliques, say , the right edge is removed (i.e., is the only one set to True), as in Fig. 1(a). By removing edges , , and , all crossings are resolved; the remaining edges of the -clique form a path of length , as desired.

## 3 -Clique2Path Planarity and -Planarity

In this section we show that, when the given simple topological graph is 1-plane, problem -C2PP can be solved in linear time in the size of the input, for any . We consider all possible simple topological 1-plane cliques and show that the problem can be solved using only local tests, each requiring constant time. Note that , since is the largest -planar complete graph [9].

Simple topological -plane graphs containing cliques with at most four vertices that cross each other can be constructed, but it is easy to enumerate all these graphs (up to symmetry); see Fig. 2. Note that such graphs involve at most two cliques and that if has a crossing, combining it with any other clique would violate -planarity; see Fig. 2(a) and Fig. 2(b). The next lemma accounts for cliques with five or six vertices.

###### Lemma 2

There exists no -plane simple topological graph that contains two cliques, one of which with at least five vertices, whose edges cross each other.

###### Proof

Consider a simple -plane graph that contains two disjoint cliques and , with five and three vertices, respectively. Let be the simple plane topological graph obtained from by replacing each crossing with a dummy vertex. By -planarity, every face of is a triangle and contains at most one dummy vertex. Suppose, for a contradiction, that there exists a crossing between an edge of and an edge of in . Then there would exist at least a vertex of inside a face of and at least one outside . Since is a triangle, there must have been two edges that connect vertices inside to vertices outside . If contains one dummy vertex, then two of its edges are not crossed by edges of , as otherwise would not be -plane. Hence, both the edges that connect vertices inside to vertices outside cross the other edge of , a contradiction. If contains no dummy vertices, then each edge of admits one crossing. Let be the vertex of that is incident to the two edges crossed by edges of . Since has degree in , it is not possible to draw the third edge of so that it crosses only one edge of , which completes the proof.

Combining the previous discussion with Lemma 2, we conclude that, for each subgraph of the input graph that consists either of a combination of at most two cliques of size at most , as in Fig. 2, or of a single clique not crossing any other clique, the crossings involving this subgraph (possibly with other edges not belonging to cliques) can only be resolved by removing its edges, which can be checked in constant time. In the next theorem, denotes the number of vertices.

###### Theorem 3.1

-C2PP is -time solvable for simple topological -plane graphs.

## 4 Open Problems

We studied the -Clique2Path Planarity problem for simple topological -plane graphs; we proved that this problem is NP-complete for and , while it is solvable in linear time for every value of , when . The natural open question is: what is the complexity for simple topological -plane graphs?

Kindermann et al. [8] recently proved that problem -C2PP is NP-complete for geometric -plane graphs. It would be interesting to study this geometric version of the problem for -plane and -plane graphs.

Finally, note that the version of the -C2PP problem when the input is an abstract graph (which is equivalent to Clique Planarity [1]) is NP-complete when . What if is bounded by a constant or a sublinear function? We remark that, for , this version of the problem is equivalent to Clustered Planarity, when restricted to instances in which the graph induced by each cluster consists of three isolated vertices.

## References

- [1] Angelini, P., Da Lozzo, G., Di Battista, G., Frati, F., Patrignani, M., Rutter, I.: Intersection-link representations of graphs. J. Graph Algorithms Appl. 21(4), 731–755 (2017). https://doi.org/10.7155/jgaa.00437, https://doi.org/10.7155/jgaa.00437
- [2] Bekos, M.A., Kaufmann, M., Raftopoulou, C.N.: On optimal 2- and 3-planar graphs. In: 33rd International Symposium on Computational Geometry, SoCG 2017, July 4-7, 2017, Brisbane, Australia. pp. 16:1–16:16 (2017). https://doi.org/10.4230/LIPIcs.SoCG.2017.16, https://doi.org/10.4230/LIPIcs.SoCG.2017.16
- [3] Da Lozzo, G., Di Battista, G., Frati, F., Patrignani, M.: Computing NodeTrix representations of clustered graphs. J. Graph Algorithms Appl. 22(2), 139–176 (2018). https://doi.org/10.7155/jgaa.00461, https://doi.org/10.7155/jgaa.00461
- [4] Di Giacomo, E., Liotta, G., Patrignani, M., Tappini, A.: NodeTrix planarity testing with small clusters. In: Frati, F., Ma, K. (eds.) Graph Drawing and Network Visualization - 25th International Symposium, GD 2017, Boston, MA, USA, September 25-27, 2017, Revised Selected Papers. Lecture Notes in Computer Science, vol. 10692, pp. 479–491. Springer (2017). https://doi.org/10.1007/978-3-319-73915-1_37, https://doi.org/10.1007/978-3-319-73915-1_37
- [5] Didimo, W., Liotta, G., Montecchiani, F.: A survey on graph drawing beyond planarity. CoRR abs/1804.07257 (2018), http://arxiv.org/abs/1804.07257
- [6] Ghoniem, M., Fekete, J., Castagliola, P.: On the readability of graphs using node-link and matrix-based representations: A controlled experiment and statistical analysis. Information Visualization 4(2), 114–135 (2005). https://doi.org/10.1057/palgrave.ivs.9500092, https://doi.org/10.1057/palgrave.ivs.9500092
- [7] Henry, N., Fekete, J., McGuffin, M.J.: NodeTrix: A hybrid visualization of social networks. IEEE Trans. Vis. Comput. Graph. 13(6), 1302–1309 (2007). https://doi.org/10.1109/TVCG.2007.70582, https://doi.org/10.1109/TVCG.2007.70582
- [8] Kindermann, P., Klemz, B., Rutter, I., Schnider, P., Schulz, A.: The partition spanning forest problem. In: Mulzer, W. (ed.) Proc. 34th European Workshop on Computational Geometry (EuroCG’18). Berlin (2018), to appear.
- [9] Kobourov, S.G., Liotta, G., Montecchiani, F.: An annotated bibliography on 1-planarity. Computer Science Review 25, 49–67 (2017)
- [10] Mulzer, W., Rote, G.: Minimum-weight triangulation is NP-hard. J. ACM 55(2), 11:1–11:29 (2008). https://doi.org/10.1145/1346330.1346336, http://doi.acm.org/10.1145/1346330.1346336
- [11] Okoe, M., Jianu, R., Kobourov, S.G.: Revisited experimental comparison of node-link and matrix representations. In: Frati, F., Ma, K. (eds.) Graph Drawing and Network Visualization - 25th International Symposium, GD 2017, Boston, MA, USA, September 25-27, 2017, Revised Selected Papers. pp. 287–302. Lecture Notes in Computer Science (2017). https://doi.org/10.1007/978-3-319-73915-1_23, https://doi.org/10.1007/978-3-319-73915-1_23
- [12] Pach, J., Tóth, G.: Graphs drawn with few crossings per edge. Combinatorica 17(3), 427–439 (1997). https://doi.org/10.1007/BF01215922, https://doi.org/10.1007/BF01215922
- [13] Yang, X., Shi, L., Daianu, M., Tong, H., Liu, Q., Thompson, P.: Blockwise human brain network visual comparison using NodeTrix representation. IEEE Trans. Vis. Comput. Graph. (2017)

## Appendix 0.A Omitted Details About the Reduction in [8]

In this section, we show that the instances produced by the reduction in [8] are -plane in general.

The variable gadget consists of a triangle whose edges are , and . Edge is crossing-free and the truth value of is encoded according to which edge among and is crossing-free. Given a pair of triangles and whose vertices are and , they define two faces is and respectively. Concatenate a triangle defined as in the variable gadget with by inserting its crossing-free edge inside and by crossing the other two edges of with and , respectively. Now, concatenate another triangle defined as in the variable gadget with . If the crossing-free edge of is inside , the gadget composed of and is the wire gadget; if the crossing-free edge of is outside , the gadget composed of and is the inverter gadget. The splitting gadget consists of three variable gadgets and , and two -cliques, concatenated as illustrated inside the blue region in Fig. 4, where the yellow region contains a variable gadget, the orange region contains a wire gadget and the violet region contains an inverter gadget. As shown in Fig. 4, multiple splittings of a variable lead to an instance where a triangle has two edges with four crossings.

## Appendix 0.B Proof of Lemma 1

See 1

###### Proof

We first consider the possible removals of edges in and claim that, in any solution for -C2PP, one of the two following conditions are satisfied: (i) for each -clique , if is odd, then the left edge is removed, while if is even the right edge is removed; (ii) for each -clique , if is odd, then the right edge is removed, while if is even the left edge is removed. Note that this claim is sufficient to prove the statement; in fact, if condition (i) holds (as in Fig. 1(a)), then the right edge of each -clique must be removed, in order to resolve its crossings with the right edge of and with the left edge of , while if condition (ii) holds, then the left edge of each -clique must be removed, in order to resolve its crossings with the left edge of and with the right edge of .

In order to prove the claim, we consider the possible removals of edges of . Suppose first that the base edge of is removed. Thus, the crossings between the left (right) edge of and the left (right) edge of are not resolved; this implies that they have to be resolved by removing both the left and the right edge of , which is not possible. If the right edge of is removed, then the crossing between the right edges of and is resolved, while the one between their left edges is not. Hence, the left edge of must be removed. By iterating this argument we conclude that the right (left) edge of each with odd (even) is removed. Symmetrically, we can prove that, if the left edge of is removed, then the left (right) edge of each with odd (even) is removed. This concludes the proof of the lemma.

## Appendix 0.C Proof of Theorem 2.1

See 2.1

###### Proof

Given an instance of Planar Positive 1-in-3-SAT, we construct an instance of -C2PP in linear time as described above. We prove their equivalence.

Suppose first that there exists a solution for -C2PP, i.e., a set of edges of whose removal resolves all crossings. By Lemma 1, for each variable either the left or the right edge of each -clique in the variable gadget is removed. If the right edge is removed, we assign value True to variable , otherwise we assign False.

In order to prove that this assignment results in a solution for the given formula of Planar Positive 1-in-3-SAT, we first show that, for each clause that contains variable , the right (left) edge of the -clique of the clause gadget corresponding to is removed if and only if the right (left) edge of each -clique is removed. Namely, consider the chain that connects with a -clique of . Note that, for any two consecutive -cliques along the chain, the left edge of one -clique and the right edge of the other -clique must be removed. Since the chain has odd length, the right (left) edge of is removed if and only if the right (left) edge of is removed, that is, the truth value of is transferred to the -clique of .

Finally, consider any clause , composed of variables , , and . Let , , and be the three -cliques of the clause gadget of corresponding to , , and , respectively; also, let be the central vertex of the -clique of , and let , , be the vertices of this -clique lying inside , , and , respectively; see Fig. 1. We assume w.l.o.g. that , , and appear in this clockwise order around . As discussed above, the left or the right edge of (of ; of ) is removed depending on whether the left or the right edge of each (of each ; of each ) is removed. We show that, for exactly one of , , and the right edge is removed, which then implies that exactly one of , , and is True, and hence the instance of Planar Positive 1-in-3-SAT is positive.

Suppose first that for each of , , and the left edge is removed (and hence all the three variables are set to False), as in Fig. 1(b). This implies that the crossings between the right edges of the three -cliques and the three edges of triangle are not resolved. Hence, all the edges of this triangle should be removed, which is not possible since the remaining edges of the -clique do not form a path. Suppose now that for at least two of , , and , say and , the right edge is removed (and hence and are set to True), as in Fig. 1(c). Since each edge of triangle is crossed by the left edge of one of and , by construction, these crossings are not resolved. Hence, all the edges of should be removed, which is not possible since the remaining edges of the -clique do not form a path of length . Suppose finally that for exactly one of , , and , say , the right edge is removed (and hence is the only one to be set to True), as in Fig. 1(a). Then, by removing edges , , and , all the crossings are resolved and the remaining edges of the -clique form a path of length , as desired.

The proof of the other direction is analogous. Namely, suppose that there exists a truth assignment that assigns a True value to exactly one variable in each clause. Then, for each variable that is set to True (to False), we remove the right (left) edge of each -clique , with and , we remove the left (right) edge of each -clique , with and , and we remove the right (left) edge of each -clique , with . Then, we remove the left or right edge of each -clique in a chain so that for any two consecutive -cliques, one of them has been removed the left edge and the other one the right edge. This ensures that, for each clause , the right edge of exactly one of the three -cliques that belong to the clause gadget has been removed, say the one corresponding to variable , while for the other two -cliques the left edge has been removed. Hence, we can resolve all crossings by removing edges , , and , as discussed above; see Fig. 1(a). The statement follows.

Comments

There are no comments yet.