Combinatorial Properties of TriangleFree Rectangle Arrangements and the Squarability Problem
Abstract
We consider arrangements of axisaligned rectangles in the plane. A geometric arrangement specifies the coordinates of all rectangles, while a combinatorial arrangement specifies only the respective intersection type in which each pair of rectangles intersects. First, we investigate combinatorial contact arrangements, i.e., arrangements of interiordisjoint rectangles, with a trianglefree intersection graph. We show that such rectangle arrangements are in bijection with the 4orientations of an underlying planar multigraph and prove that there is a corresponding geometric rectangle contact arrangement. Using this, we give a new proof that every trianglefree planar graph is the contact graph of such an arrangement. Secondly, we introduce the question whether a given rectangle arrangement has a combinatorially equivalent square arrangement. In addition to some necessary conditions and counterexamples, we show that rectangle arrangements pierced by a horizontal line are squarable under certain sufficient conditions.
1 Introduction
We consider arrangements of axisaligned rectangles and squares in the plane. Besides geometric rectangle arrangements, in which all rectangles are given with coordinates, we are also interested in combinatorial rectangle arrangements, i.e., equivalence classes of combinatorially equivalent arrangements. Our contribution is twofold.
In this paper we prove an analogous result, which, roughly speaking, is the following. We consider maximal trianglefree combinatorial rectangle contact arrangements. The corresponding contact graph G is planar with all faces of length 4 or 5. We define an underlying plane multigraph \(\bar{G}\), whose vertex set also includes a vertex for each inner face of the contact graph, and define 4orientations of \(\bar{G}\). Here, every vertex has exactly four outgoing edges, where each outer vertex has two edges ending in the outer face. For a 4orientation we introduce corneredgelabelings of \(\bar{G}\), which are, similar to Schnyder realizers, colorings of the outgoing edges at vertices of \(\bar{G}\) corresponding to rectangles with colors 0, 1, 2, 3 satisfying certain local rules. Each outgoing edge represents a corner of a rectangle and the color specifies which corner it is, see Fig. 2. We then prove that the combinatorial contact arrangements of G are in bijection with the 4orientations of \(\bar{G}\) and the corneredgelabelings of \(\bar{G}\).
Thomassen [12] proved that rectangle contact graphs are precisely the graphs admitting a planar embedding in which no triangle contains a vertex in its interior. We also prove here that for every maximal trianglefree planar graph G, \(\bar{G}\) admits a 4orientation, obtaining a new proof that G is a rectangle contact graph.
Our second result is concerned with the question whether a given geometric rectangle arrangement can be transformed into a combinatorially equivalent square arrangement. The similar question whether a pseudocircle arrangement can be transformed into a combinatorially equivalent circle arrangement has recently been studied by Kang and Müller [6], who showed that the problem is NPhard. We say that a rectangle arrangement can be squared (or is squarable) if an equivalent square arrangement exists. Obviously, squares are a very restricted class of rectangles and not every rectangle arrangement can be squared. The natural open question is to characterize the squarable rectangle arrangements and to answer the complexity status of the corresponding decision problem. As a first step towards solving these questions, we show, on the one hand, some general necessary conditions and, on the other hand, sufficient conditions implying that certain subclasses of rectangle arrangements are always squarable.
Related Work. Intersection graphs and contact graphs of axisaligned rectangles or squares in the plane are a popular, almost classic, topic in discrete mathematics and theoretical computer science with lots of applications in computational geometry, graph drawing and VLSI chip design. Most of the research for rectangle intersection graphs concerns their recognition [14], colorability [1] or the design of efficient algorithms such as for finding maximum cliques [5]. On the other hand, rectangle contact graphs are mainly investigated for their combinatorial and structural properties. Almost all the research here concerns edgemaximal 3connected rectangle contact graphs, so called rectangular duals. These can be characterized by the absence of separating triangles [9, 13] and the corresponding representations by touching rectangles can be seen as dissections of a rectangle into rectangles. Combinatorially equivalent dissections are in bijection with regular edge labelings [7] and transversal structures [4]. The question whether a rectangular dual has a rectangle dissection in which all rectangles are squares has been investigated by Felsner [2].
2 Preliminaries
Two rectangle arrangements \(\mathcal {R}_1\) and \(\mathcal {R}_2\) are combinatorially equivalent if \(\mathcal {R}_1\) can be continuously deformed into \(\mathcal {R}_2\) such that every intermediate state is a rectangle arrangement with the same intersection or contact type for every pair of rectangles. An equivalence class of combinatorially equivalent arrangements is called a combinatorial rectangle arrangement. So while a geometric arrangement specifies the coordinates of all rectangles, think of a combinatorial arrangement as specifying only the way in which any two rectangles touch or intersect. In particular, a combinatorial rectangle arrangement is defined by (1) for each rectangle R and each side of R the counterclockwise order of all intersecting (touching) rectangle edges, labeled by their rectangle \(R'\) and the respective side of \(R'\) (top, bottom, left, right), (2) for containments the respective component of the arrangement, in which a rectangle is contained.
In the intersection graph of a rectangle arrangement there is one vertex for each rectangle and two vertices are adjacent if and only if the corresponding rectangles intersect. As combinatorially equivalent arrangements have the same intersection graph, combinatorial arrangements themselves have a welldefined intersection graph. For rectangle contact arrangements (combinatorial or geometric) the intersection graph is also called the contact graph. Note that such contact graphs are planar, as we excluded the case of four rectangles meeting in a corner.
3 Statement of Results
3.1 Maximal TriangleFree Planar Graphs and Rectangle Contact Arrangements

The closure \(\bar{G}\) of G is derived from G by replacing each edge of G with a pair of parallel edges, called an edge pair, and adding into each inner face f of G a new vertex, also denoted by f, connected by an edge, called a loose edge, to each vertex incident to that face. At each outer vertex we add two loose edges pointing into the outer face, although we do not add a vertex for the outer face. Note that \(\bar{G}\) inherits a unique plane embedding with each inner face being a triangle or a 2gon.

A 4orientation of \(\bar{G}\) is an orientation of the edges and halfedges of \(\bar{G}\) such that every vertex has outdegree exactly 4. An edge pair is called unidirected if it is oriented consistently and bidirected otherwise.
 A corneredgelabeling of \(\bar{G}\) is a 4orientation of \(\bar{G}\) together with a coloring of the outgoing edges of \(\bar{G}\) at each vertex of G with colors 0, 1, 2, 3 (see Fig. 4) such that
 (i)
around each vertex v of G we have outgoing edges in color 0, 1, 2, 3 in this counterclockwise order and
 (ii)
in the wedge, called incoming wedge, at v counterclockwise between the outgoing edges of color i and \(i+1\) there are some (possibly none) incoming edges colored \(i+2\) or \(i+3\), \(i=0,1,2,3\), all indices modulo 4.
 (i)
Theorem 1

the combinatorial rectangle contact arrangements of G

the corneredgelabelings of \(\bar{G}\)

the 4orientations of \(\bar{G}\).
Using the bijection between 4orientations of \(\bar{G}\) and combinatorial rectangle contact arrangements of G given in Theorem 1, we can give a new proof that every MTPgraph G is a rectangle contact graph, which is the statement of the next theorem; its proof is given in the full paper [8] and sketched in Sect. 5.
Theorem 2
For every MTPgraph G, \(\bar{G}\) has a 4orientation and it can be computed in linear time. In particular, G has a rectangle contact arrangement.
We remark that our technique in the proof of Theorem 1 constructs from a given 4orientation of \(\bar{G}\) in linear time a geometric rectangle contact arrangement of G in the \(2n \times 2n\) square grid, where n is the number of vertices in G. Thus also the rectangle contact arrangement in Theorem 2 can be computed in linear time and uses only a linearsize grid.
3.2 Squarability and LinePierced Rectangle Arrangements
In the squarability problem, we are given a rectangle arrangement \(\mathcal {R}\) and want to decide whether \(\mathcal {R}\) can be squared. The first observation is that there are obvious obstructions to the squarability of a rectangle arrangement. If any two rectangles in \(\mathcal {R}\) are crossing (see Fig. 3) then there are obviously no two combinatorially equivalent squares.
Proposition 1
Some crossfree rectangle arrangements are unsquarable, even if the intersection graph is a path.
Therefore we focus on a nontrivial subclass of rectangle arrangements that we call linepierced. A rectangle arrangement \(\mathcal {R}\) is linepierced if there exists a horizontal line \(\ell \) such that \(\ell \cap R \ne \emptyset \) for all \(R \in \mathcal {R}\). The linepiercing strongly restricts the possible vertical positions of the rectangles in \(\mathcal {R}\), which lets us prove two sufficient conditions for squarability in the following theorem.
Theorem 3
Let \(\mathcal {R}\) be a crossfree, linepierced rectangle arrangement.

If \(\mathcal {R}\) is trianglefree, then \(\mathcal {R}\) is squarable.

If \(\mathcal {R}\) has only corner intersections, then \(\mathcal {R}\) is squarable, even using linepierced unit squares.
On the other hand, crossfree, linepierced rectangle arrangements in general may have forbidden cycles or other geometric obstructions to squarability. We give two examples in Sect. 6, together with a sketch of the proof of Theorem 3.
4 Bijections Between 4Orientations, CornerEdgeLabelings and Rectangle Contact Arrangements – Proof of Theorem 1
Omitted proofs are provided in the full version of this paper [8].
4.1 From Rectangle Arrangements to 4Orientations
Lemma 1
Every rectangle contact arrangement of G induces a 4orientation of \(\bar{G}\).
The proof idea is already given in Fig. 2: For every rectangle draw an outgoing edge through each of the four corners and for every inner face draw an outgoing edge through each of the four extremal sides.
We continue with a crucial property of 4orientations. For a simple cycle C of G, consider the corresponding cycle \(\bar{C}\) of edge pairs in \(\bar{G}\). The interior of \(\bar{C}\) is the bounded component of \(\mathbb {R}^2\) incident to all vertices in C after the removal of all vertices and edges of \(\bar{C}\). In a fixed 4orientation of \(\bar{G}\) a directed edge \(e=(u,v)\) points inside C if \(u \in V(C)\) and e lies in the interior of \(\bar{C}\), i.e., either v lies in the interior of C, or e is a chord of \(\bar{C}\) in the interior of \(\bar{C}\).
Lemma 2
For every 4orientation of \(\bar{G}\) and every simple cycle C of G the number of edges pointing inside C is exactly \(V(C)4\).
4.2 From 4Orientations to CornerEdgeLabelings
Next we shall show how a 4orientation of \(\bar{G}\) can be augmented (by choosing colors for the edges) into a corneredgelabeling. Fix a 4orientation. If e is a directed edge in an edge pair, then e is called a left edge, respectively right edge, when the 2gon enclosed by the edge pair lies on the right, respectively on the left, when going along e in its direction. Thus, a unidirected edge pair consists of one left edge and one right edge, while a bidirected edge pair either consists of two left edges (clockwise oriented 2gon) or two right edges (counterclockwise oriented 2gon).
Note that \(e' = {{\mathrm{succ}}}(e)\) may be a loose edge in \(\bar{G}\) at the concave vertex for some 5face in G. For the sake of shorter proofs below, we shall avoid the treatment of this case. To do so, we augment G to a supergraph \(G'\) such that starting with any edge in any edge pair and repeatedly taking the successor, we never run into a loose edge pointing to an inner face.
The graph \(G'\) is formally obtained from G by stacking a new vertex w into each 5face f, with an edge to the incoming neighbor v of f in \(\bar{G}\) and the vertex u at f that comes second after v in the clockwise order around f in \(\bar{G}\). (Indeed, the second vertex in counterclockwise order would be equally good for our purposes.) Let \(f_1\) and \(f_2\) be the resulting 4face and 5face incident to w, respectively. We obtain a 4orientation of the closure \(\bar{G'}\) of \(G'\) by orienting all edges at \(f_1\) as outgoing, both edges between v and w as right edges (counterclockwise), the remaining three edges at w as outgoing, and the remaining four edges at \(f_2\) as outgoing. See Fig. 7 (left) for an illustration.
Before we augment the 4orientation of \(\bar{G'}\) into a corneredgelabeling, we need one last observation. Let e and \({{\mathrm{succ}}}(e)\) be two edges in edge pairs of \(\bar{G'}\) with common vertex v. Consider the wedges at v between e and \({{\mathrm{succ}}}(e)\) when going clockwise (left wedge) and counterclockwise (right wedge) around v. Each of e, \({{\mathrm{succ}}}(e)\) can be a left edge or right edge, and in a unidirected pair or a bidirected pair. This gives us four types of edges and 16 possibilities for the types of e and \( {{\mathrm{succ}}}(e)\). The graph H in Fig. 6(a) shows for each of these 16 possibilities the number of outgoing edges at v in the left and right wedge at v.
Observation 4
Proof
It suffices to check each directed cycle on k edges, \(k=1,2,3,4\). \(\square \)
Lemma 3
Every 4orientation of \(\bar{G}\) induces a corneredgelabeling of \(\bar{G}\).
A detailed proof of Lemma 3 is given in the full version of this paper [8].
Proof (Sketch)
Consider the augmented graph \(G'\), its closure \(\bar{G'}\) and 4orientation as defined above. For any edge e in an edge pair in \(\bar{G'}\) (and hence every edge of \(\bar{G}\) outgoing at some vertex of G) consider the directed walk \(W_e\) in \(\bar{G'}\) starting with e by repeatedly taking the successor as long as it exists (namely the current edge is in an edge pair).
First we show that \(W_e\) is a simple path ending at one of the eight loose edges in the outer face. Indeed, otherwise \(W_e\) would contain a simple cycle C where every edge on C, except the first, is the successor of its preceding edge on C. From the graph H of Fig. 6(a) we see that every wedge of C contains at most two outgoing edges. With Observation 4 the number of edges pointing inside C is at least \(V(C)2\) and at most \(V(C)+2\), which is a contradiction to Lemma 2.
Now let \(v_0,v_1,v_2,v_3\) be the outer vertices in this counterclockwise order. Define the color of e to be i if \(W_e\) ends with the right loose edge at \(v_i\) or the left loose edge at \(v_{i1}\), indices modulo 4. By definition every edge has the same color as its successor in \(\bar{G'}\) (if it exists). Thus this coloring is a corneredgelabeling of \(\bar{G'}\) if at every vertex v of G the four outgoing edges are colored 0, 1, 2, and 3, in this counterclockwise order around v.
Claim
Let \(e_1,e_2\) be two outgoing edges at v for which \(W_{e_1} \cap W_{e_2}\) consists of more than just v. Then \(e_1\) and \(e_2\) appear consecutively among the outgoing edges around v, say \(e_1\) clockwise after \(e_2\).
Moreover, if \(u \ne v\) is a vertex in \(W_{e_1}\cap W_{e_2}\) for which the subpaths \(W_1\) of \(W_{e_1}\) and \(W_2\) of \(W_{e_2}\) between v and u do not share inner vertices, then the last edge \(e'_1\) of \(W_1\) is a right edge and the last edge \(e'_2\) of \(W_2\) is a left edge, \(e'_1\) and \(e'_2\) are part of (possibly the same) unidirected pairs and these pairs sit in the same incoming wedge at u.
To prove this claim, we consider the cycle \(C = W_1 \cup W_2\), count the edges pointing inside with the graph H and conclude that neither u nor v may have edges pointing inside C. See Fig. 7 (right) for an illustration.
The claim implies that the two walks \(W_{e_1}\) and \(W_{e_2}\) can neither cross, nor have an edge in common. Considering the four walks starting in a given vertex, we can argue (with the second part of the claim) that our coloring is a corneredgelabeling of \(\bar{G'}\). Finally, we inherit a corneredgelabeling of \(\bar{G}\) by reverting the stacking of artificial vertices in 5faces. \(\square \)
4.3 From CornerEdgeLabelings to Rectangle Contact Arrangements
It remains to compute a rectangle arrangement of G based on a given corneredgelabeling of \(\bar{G}\). That is, we shall prove the following lemma.
Lemma 4
Every corneredgelabeling of \(\bar{G}\) induces a rectangle contact arrangement of G.
A detailed proof of Lemma 4 is given in the full version of this paper [8].
Proof (Sketch)
Fix a corneredgelabeling of \(\bar{G}\). For every vertex v of G we introduce two pairs of variables \(x_1(v),x_2(v)\) and \(y_1(v),y_2(v)\) and set up a system of inequalities and equalities such that any solution defines a rectangle contact arrangement \(\{R(v) \mid v \in V\}\) of G with \(R(v) = [x_1(v),x_2(v)] \times [y_1(v),y_2(v)]\), which is compatible with the given corneredgelabeling.
Constraints encoding the type of contact between R(v) and R(w), defined based on the orientation and color(s) of the edge pair between v and w in \(\bar{G}\).

Instead of showing that the system in Table 1 has a solution, we define another set of constraints implying all constraints in Table 1, for which it is easier to prove feasibility.
We associate the system \(\mathcal {I}_x\) with a partially oriented graph \(I_x\) whose vertex set is \(\{x_1(v), x_2(v) \mid v \in V\}\). For each inequality \(a > b\) we have an oriented edge (a, b) in \(I_x\), while for each equality \(a = b\) we have an undirected edge ab in \(I_x\), see Fig. 8.
We observe that \(I_x\) is planar and prove that \(I_x\) has no cycle C in which all directed edges are oriented consistently, which clearly implies that \(\mathcal {I}_x\) has a solution. This is done by showing that no inner face is such a cycle, and that for every inner vertex u, vertex \(x_1(u)\) has an incident undirected edge or incident outgoing edge and vertex \(x_2(u)\) has an incident undirected edge or incident incoming edge. \(\square \)
5 MTP Graphs Are Rectangle Contact Graphs – Proofsketch of Theorem 2
6 LinePierced Rectangle Arrangements and Squarability – Proofsketch of Theorem 3
Recall that a rectangle arrangement \(\mathcal R\) is linepierced if there is a horizontal line \(\ell \) that intersects every rectangle in \(\mathcal R\). Note that by the linepiercing property of \(\mathcal R\) the intersection graph remains the same if we project each rectangle \(R=[a,b] \times [c,d] \in \mathcal R\) onto the interval \([a,b] \subseteq \mathbb R\). In particular, the intersection graph \(G_{\mathcal R}\) of a linepierced rectangle arrangement \(\mathcal R\) is an interval graph, i.e., intersection graph of intervals on the real line.
Linepierced rectangle arrangements, however, carry more information than onedimensional interval graphs since the vertical positions of intersection points between rectangles do influence the combinatorial properties of the arrangement. We obtain two squarability results for linepierced arrangements in Propositions 2 and 3, which yield Theorem 3.
Proposition 2
Every linepierced, trianglefree, and crossfree rectangle arrangement \(\mathcal R\) is squarable.
Proposition 3
Every linepierced rectangle arrangement \(\mathcal R\) restricted to corner intersections is squarable. There even exists a corresponding squaring with unit squares that remains linepierced.
Propositions 2 and 3 are proved in the full version of this paper [8]. The crucial observation is that the intersection graph of \(\mathcal {R}\) is a caterpillar in the former case (Fig. 11) and a unitinterval graph in the latter case. The results can then be proven by induction on the number of vertices by iteratively removing the “rightmost” rectangle in the representation.
If we drop the restrictions to corner intersections and trianglefree arrangements, we can immediately find unsquarable instances, either by creating cyclic “‘smaller than”’ relations or by introducing intersection patterns that become geometrically infeasible for squares. Two examples are given in Fig. 12.
7 Conclusions
We have introduced corneredgelabelings, a new combinatorial structure similar to Schnyder realizers, which captures the combinatorially equivalent maximal rectangle arrangements with no three rectangles sharing a point. Using this, we gave a new proof that every trianglefree planar graph is a rectangle contact graph. We also introduced the squarability problem, which asks for a given rectangle arrangement whether there is a combinatorially equivalent arrangement using only squares. We provide some forbidden configuration for the squarability of an arrangement and show that certain subclasses of linepierced arrangements are always squarable. It remains open whether the decision problem for general arrangements is NPcomplete.
Surprisingly, every unsquarable arrangement that we know has a crossing or a sidepiercing. Hence we would like to ask whether every rectangle arrangement with only corner intersections is squarable. Another natural question is whether every trianglefree planar graph is a square contact graph.
Footnotes
 1.
Other configurations of the outer four rectangles can be easily derived from this.
References
 1.Asplund, E., Grünbaum, B.: On a coloring problem. Mathematica Scandinavica 8, 181–188 (1960)MathSciNetzbMATHGoogle Scholar
 2.Felsner, S.: Rectangle and square representations of planar graphs. In: Pach, J. (ed.) Thirty Essays in Geometric Graph Theory, pp. 213–248. Springer, New York (2012)Google Scholar
 3.de Fraysseix, H., de Mendez, P.O., Rosenstiehl, P.: On triangle contact graphs. Comb. Probab. Comput. 3, 233–246 (1994)CrossRefzbMATHGoogle Scholar
 4.Fusy, E.: Transversal structures on triangulations: a combinatorial study and straightline drawings. Discrete Math. 309(7), 1870–1894 (2009)MathSciNetCrossRefzbMATHGoogle Scholar
 5.Imai, H., Asano, T.: Finding the connected components and a maximum clique of an intersection graph of rectangles in the plane. J. Algorithms 4(4), 310–323 (1983)MathSciNetCrossRefzbMATHGoogle Scholar
 6.Kang, R.J., Müller, T.: Arrangements of pseudocircles and circles. Discrete Comput. Geom. 51, 896–925 (2014)MathSciNetCrossRefzbMATHGoogle Scholar
 7.Kant, G., He, X.: Regular edge labeling of \(4\)connected plane graphs and its applications in graph drawing problems. Theor. Comput. Sci. 172(1–2), 175–193 (1997)MathSciNetCrossRefzbMATHGoogle Scholar
 8.Klawitter, J., Nöllenburg, M., Ueckerdt, T.: Combinatorial properties of trianglefree rectangle arrangements and the squarability problem. CoRR, arXiv:1509.00835, September 2015
 9.Koźmiński, K., Kinnen, E.: Rectangular duals of planar graphs. Networks 15, 145–157 (1985)MathSciNetCrossRefzbMATHGoogle Scholar
 10.Schnyder, W.: Planar graphs and poset dimension. Order 5(4), 323–343 (1989)MathSciNetCrossRefzbMATHGoogle Scholar
 11.Schnyder, W.: Embedding planar graphs on the grid. In: 1st ACMSIAM Symposium on Discrete Algorithms, SODA 1990, pp. 138–148 (1990)Google Scholar
 12.Thomassen, C.: Interval representations of planar graphs. J. Comb. Theor. Ser. B 40(1), 9–20 (1986)MathSciNetCrossRefzbMATHGoogle Scholar
 13.Ungar, P.: On diagrams representing graphs. J. London Math. Soc. 28, 336–342 (1953)MathSciNetCrossRefzbMATHGoogle Scholar
 14.Yannakakis, M.: The complexity of the partial order dimension problem. SIAM J. Algebraic Discrete Methods 3(3), 351–358 (1982)MathSciNetCrossRefzbMATHGoogle Scholar