Journal of Graph Algorithms and Applications Proportional Contact Representations of Planar Graphs

We study contact representations for planar graphs, with vertices represented by simple polygons and adjacencies represented by point-contacts or side-contacts between the corresponding polygons. Specifically, we consider proportional contact representations, where pre-specified vertex weights must be represented by the areas of the corresponding polygons. Natural optimization goals for such representations include minimizing the complexity of the polygons, and the unused area. We describe algorithms for proportional contact representations with optimal polygonal complexity for general planar graphs and planar 2-segment graphs, which include maximal outer-planar graphs and partial 2-trees.


Introduction
For both theoretical and practical reasons, there is a large body of work about representing planar graphs as contact graphs, where vertices are represented by geometrical objects with edges corresponding to two objects touching in some fashion. Typical classes of objects might be curves, line segments, or polygons. An early result is Koebe's theorem [15] that all planar graphs can be represented by touching disks.
In this paper we consider contact graphs, with vertices represented by simple polygons with disjoint interiors, and adjacencies represented by point-contacts or sidecontacts between corresponding polygons; see Fig. 1. In the weighted version of the problem, the input is not only a planar graph but also a weight function w : V (G) → R + that assigns a weight to each vertex of G = (V, E). A graph G admits a proportional contact representation with the weight function w if there exists a contact representation of G where the area of the polygon for each vertex v of G is proportional to w(v). Such representations have practical applications in cartography, VLSI Layout, and floor-planning.
Using adjacency of regions to represent edges in a graph can lead to a more compelling visualization than drawing a line segment between two points [4]. In such representations of planar graphs it is desirable, for aesthetic, practical and cognitive reasons, to limit how complicated the polygons are. In practical areas like VLSI layout, it is also desirable to minimize the unused area in the representation. With these considerations in mind, we study the problem of constructing proportional point-contact and side-contact representations of planar graphs w.r.t. the following parameters, partially taken from the cartography-oriented literature, e.g. [13,20] : -complexity: maximum number of sides in a polygon representing a vertex; -cartographic error: is v's area, w(v) its weight; -holes: total unused area of the representation that is in the interior.

Related Work
Koebe's theorem [15] is an early example of point-contact representation and shows that a planar graph can be represented by touching circles. Any planar graph also has a contact representation where all the vertices are represented by triangles [5] and with cubes in 3D [8]. Badent et al. [3] show that partial planar 3-trees and some seriesparallel graphs also have contact representations with homothetic triangles. Recently, Gonçalves et al. [11] proved that any 3-connected planar graph and its dual can be simultaneously represented by touching triangles. While the above results deal with point-contacts, the problem of constructing sidecontact representations is less studied. Gansner et al. [9] show that any planar graph G has a side-contact representation with convex hexagons. Moreover, they show that 6 sides are necessary if convexity is required. For maximal planar graphs, the representation obtained by the algorithm in [9] is hole-free. Buchsbaum et al. [4] give an overview on the state of the art concerning rectangle contact graphs. The characterization of graphs admitting a hole-free side-contact representation with rectangles was obtained by Kozḿiński and Kinnen [16] or in the dual setting by Ungar [19]. There is a also a simple linear time algorithm for constructing triangle side-contact representations for outerplanar graphs [10].
Note that in all the contact representation results mentioned above, the areas of the circles or polygons are not considered. That is, these results deal with the unweighted version of the problem. Furthermore, previous works on side-contact representations rarely focused on the presence or absence of holes, or the actual area taken by such holes. In our work we take both the area of regions and the presence of holes into account. For example, we show that representations by triangles or any convex shapes are not possible for certain planar graphs with pre-specified weights.
Motivated by the application in VLSI layouts, contact representations of planar graphs with rectilinear polygons and no holes have also been studied and it is known that 8 sides are sometimes necessary and always sufficient [21]. Very recently, we showed that 8 sides are also sufficient for the weighted case [1].

Our Results
In this paper we study the problem of proportional contact representation of planar graphs, with the goal to minimize the complexity of the polygons, the cartographic error, and the unused area. The four main results in our paper are optimal (with respect to complexity) algorithms for proportional contact representations for general planar graphs, outerplanar graphs, and partial 2-trees. We say k-sided polygons are sometimes necessary and always sufficient for representations of a particular class of planar graphs when there is an algorithm to construct a representation for any graph of this class with k-sided polygons and there is at least one example of a graph in this class that requires a (non-degenerate) k-sided polygons for any representation. Specifically, we show that: (a) 4-sided polygons are sometimes necessary and always sufficient for a point-contact proportional representation for any planar graph; (b) triangles are necessary and sufficient for point-contact proportional representation of partial 2-trees; (c) trapezoids are sometimes necessary and always sufficient for side-contact proportional representation of partial 2-trees; (d) quadrilaterals (convex 4-sided polygons) are sometimes necessary and always sufficient for hole-free side-contact proportional representation for maximal outerplanar graphs. In Table 1, we summarize the main results. Table 1. The entries in this table correspond to results that are proven this paper, except one marked ( * ), which is trivial to see since any polygon with area > 0 requires at least three sides, and another marked ( * * ), which follows from [10]

Preliminaries
In a point-contact representation of a planar graph G = (V, E), we construct a set P of closed simple interior-disjoint polygons with an isomorphism P : V → P where for any two vertices u, v ∈ V , the boundaries of P(u) and P(v) touch at a contact point if and only if (u, v) is an edge. A side-contact representation of a planar graph is defined analogously, where instead of a contact point, we have a contact side between P(u) and P(v), which is a non-degenerate line segment in the boundary of both. Let Γ be a contact (point-contact or side-contact) representation of G. Then each interior face of G corresponds to a bounded hole (possibly empty) in Γ and the exterior face of G corresponds to the unbounded hole in Γ .
In the weighted version of the problem, the input also includes a weight function w : V (G) → R + that assigns a positive weight to each vertex of G. We say that G admits a proportional contact representation with the weight function w if there is a contact representation of G where the area of the polygon for each vertex v of G is proportional to its weight w(v). We define the complexity of a polygonal region as the number of sides it has. In this paper, we also consider a polygon with less than k sides to be a (degenerate) k-sided polygon for convenience.
A plane graph is a planar graph with a fixed embedding. A plane graph is fully triangulated or maximally planar if all its faces including the outerface are triangles. Both the concept of "canonical order" [6] and "Schnyder realizer" [18] are defined for fully triangulated plane graphs in the context of straight-line drawings of planar graphs on an integer grid. We briefly review the two concepts below: Let G = (V, E) be a fully triangulated plane graph with outerface u, v, w in clockwise order. Then G has a canonical order of the vertices v 1 = u, v 2 = v, v 3 , . . ., v n = w, |V | = n, which satisfies for every 4 ≤ i ≤ n: A Schnyder realizer of a fully triangulated graph G is a partition of the interior edges of G into three sets T 1 , T 2 and T 3 of directed edges such that for each interior vertex v, the following conditions hold: v has out-degree exactly one in each of T 1 , T 2 and T 3 , -the counterclockwise order of the edges incident to v is: entering The first condition implies that each T i , i = 1, 2, 3 defines a tree rooted at exactly one exterior vertex and containing all the interior vertices such that the edges are directed towards the root. The following well-known lemma (for example, see [5]) shows a profound connection between canonical orders and Schnyder realizers.

Lemma 1.
Let G be a fully triangulated plane graph. Then a canonical order of the vertices of G defines a Schnyder realizer of G, where the outgoing edges of a vertex v are to its first and last predecessor (where "first" is w.r.t. the clockwise order around v), and to its highest-numbered successor.

Proportional Point-Contact Representations of Planar Graphs
In this section we show that 4-sided non-convex polygons are sometimes necessary and always sufficient for a proportional contact representation of a planar graph. We first describe an algorithm to obtain proportional point-contact representations of planar graphs using 4-sided non-convex polygons. We then show that there exists a planar graph with a given weight function that does not admit a proportional point-contact representation with convex polygons, thus making our 4-sided construction optimal.
Theorem 1. Let G = (V, E) be a planar graph and let w : V → R + be a weight function. Then G admits a proportional point-contact representation with respect to w in which each vertex of V is represented by a 4-sided polygon.
Proof. We prove this claim constructively, showing how to generate a proportional contact representation of G with respect to w. We first take a planar embedding of G and assume that it is fully triangulated, for if it is not, we can add dummy vertices to make it so, and later remove those dummy vertices from the obtained proportional contact representation. Assume after possible scaling that w(v) ≤ 1/n 2 for all v ∈ V and fix an arbitrary outer-face. We construct the drawing incrementally, following a canonical ordering v 1 , . . . , v n . We prescribe what the polygon assigned to j looks like before even placing it (here and in the rest of the paper we use j as a shorthand for v j ). So let T 1 , T 2 , T 3 be the Schnyder realizer defined by the canonical ordering, where T 1 is rooted at 1, T 2 is rooted at 2 and T 3 is rooted at n; see Fig. 2 is the tree T 2 with the direction of all its edges reversed. For every vertex j = n, let π(j) be the index of j in a topological order of this graph. Then n ≥ π(Φ 1 (j)) > π(j) > π(Φ 2 (j)) ≥ 1. Now for every vertex j = 1, 2, n, we define the spike S(j) to be a 4-sided polygon with one reflex vertex. One segment (the base) is horizontal with y-coordinate j. Its length will be determined later, but it will always be at least 2/n 2 ≥ 2w(j). From the left endpoint of the base, the spike continues with the upward segment, which has slope π(j) and up to its tip which has y-coordinate y = Φ 3 (j). Next comes the downward segment until the reflex vertex, and from there to the right endpoint of the base; see Fig. 3(a). The placement of the reflex vertex is arbitrary, as long as the resulting shape has area w(j) and the down-segment has positive slope. Note that since the base has length ≥ 2w(j) and y-coordinate j, the reflex vertex will have y-coordinate at most j + 1. We first place 1, 2, n, and then add 3, . . . , n − 1 (in this order): -Vertex 1 is represented by a triangle S(1) whose base has length 2w(1)/(n − 1), placed arbitrarily with y-coordinate 1. The tip of S(1) has y-coordinate n. -Vertex 2 is represented by a triangle S(2) whose base has length 2w(2)/(n − 2), placed at y-coordinate 2 and with its left endpoint abutting S(1). The tip of S(2) has y-coordinate n. -Vertex n is represented by a triangle whose base is at y-coordinate n and long enough to cover the tips of S(1) and S (2). We choose the height of S(n) such that the area is correct. We maintain the following invariant: For j ≥ 2, after vertex j has been placed, the horizontal line with y-coordinate j + 1 intersects only the spikes of the vertices on the outer-face of G j , and in the order in which they occur on the outer-face.
To place j ≥ 3, we place the base of S(j) with y-coordinate j, and extend it from the down-segment of Φ 1 (j) to the up-segment of Φ 2 (j). Recall that Φ 2 (j) and Φ 1 (j) are exactly the first and last predecessor of j, and j = Φ 3 (i) for all other predecessors i = j. Hence S(j) touches S(Φ 1 (j)) and S(Φ 2 (j)) at the ends of the base, and all other predecessors i of j have their tips at the base. So this creates a contact between j and all its predecessors. The rest of S(j) is then as described above. It is easy to verify the invariant, and therefore S(j) does not intersect any other spikes. To see that the base of S(j) is long enough, let p and p r be its left and right endpoints, and s and s r be the other segments containing them. Imagine that we extend s and s r until they meet in a point p. Since s r contains a point with y-coordinate ≤ j − 1 (at the base of S(Φ 2 (j))), triangle Δ{p, p , p r } has height h ≥ 1; see Fig. 3.
Let t = π(v j ) be the slope of the up-segment of S(v j ). Since π(Φ 2 (v j )) < π(v j ) = t, we have that s r has slope at most t − 1 and x(p r ) ≥ x(p) + h t−1 . On the other hand, the slope of s is positive by construction, and must exceed the slope of the up-segment of Φ 1 (v j ), which has slope π(Φ 1 (v j )) > π(v j ) = t. So s has slope ≥ t + 1 and where the last inequality holds since weights are small enough. Therefore the base of S(j) is wide enough, which ends the proof of the theorem.
Our construction used non-convex shapes. This is sometimes required.

Sketch of proof:
We aim to show that the graph in Figure 4 has no proportional representation with convex polygons if the small vertices have weight δ and the larger vertices have weight D > 3δ. Assume for contradiction that we had such a representation; by symmetry we may assume that d is in the outer-face. For i = 0, 1, 2, let p i be a point of contact between P(a i ) and P(a i+1 ) (where addition is modulo 3.) Further, let q i be a point of contact between P(a i ) and P(b). Define T 0 to be the triangle Δ{p 0 , p 1 , p 2 } and T 2 to be the triangle Δ{q 0 , q 1 , q 2 }. We will only consider the case where T 2 is circumscribed by T 0 (i.e., q 0 , q 1 , q 2 lie on three different sides of T 0 ); the other case is more intricate and requires defining and analyzing a third triangle T 1 (details can be found in [2].) By convexity, the three sides of T 0 lie inside P (a 0 ), P (a 1 ) and P (a 2 ), respectively. In particular, all of P (c 0 ), P (c 1 ), P (c 2 ) are inside T 0 . On the other hand, by convexity all side of T 2 lies inside P (b), so all of P (c 0 ), P (c 1 ), P (c 2 ) are outside T 2 . But the region between T 0 and T 2 consists of three triangles, and to maintain the planar embedding each of P (c 0 ), P (c 1 ), P (c 2 ) must be in one of these triangles. So now we have a triangle T 2 of area at most δ that is circumscribed by a triangle T 0 such that the three triangles of T 0 − T 2 each have area at least Δ > δ. This is impossible by a very old result from geometry; see e.g. [7]. Lemma 2 implies that 3-sided polygons are not always sufficient for proportional contact representations of planar graphs. On the other hand, Theorem 1 implies that any planar graph has a proportional contact representation with any given weight function on the vertices so that each of the vertices is represented by a non-convex 4-sided polygon. Summarizing these two results we have the following theorem.

Subclasses of Planar Graphs with Convex-Shape Representations
In this section we address the problem of proportional contact representations for subclasses of planar graphs. The lower bound in Lemma 2 shows that for planar triangulations, the complexity in any proportional contact representation must be at least 4 and the polygons must be non-convex. We hence focus on planar graphs with fewer edges. In the next subsection we deal with proportional contact representations using triangles (or convex quadrilaterals for side-contacts.) Then we describe an algorithm for hole-free representation of maximal outerplanar graphs.  Proof. Let (v) be the line segment that represents v. We assume that ε is small enough such that "off-setting" any (v) by distance √ ε/2 preserves adjacencies and does not create intersections. Here, off-setting (v) means moving it in parallel while shortening/lengthening it so that it still touches the segments at its ends. We also assume (after possible scaling) that || (v)|| ≥ 2w(v)/ √ ε + √ ε for all vertices v. For any vertex v, create two copies of (v) that are off-set in parallel in both directions so that the trapezoid T (v) between the two off-set lines has area w(v). By the assumption on || (v)||, this will require an off-set of les than √ ε/2, hence adjacencies are preserved. This yields a proportional side-contact representation, except that T (u) and T (v) intersect for any edge (u, v).
To remove these unwanted intersections, let (u, v) be an edge, and assume that in the 2-segment representation, (u) ended at an interior point of (v). We then "retract" T (u), i.e., we replace it by T (u)−T (v). It remains to show that this does not disturb the area too much. Note that T (u) ∩ T (v) is a parallelogram, defined by (v) and one offset line of (v), as well as the two off-set lines of (u), where the pairs of parallel lines have distance less than √ ε/2 and √ ε, respectively. Therefore, the area of T (u) ∩ T (v) is less than ε/2, and we remove such an area at each end of T (u). Thus, the area of the retracted trapezoid is more than w(u) − ε, as desired.
It is natural to ask for a characterization of 2-segment graphs. Thomassen gave one (Theorem 4) at Graph Drawing 1993 but never published his proof.

Theorem 4. A planar graph G = (V, E) is a 2-segment graph if and only if
is the set of edges with both ends in W .
We provide a new proof of Theorem 4 based on rigidity theory in [2]. The condition stated in the theorem can efficiently be checked, for example Lee and Streinu [17] provide a simple algorithm. (In contrast, Hliněný [14] showed that the recognition of general contact graphs of segments is NP-complete.) So 2-segment graphs can be easily recognized.
However, the representations we gave for 2-segment graphs have a small cartographic order, which seems unavoidable if the incidences endpoints of segments to the other segments are circular, as for example for vertices {5, 6, 7} in Fig. 5. This error can be avoided if G is 2-shellable, which means that it is planar has a vertex order v 1 , . . . , v n such that for i ≥ 3 vertex v i has at most two neighbors in v 1 , . . . , v i−1 . Such graphs have at most 2n − 3 edges, hence by Theorem 4 a 2-shellable graph is a 2-segment graph. Moreover, it is easy to see that we may assume that the endpoints of segment (v) are adjacent to the predecessors of v for all vertices v. We can then create a proportional side-contact representation as above but without cartographic error by creating trapezoids in this vertex order. For each vertex v i , first shorten (v i ) so that it ends at the off-set lines of v i 's predecessors. Then off-set (v i ) so that the resulting trapezoid has area w(v i ). It is easy to verify that all off-sets are still at most √ ε/2, and thus the adjacencies are preserved. We derive two corollaries from Theorem 3 and 5. First, it is known that planar bipartite graphs are 2-segment graphs (we can even restrict the segments to be horizontal or vertical) [12]. Hence they have proportional side-contact representations with arbitrarily small cartographic error with trapezoids (in fact, rectangles.) Second, a 2-tree is either an edge or a graph G with a vertex v of degree two in G such that G − v is a 2-tree and the neighbors of v are adjacent. A partial 2-tree is a subgraph of a 2-tree; partial 2-trees are the same as series-parallel graphs. Every partial 2-tree is planar. Directly from the definition we see that 2-trees (and hence partial 2-trees) are also 2-shellable. Therefore they have a proportional side-contact representation with trapezoids. We also show that 4 sides are sometimes required. Theorem 6. Four-sided convex polygons are always sufficient and sometimes necessary for a proportional side-contact representation of a 2-shellable graph, in particular of a partial 2-tree, with a given weight function.
Proof. Sufficiency follows from Theorem 5, since partial 2-trees are 2-shellable. To establish necessity, consider the 2-tree obtained from K 2,4 by adding an edge between the vertices of the partition of size two. These two vertices have four common neighbors, but as was proved in [10], in any side-contact representation with triangles, any pair of adjacent vertices has at most three common neighbors. Hence this graph has no sidecontact representation with triangles, let alone one that respects the weights.
Note that if we switch from side-contact representations to point-contact representations, we can reduce the complexity of the regions from four to three. Specifically, we can replace line-segments by triangles so that only one endpoint of (v) is moved (in both directions). Using a similar approach as that in Theorem 3 we can prove:

Maximal Outerplanar Graphs
In this section, we study maximal outerplanar graphs, i.e., planar graphs whose outerface is a cycle and all interior faces are triangles. These are 2-trees, so the results from the previous subsection apply, but (using a different construction) we can construct a side-contact representation using triangles that has no holes.
Let G be a maximal outerplanar graph. For any two vertices u, v denote by G(u, v) the graph induced by the vertices that are between u to v (ends excluded) while walking along the outer-face in counterclockwise order, and let w (G(u, v)) be the sum of the weights of all these vertices.
Define an aligned triangle to be one with horizontal base and tip below the base. This naturally defines a left and right side of the triangle. We will use the observation that an outerplanar graph can be represented inside any aligned triangle of suitable area. Proof. We proceed by induction on the number of vertices in G. In the base case, G is a 3-cycle {u, v, x}. Use T itself to represent x; this satisfies all conditions.
In the inductive step, let x be the unique common neighbor of u and v. Divide T with a segment s from the tip to the base such that the region T left of s has area w(G(x, u)) + 1 2 w(x), and the region T r right of has area w(G(v, x)) + 1 2 w(x). Cut off triangles of area 1 2 w(x) each from the tips of T and T r ; the combination of these two triangles forms a convex quadrilateral of area w(x) which we use for x; see Fig. 6.
Recursively place G(x, u) and G(v, x) (if non-empty) in the remaining triangles of T ; it is easy to verify that these have the correct area, which yields the desired side-contact representation. We now show that the representation obtained by this algorithm is also optimal for a maximal outerplanar graph with respect to complexity. To do this we use the snowflake graph S, which is the general name given to an infinite family of outerplanar graphs obtained from a triangle by repeatedly walking around the outer-face and adding a vertex of degree 2 at each edge; each complete walk around the boundary gives a new snowflake graph; see Fig. 7(a).

Lemma 4.
A snowflake graph S has no hole-free side-contact representation with triangles that all have the same area.
Sketch of Proof (a detailed proof is given in [2].) Assume for contradiction that there is such a representation Γ . Let the i-th level vertices be those added when we walk around the outer-face for the i-th time. One can observe that all the angles in the outer-boundary of Γ i are concave but for at most four convex corners. Then between any two consecutive convex corners, the triangles corresponding to the (i + 1)-th level vertices are inserted in concave corners.
Since the number of vertices doubles on each level, for sufficiently large i there must be a triangle T on the i-th level and its adjacent triangles T and T on (i+1)-th level such that the base of T (the side that was exposed after adding T ) has length greater than both the bases of T and T . Since all triangles have equal area, a simple calculation involving adjacent angles shows that this is a contradiction; see Fig. 7(b).
By Corollary 1 and Lemma 4, we have the following theorem. Theorem 8. Convex quadrilaterals are always sufficient and sometimes necessary for hole-free proportional side-contact representations of maximal outerplanar graphs.

Conclusion and Open Problems
We described several constructive algorithm for proportional point-contact and sidecontact representations of planar graphs, outerplanar graphs, and 2-trees. We focused on the complexity of the polygons representing vertices, and provided bounds on this complexity that are tight, for a variety of graph classes and drawing models.
However, many problems still remain open. What is the complexity of side-contact proportional representations of maximal planar graphs? We can achieve 7-sided polygons easily (essentially by cutting the convex corners of the 4-sided spikes), but can we do better? Likewise, what is the complexity for hole-free proportional representations of maximal planar graphs? Here, a bound of 8 is known (and the polygons are orthogonal) [1], but can we do better if polygons need not be orthogonal?