1. Introduction
Given an axis-aligned rectangle R, a rectangulation of R is a decomposition of R into finitely many interior-disjoint rectangles, say rooms, such that each vertex is shared by at most three rooms.
The study of these combinatorial structures is a challenge in the realm of theoretical computer science (mainly concerning algorithms and formal language theory), discrete mathematics (with a special focus on permutations), and discrete geometry (modeling them by graphs and hypergraphs). Indeed, these structures have an abundance of practical applications in fields such as architecture (i.e., in defining room placements in floors according to adjacency constraints or to preserve simple and fast escape routes), geography (i.e., in visualizing statistical data where region size correlates to a specific variable, such as population, total value of goods and services, or election results), and VLSI design and electrical networks (i.e., in circuit partitioning that constitutes the first step of the back-end physical design flow and consists of dividing a flat and large circuit into more manageable partitions under connectivity constraints), as shown, for example, by van Kreveld [
1], Otten [
2], Bondy and Murty [
3], and Kimura et al. [
4].
Among the earliest contributions on this topic, one finds two papers by Abe [
5,
6] from the early 1930s, and the paper by Brooks et al. [
7] on “squaring the square”. One possible way to deal with these structures as combinatorial objects is by defining an equivalence relation on them.
In particular, we will define the strong equivalence that preserves rectangle–rectangle adjacencies. According to that relation, two rectangulations are strongly equivalent if one can be obtained from the other by a sequence of horizontal or vertical side shifting, and accordingly extending or shortening the neighbors, so that the adjacencies between rectangles are preserved.
Equivalence classes defined through strong equivalence are also known as floorplans.
Nakano et al. [
8,
9] introduced an intriguing perspective: they defined an algorithm capable of generating all the feasible floorplans (with
rooms) according to a provided set of
n locations (or points), which determine the positions and the horizontal or vertical directions of the walls passing through them, say an
h-type or
v-type point, respectively. Note that, for this representation, each wall must pass by exactly one point. Following this approach, we can consider a set
P of
n integer points in the interior of a rectangle
R that act as constraints on the positions of the walls of a feasible floorplan on
R.
A natural representation of such a constraint set P is via a permutation matrix called (-)pattern matrix.
In this work, we apply the model studied in [
8] to investigate various subclasses of floorplans. Specifically, we seek to characterize relevant classes
of floorplans by the avoidance of a prescribed set of forbidden patterns in their pattern matrices to shed some light on their combinatorial properties.
This paper is organized as follows:
Section 2 provides the preliminary definitions and notations, which sets the groundwork for the comprehension of this work.
In
Section 3, we investigate the class of guillotine floorplans, widely studied in the literature [
10], and prove that, given a pattern matrix
P, it generates only guillotine floorplans (and is hence called a
guillotine set) if and only if every sub-pattern of
P of size four, consisting of two
h-type and two
v-type points, belongs to the family of patterns listed in Theorem 1. Equivalently, this condition can be stated dually by requiring the avoidance of all other patterns of size four.
In
Section 4, we specialize this study to the class of diagonal–guillotine floorplans and we prove an analogous result. We believe that this type of characterization can be extended to many other families of floorplans known in the literature. In
Section 5, we support the idea proposing the investigation of Catalan floorplans. Then, we conclude this paper by presenting a final long-term research project.
2. Preliminary Definitions and Notations
Let
R be an axis-aligned rectangle in the integer lattice
and
n a positive integer number. We call a
rectangulation of R a partition
of
R into finitely many interior-disjoint rectangles.
has
size n when it consists of exactly
n interior rectangles. We will often refer to the interior-disjoint rectangles within
R as
rooms, and the line segments that form the boundaries of each room will be called
walls. Following common practice, we will focus on generic rectangulations only; i.e., there is no point where four distinct rooms meet (see
Figure 1).
A way to deal with these structures as combinatorial objects is by defining an equivalence relation on them, say strong equivalence. To reach this goal, we need to introduce left–right and above–below order relations between two rooms r and of a rectangulation . We say that
r is on the left of (equivalently, is on the right of r) if there is a sequence of rooms of , such that the right side of and the left side of lie upon the same segment for ;
r is above (equivalently, is below r) if there is a sequence of rooms of , such that the upper side of and the bottom side of lie in the same segment for .
So, given a room r, the outer rectangle R can be partitioned into four regions (possibly empty), which group the rooms on the left of, on the right of, above, or below r. As a result, the following lemma holds:
Lemma 1. Given a rectangulation of R, every pair of distinct rectangles r and is comparable according to precisely one of the following order relations: either one of them is on the left of the other, or one of them is above the other.
Two rectangulations
of size
n for a rectangle
R are
strongly equivalent if they preserve the left–right and above–below orders and the adjacencies between rectangles (see
Figure 1).
In practice, and can be transformed one into the other by a sequence of horizontal or vertical side shifts—extending or shortening adjacent rectangles as needed—such that all adjacency relations among rectangles remain unchanged.
A floorplan is an equivalence class under the strong-equivalence relation, and is typically represented by one of the rectangulations within that class.
Let be a rectangulation for a rectangle R; a guillotine cut is a vertical wall that extends from the top side to the bottom side of R, or an horizontal wall that extends from the left side to the right side of R. It is worthwhile that if has multiple guillotine cuts, then all of these cuts must be oriented in the same direction.
A rectangulation is guillotine if it either is of size one, or has a guillotine cut s such that both sub-rectangulations separated by s are guillotine.
A
guillotine floorplan is a strong-equivalence class of rectangulations whose elements are all guillotine (see
Figure 2). In the same spirit as the many families of floorplans that have been shown to be in bijection with families of pattern-avoiding permutations, Asinowski et al. [
11] recently established a bijection between guillotine floorplans and two-clumped permutations.
Given a set
P of
n integer points in the internal area of a rectangle
R, we wish to construct a floorplan by partitioning
R into
rooms by
n vertical or horizontal walls, each passing through a point in
P. Following this idea, we could think of those points as acting like constraints on the positions of the walls, according to the model in [
8].
The twist is that each is associated with one and only one of the following types: h-type, v-type, and f-type, or horizontal, vertical, and free types (also called columns), respectively. One can consider each point in P to be the location of a structurally necessary element of a wall that also provides its orientation.
More formally, given P, we define a labeling on its points such that each h-type lies on an horizontal wall and has label H, while each v-type point lies on a vertical wall and has label V. The f-type points may lie on either a horizontal or a vertical wall and have the corresponding label.
In our study, we only consider labeled sets
in which each wall must pass through one and only one point from
P, and where the labeling of the point can be only
h-type or
v-type. To ensure this, without loss of generality and following [
8], we will restrict our attention to sets
P such that no two points in
P have the same
x coordinate and no two points have the same
y coordinate.
Furthermore, from now on, we will omit explicit references to the labeling , assuming that each set P is accompanied by its own labeling.
The floorplan of a rectangulation of R satisfying the conditions of P is called a feasible floorplan of R with respect to P.
A natural way to represent each set
P of constraints for
R is to use a pattern matrix that records the locations of the points as either
H (for
h-type points) or
V (for
v-type points), depending on their rescaled
x and
y coordinates, as shown in
Figure 3.
In order to have a lighter notation, from now on, the zero entries of each pattern matrix will be represented by empty boxes. Additionally, as the figure suggests, it is worth recalling that each pattern matrix, and thus each set
P, usually corresponds to many distinct floorplans. That is the reason why, through the following pages, we will shift our focus to the constraint sets
P rather than the floorplans themselves. We aim to investigate various subclasses of floorplans by applying the model in [
8]. Specifically, it aims to integrate the concept of feasible floorplans with the defining properties of these subclasses, seeking to establish a connection that leads to new characterizations.
3. Feasible Guillotine Floorplans
Given a rectangle R, a set of constraints P is named a guillotine set if each feasible floorplan of R with respect to P is a guillotine floorplan.
Given a rectangulation
, we define a
windmill pattern as a configuration of four walls that forms a specific arrangement resembling one of the two shapes illustrated in
Figure 4. The following result is known in the literature [
11].
Lemma 2. A rectangulation is guillotine if and only if it avoids both the windmill patterns.
A
guillotine set is a set of
h- and
v-type points whose feasible floorplans do not admit any windmill pattern. The goal, at this stage, is to reconsider this property from the perspective introduced by Nakano et al. in [
8,
9]. Specifically, we aim to characterize guillotine sets by examining their relationship with the avoidance of certain pattern matrices, starting from the previous statement.
As a matter of fact, each windmill can be associated with a set of pattern matrices by labeling its walls with the corresponding
H and
V labels in all possible ways (see
Figure 5 for examples).
For brevity, from now on, we will say that if there is a feasible floorplan with respect to a set P that contains a windmill pattern, then the set P itself generates a windmill. Since, in order to generate a windmill, a pattern matrix must contain at least two h-type and two v-type points, we can prove the following:
Theorem 1. A set of four points P, represented by its pattern matrix, is a guillotine set if and only if at least one of the following conditions is satisfied:
- 1.
Both h-type points are either on the first and second or third and fourth columns of the pattern matrix;
- 2.
Both h-type points are either on the first and second or third and fourth rows of the pattern matrix;
- 3.
The pattern matrix associated with P is one of those depicted in Figure 6, where the star indicates any arrangement of an H and a V in that sub-matrix.
Proof. Since the number of permutation matrices with four labeled points is finite, the proof can be obtained by brute force: by exhaustively generating all possible rectangulations and checking the presence of windmills for each of them. However, we wish to point out some evidence for the conditions of the theorem.
Condition 1 follows after observing that two H points in the first and second columns produce two parallel horizontal walls that touch the left border of R, since no V points lie between them, and this is not allowed by a windmill configuration. A similar reasoning can be applied if two H points lie in the last two columns of P. A symmetrical argument holds for condition 2.
Concerning condition 3, we start by considering the first diagonal matrix on the upper row of
Figure 6: since the rightmost vertical wall must hit the bottom side of the rectangle, and the rightmost horizontal wall must hit the right side of the rectangle, a windmill configuration cannot be obtained. The remaining diagonal matrices on the upper row can be proved to be guillotine by a symmetrical argument.
Finally, let us move to the first matrix on the lower row of
Figure 6. Due to their proximity to the left and upper sides of the rectangle, the indicated horizontal and vertical walls must hit the rectangle in its upper leftmost part, thus preventing a windmill configuration. In this case, only these two walls are required to provide the guillotine set. Again, the remaining cases in the same row of
Figure 6 can be treated symmetrically. □
Example 1. Let us consider the following four patterns whose first two columns have the same labeled points:
The first and last patterns are guillotine according conditions 3 and 4 of Theorem 1. On the contrary, the two central patterns do allow windmills. Hereafter, there are three examples of the related rectangulations, while the last rectangulation is only sketched since the absence of a windmill immediately follows:
Now, the idea is to extend Theorem 1 to a generic set P of n points, with , with at least two v-type and two h-type points. We underline that provided a pattern matrix P, each sub-matrix of P is a pattern matrix; i.e., it is a permutation matrix with elements labeled by H and V.
Theorem 2. Let P be a pattern matrix of dimension containing at least two h-type and two v-type points. P generates a windmill if and only if there exists a pattern sub-matrix of dimension four generating it.
Proof. Let P generate a windmill. By definition, there exist exactly four points of P that lie on the four walls of the windmill, say . Let us consider the pattern sub-matrix consisting of the four points only. Their mutual wall intersections in P can be reproduced in producing the windmill configuration again. As a matter of fact, the pattern is one of the patterns not included in the four conditions of Theorem 1.
Let us assume that there exists in P a pattern sub-matrix that generates a windmill. We create a rectangulation of P in a suitable rectangle R as follows: First, place the walls related to the points of in order to reproduce the windmill. By definition, no other points of P lie on these four walls.
Now, the rectangle
R is divided by the walls into five different areas: a central one internal to the windmill, and four disjoint areas including the four corners of
R. Each of the five areas may contain some points of
P that constitute a pattern sub-matrix of
P themselves and that allow a proper rectangulation, as if they were separated rectangles. The five rectangulations can be integrated in
R, thus composing the final one
according to
P. By construction,
contains a windmill, preventing it from being guillotine.
Figure 7 shows an example of the situation. □
We emphasize that the sufficient condition used in the proof of Theorem 2 relies on a composition operator, which we introduce here at an intuitive level, and which merges two rectangulations into a new one. This operator preserves the guillotine property, which can therefore be regarded as an invariant under the composition.
4. Feasible Diagonal–Guillotine Floorplans
The other class of floorplans we aim to investigate is the diagonal–guillotine, i.e., guillotine floorplans which are also diagonal. A diagonal rectangulation is a rectangulation of R such that every room intersects the NW–SE (northwest–southeast) diagonal of R. A diagonal floorplan is a class of rectangulations where at least one element is diagonal.
Figure 8 shows how a diagonal floorplan’s representation is not immediately detectable. Although the NW-SE diagonal of the rectangle on the right does not appear to cross every room of the decomposition, the floorplan is diagonal as it is strongly equivalent to the diagonal rectangulation illustrated on the left.
The goal, as before, is to examine this class through the lens of Nakano et al.’s approach and through the concept of feasibility. Let us begin with some preliminary considerations.
Given a rectangulation
, we define the
left/right pattern and
bottom/top pattern as configurations of three line segments that form a specific arrangement resembling the first and the second shapes illustrated in
Figure 9, respectively.
As for the guillotine case, the following lemma about pattern avoidance in diagonal rectangulations, proven by Cardinal et al. in [
12], holds:
Lemma 3. A rectangulation is diagonal if and only if it avoids both the left/right and the bottom/top patterns.
Without getting into the details, the proof relies on an equivalent representation of rectangulations using twin binary trees, introduced in [
13].
Given R, a pattern P is named a diagonal–guillotine set if each feasible floorplan of R with respect to P is both a diagonal and a guillotine floorplan.
Figure 10 shows examples of diagonal and non-diagonal rectangulations.
Now, following the approach used in
Section 3, we want to relate the characteristics of a pattern to the presence of a specific sub-pattern.
Let us start by considering pattern matrices, i.e., the smallest matrices allowing left/right or bottom/top patterns.
We observe that a left/right brick requires a vertical wall to lie between two horizontal walls. The situation is characterized by the following pattern matrices:
Similarly, the patterns for bottom/top bricks are characterized by the following pattern matrices, as the horizontal wall must lie between two vertical walls:
We proceed in characterizing the four-point patterns that are non-diagonal–guillotine, and then we generalize the results to a generic pattern. So, starting from guillotine patterns, and using Lemma 3, we aim to exclude all patterns that are also non-diagonal. Given a set of points , we say that two of its elements and are ascending points if, in their corresponding sub-pattern matrix, either the row of is lower than the row of and the column of is on the left of the column of or vice-versa. Two ascending points can be visualized as follows:
![Mathematics 14 00310 i005 Mathematics 14 00310 i005]()
Theorem 3. Let P be a set of four points, represented by the corresponding pattern matrix, where two points are h-type and two are v-type. P is a diagonal–guillotine set if and only if at least one of the following statements is true:
- 1.
Both h-type points are positioned
- (a)
Either on the first and second or on the third and fourth columns of the pattern matrix;
- (b)
On a row that does not lie between the rows of two ascending v-type points.
- 2.
Similarly, both v-type points are positioned
- (a)
Either on the first and second or on the third and fourth rows of the pattern matrix;
- (b)
On a column that does not lie between the columns of two ascending h-type points.
- 3.
The pattern matrix associated with P is one of the following:
![Mathematics 14 00310 i006 Mathematics 14 00310 i006]()
Proof. Again, since the number of guillotine pattern matrices with four points is finite, we can proceed by brute force, searching, in each of them, for a possible left/right or bottom/top brick sub-pattern, and remove the matrix when detected. Just to propose a different proof concerning conditions 1 and 2, we underline that the cases allow for the removal from the guillotine patterns characterized by conditions 1 and 2 of Theorem 1 of those where bottom/top and left/right bricks appear, respectively. □
As in
Section 3, a more general result follows.
Theorem 4. Given a rectangle R, let n be greater than 3 and P be a set of n points, represented by its pattern matrix, containing at least two h-type points and two v-type points. P is a diagonal–guillotine set if and only if each sub-pattern matrix of P of size 4, consisting of two h-type and two v-type points, satisfies one among conditions 1, 2, 3, and 4 of Theorem 1.
The proof is similar to that of Theorem 2 and can be easily obtained by considering the presence of not only a windmill in a pattern matrix, but also left/right and bottom/top bricks. This result provides a complete characterization of diagonal–guillotine sets of size n, where n is greater than 3.
5. Conclusions and Perspectives
In this paper, we applied an idea by Nakano et al. [
8] to represent some families of floorplans, in particular guillotine and diagonal–guillotine, in terms of pattern matrices, i.e., permutation matrices with entries
H or
V.
Another class that deserves future investigation is that of Catalan floorplans, whose characterization can be provided through the avoidance of the geometrical pattern
![Mathematics 14 00310 i007 Mathematics 14 00310 i007]()
except at the rectangle basis. This constraint implies that every Catalan floorplan is also a guillotine floorplan. The reason behind this nomenclature is that the equivalence classes under the weak equivalence order of
-avoiding rectangulations have already been studied in [
14], where they are referred to as
Catalan mosaic floorplans. Moreover, it is known that the number of such mosaic floorplans with
n rooms is given by the
nth Catalan number [
15].
We are confident that, also in this case, it would be possible to represent Catalan floorplans in terms of the avoidance of a set of pattern matrices, obtaining a result similar to Theorems 1 and 2.
The broad, long-term project that we aim to initiate with this work relies on the description of families of floorplans characterized in terms of combinatorial or geometrical constraints using this pattern-matrix representation.
The central problem can be formulated as follows:
Given a class of floorplans , defined in terms of combinatorial or geometric constraints satisfied by the rooms, is it possible to characterize in terms of the corresponding pattern matrices generating them?