A Bijection Between Permutations and Floorplans, and its Applications

advertisement
A Bijection Between Permutations and Floorplans,
and its Applications
Eyal Ackerman∗
Gill Barequet∗
Ron Y. Pinter∗
Abstract
A floorplan represents the relative relations between modules on an integrated circuit.
Floorplans are commonly classified as slicing, mosaic, or general. Separable and Baxter permutations are classes of permutations that can be defined in terms of forbidden
subsequences. It is known that the number of slicing floorplans equals the number of
separable permutations and that the number of mosaic floorplans equals the number of
Baxter permutations [17]. We present a simple and efficient bijection between Baxter permutations and mosaic floorplans with applications to integrated circuits design. Moreover,
this bijection has two additional merits: (1) It also maps between separable permutations
and slicing floorplans; and (2) It suggests enumerations of mosaic floorplans according to
various structural parameters.
Keywords: Baxter permutations, separable permutations, mosaic floorplans, slicing
floorplans.
1
Introduction
During the physical design process of an integrated circuit, one determines the shape, size,
and position on chip of every module. The shape of the chip and that of each of the modules
(blocks) is usually a rectangle. A floorplan describes the relative positions of the blocks, thus
it is often represented by a partition (dissection) of a rectangle by non-intersecting segments
into m rectangles (rooms) such that there is a one-to-one mapping from the n (≤ m) blocks
to the rooms. In a mosaic floorplan there are no empty rooms, that is, n = m. A special kind
of mosaic floorplans are slicing floorplans (here we follow the definition in [14]) in which the
subdivision to rectangles can be obtained by recursively cutting either vertically or horizontally
a rectangle into two smaller rectangles. Slicing floorplans can also be characterized as mosaic
floorplans that do not contain a ‘pin-wheel’ structure. See Figure 1 for examples of general,
mosaic, and slicing floorplans.
Separable and Baxter permutations are classes of permutations that can be defined in
terms of forbidden subsequences. A separable permutation can be defined as a permutation
that does not contain a subsequence of four elements with the same pairwise comparison as
2413 or 3142 (an alternative definition is given in Section 2.2). A Baxter permutation has a
similar forbidden condition, but it can contain such a subsequence if the absolute difference
Dept. of Computer Science, Technion—Israel Institute of Technology, Haifa 32000, Israel.
[ackerman|barequet|pinter]@cs.technion.ac.il
∗
1
E-mail:
(a) General (empty
rooms are shaded)
(b) Mosaic (a clockwise pin-wheel structure is shown in bold)
(c) Mosaic
(d) Slicing
Figure 1: Floorplans (b and c are equivalent).
between the first and last element in the subsequence is greater than one (a more formal
definition appears in Section 2.1). Thus, separable permutations are a subclass of Baxter
permutations.
Sakanushi et al. [12] were the first to consider the number of distinct mosaic floorplans.
They found a recursive formula for this number, but did not recognize it to be the same
formula suggested by Chung et al. [5] in their analysis of the number of Baxter permutations.
Yao et al. [17] showed a bijection between mosaic floorplans and twin binary trees whose
number is known [6] to be the number of Baxter permutations. They have also shown that
the number of slicing floorplans containing n blocks is the nth Schröder number.
A connection between floorplans and permutations was first presented by Murata et al. [9],
who suggested representing floorplans as a pair of permutations (sequence-pair ). In a later
work, Murata et al. [10] described a mapping from sequence-pairs to floorplans. From this
mapping one can deduce a mapping from Baxter permutation to mosaic floorplans. Recently and independently, Kajitani [8] has suggested representing a floorplan by a permutation (single-sequence in his terminology) and explored, along with others, the properties and
advantages of this simple representation [19, 20, 21, 22]. Among other things they showed
mappings between (mosaic) floorplans and (Baxter) permutations.
In this work we present another bijection between Baxter permutations and mosaic floorplans. This bijection is direct, as opposed to the bijection that can be deduced from the work
of Yao et al. [17] and the work of Dulucq and Guibert [6]. The mapping from permutations
to floorplans we suggest is much simpler and more efficient than the mapping described in [9].
Comparing with the mappings suggested recently in [19] and [20], our mapping is as efficient
(has a linear time and space complexity) and at least as simple. Furthermore, the mapping
algorithm can easily find the direct neighbors of every block, with performances matching that
of the algorithm suggested in [22]. This information is useful for the actual placement of the
blocks. The bijection we describe has the following additional merits: First, it maps separable
permutations to slicing floorplans. Second, by combining it with known results about Baxter
permutations, we obtain enumerations of mosaic floorplans according to various structural parameters, such as the number of vertical segments in the partition and the number of blocks
on the boundary of the floorplan. Some of our results appeared in a preliminary form in [1].
The paper is organized as follows. In Section 2 we give some background on Baxter
and separable permutations and define an equivalence relation on (mosaic) floorplans. Then
we show in Section 3 the bijection between Baxter permutations and (equivalence classes
2
of) mosaic floorplans and discuss its applications. In Section 4 we explore the enumeration of
mosaic floorplans according to various parameters. Finally, we discuss our results in Section 5.
2
Preliminaries
In order to distinguish between different (mosaic) floorplans we must first define when two
floorplans are considered equivalent. Here we follow the definition of Sakanushi et al. [12].
Given a floorplan f a segment s supports a room r in f if s contains one of the edges of r. We
say that s and r hold a top-, left-, right-, or bottom-seg-room relation if s supports r from the
respective direction. Two floorplans are equivalent if there is a labeling of their rectangles and
segments such that they hold the same seg-room relations. Thus, for example, the floorplans
in Figures 1(b) and 1(c) are equivalent.
2.1
Baxter Permutations
A Baxter permutation on [n] = 1, 2, . . . , n is a permutation π = (σ1 σ2 . . . σn ) for which there
are no four indices 1 ≤ i < j < k < l ≤ n such that
1. σk < σi + 1 = σl < σj ; or
2. σj < σl + 1 = σi < σk .
For example, for n = 4, 3142 and 2413 are the only non-Baxter permutations. This class of
permutations was introduced by Baxter [3] in the context of fixed points of the composite of
commuting functions. The nth Baxter number, B(n), is the number of Baxter permutations
on [n]. Chung et al. [5] showed that
n+1 n+1
n−1
X n+1
r+1 r+2
r
B(n) =
n+1 n+1
1
r=0
2
Dulucq and Guibert [6] showed one-to-one correspondences between Baxter permutations,
twin binary trees, and some type of three non-intersecting paths on a grid. Shen et al. [14]
analyzed the asymptotic behavior of the Baxter numbers and proved that B(n) = Θ(8 n /n4 ).
The first Baxter numbers (starting from n = 0) are {0, 1, 2, 6, 22, 92, 422, 2074, . . .}.
2.2
Separable Permutations
Let π1 = (α1 , α2 , . . . , αn ) and π2 = (β1 , β2 , . . . , βm ) be two permutations on [n] and [m],
respectively. We say that π = (σ1 , σ2 , . . . , σn+m ) is the result of concatenating π2 above
π1 if πi = αi for 1 ≤ i ≤ n and πn+i = n + βi for 1 ≤ i ≤ m. Likewise, we say that
π = (σ1 , σ2 , . . . , σn+m ) is the result of concatenating π2 below π1 if πi = m + αi for 1 ≤ i ≤ n
and πn+i = βi for 1 ≤ i ≤ m.
A permutation π is separable if either
1. π = (1); or
2. There are two separable permutations π1 and π2 such that π is the the concatenation
of π2 above or below π1 .
3
Bose et al. [4] coined the term separable permutations and showed a polynomial-time algorithm for finding a given sub-permutation P within a permutation T , where P is separable. A
similar definition was suggested by Shapiro and Stephens [13] in their analysis of permutationmatrices that eventually fill up under bootstrap percolation. They have also shown that the
number of separable permutations on [n] is the (n − 1)st Schröder number 1 . Avis and Newborn [2] showed that separable permutations are exactly the permutations that can be sorted
by an unbounded sequence of pop-stacks (in a pop-stack the pop operation unloads the entire
stack).
Another characterization of separable permutations is in terms of forbidden subsequences.
A permutation π = (σ1 , σ2 , σ3 , . . . , σn ) ∈ Sn avoids a certain sub-permutation τ ∈ Sk (for k ≤
n) if it does not contain a subsequence (σi1 , σi2 , . . . , σik ) with the same pairwise comparisons
as τ . The set of permutations on [n] avoiding τ is denoted by Sn (τ ). It can be shown [4]
that the set of separable permutations is equal to Sn (3142, 2413), suggesting an alternative
proof [16] that their number is the (n − 1)st Schröder number.
3
The Bijection
In this section we show a direct and simple bijection between Baxter permutations and mosaic
floorplans. In Section 3.1 we describe a mapping from mosaic floorplans to Baxter permutations, while in Section 3.2 we present a mapping in the other direction and thus show that
these two mappings define a bijection.
3.1
Mapping Mosaic Floorplans to Baxter Permutations
In this section we describe a mapping from mosaic floorplans to permutations. It is essentially
the same mapping presented implicitly in [12] and explicitly in [19], however, we describe it
here for completeness and prove that it always produces a Baxter permutation.
Given a mosaic floorplan of n blocks (rectangles) we can obtain a mosaic floorplan of n − 1
blocks by using the block deletion operation introduced by Hong et al. [7].
Definition 3.1 (block deletion) Let f be a mosaic floorplan with n > 1 blocks and let b be
the top-left block in f . If the bottom-right corner of b is a ‘a’- (resp., ‘⊥’-) junction, then one
can delete b from f by shifting its bottom (resp., right) edge upwards (resp., leftwards), while
pulling the T-junctions attached to it until the edge hits the bounding rectangle.
See Figure 2 for an example of the block-deletion operation. Note that we can delete in a
similar manner a block from any corner of a floorplan. Using the block-deletion operation we
now define a mapping from mosaic floorplans to Baxter permutations.
For example, the permutation that corresponds to the floorplan in Figure 3 is 521463.
Before we show that the output of Algorithm FP2BP is always a Baxter permutation, we need
1
The Schröder numbers arise in numerous other enumerative combinatorial problems [15, pp. 239–240].
One example is the number of paths on an orthogonal grid from (0, 0) to (n, n) that do not go above the line
y = x and use only the steps (1, 0), (0, 1), and (1, 1). When denoting by rn the nth Schröder number, we
2n−k
C
, where Cn is the nth Catalan number. It can be shown (see, e.g., [14]) that rn =
have rn = n
√ nk=01.5 k n−k
Θ (3 + 8) /n . The first Schröder numbers (starting from n = 0) are {0, 1, 2, 6, 22, 90, 394, 1086, 8558, . . .}.
4
(a)
(b)
(c)
(d)
Figure 2: Block deletion
Input: A mosaic floorplan f with n blocks.
Output: A (Baxter) permutation on [n].
1: Label the blocks of f according to their deletion order from the top-left corner;
2: Return the permutation of labels obtained by deleting the blocks of f from the bottom-left
corner.
Algorithm 1: Algorithm FP2BP
the following definition and observations.
Definition 3.2 Let f be a mosaic floorplan and let b1 and b2 be two blocks in f . We say that
b1 is left of (resp., above) b2 if there is either 1. a segment which contains the right (resp.,
lower) edge of b1 and the left (resp., upper) edge of b2 ; or 2. a block b0 such that b1 is left of
(resp., above) b0 and b0 is left of (resp., above) b2 . If a block b1 is left-of (resp., above) block
b2 by the first rule, then b1 is directly left-of (resp., above) b2 .
Observation 3.3 ([10, Property 5]) Let f be a mosaic floorplan and let b1 and b2 be two
blocks in f . Then exactly one of the following relations holds: b1 is left of b2 , b1 is above b2 ,
b2 is left of b1 , or b2 is above b1 .
Observation 3.4 If a block b1 precedes a block b2 according to the top-left corner-deletion
order and b2 precedes b1 according to the bottom-left corner-deletion order, then b1 is above
b2 . Similarly, if b1 precedes b2 according to both orders, then b1 is left of b2 .
Proof: Notice that when a block is deleted from the top-left corner it is to the left or above
any other block in the floorplan. Additionally, the relation between any two blocks remains
3
1
4
2
6
5
Figure 3: Applying Algorithm FP2BP on this floorplan yields the permutation 521463.
5
s
1
σl
σ
k s
2
σj
σi
Figure 4: An illustration for the proof of Lemma 3.6.
the same after applying the deletion operation. Therefore, if a block b1 precedes a block b2
according to the top-left (resp., bottom-left) corner-deletion order, then b 1 is to the left of or
above (resp., below) b2 . Hence the claim follows.
2
The following observation is easy.
Observation 3.5 If a block b1 follows immediately a block b2 according to one of the orders,
then there is a segment that contains edges of both b1 and b2 .
Next, we prove that Algorithm FP2BP always produces a Baxter permutation.
Lemma 3.6 Given a mosaic floorplan f with n blocks, the permutation π obtained by applying
Algorithm FP2BP on f is a Baxter permutation on [n]. Moreover, if f is a slicing floorplan,
then π is a separable permutation.
Proof: Suppose π = (σ1 σ2 . . . σn ) is not a Baxter permutation. Then there are four indices
1 ≤ i < j < k < l ≤ n such that either 1. σk < σi + 1 = σl < σj ; or 2. σj < σl + 1 = σi < σk .
Assume that the first case holds, and choose j and k such that k = j + 1. According to
Observations 3.4 and 3.5, block σi is left of block σl , and some segment s1 supports both
blocks. Similarly, block σj is below block σk , and some segment s2 supports both blocks.
According to Observation 3.4, block σk is to the left of block σl and above block σi . Similarly,
block σj is to the right of block σi and below block σl . Thus, s1 and s2 must intersect (see
Figure 4). The proof in the second case is similar and is thus omitted.
Now suppose f is a slicing floorplan, and let s be the segment that cuts the bounding
rectangle of f into two. Suppose s is horizontal, and denote by f1 the m blocks above s and
by f2 the n − m blocks below s. Then, the blocks in f1 precede the blocks of f2 according
to the top-left deletion order, and follow them according to the bottom-left deletion order.
By induction, the blocks in f1 form a separable permutation on 1, . . . , m, and the blocks
in f2 form a separable permutation on m + 1, . . . , n. Thus, by definition, π is a separable
permutation. The proof for the case in which s is vertical is similar.
2
Next we show that the mapping defined by Algorithm FP2BP is one-to-one.
Lemma 3.7 Let f1 and f2 be two mosaic floorplans, each containing n blocks, and let π1 and
π2 be the permutations produced by Algorithm FP2BP when applied to f1 and f2 , respectively.
Then, if f1 6= f2 then π1 6= π2 .
6
Proof: We prove by induction on n that if π1 = π2 then f1 = f2 . Let b1 (resp., b2 ) be the
first block which is removed from the top-left corner of f1 (resp., f2 ), and let s1 (resp., s2 )be
the segment that is shifted in the course of this action. Then s1 and s2 must have the same
orientation, otherwise the numbers 1 and 2 would have different orders in π 1 and π2 . Let f10
and f20 be the resulting floorplans after the deletion. The permutation that corresponds to f 10
and f20 is the permutation obtained from π1 by deleting the number 1 and decreasing every
remaining number by 1. Thus, by the induction hypothesis, f10 = f20 . It remains to verify
that when we reverse the deletion operation, then the same number of blocks are “pushed”
by s1 and s2 . Indeed, if this number is different then there is a block x which is pushed in one
floorplan, say f1 , but not on the other floorplan. Thus, x is to the left of block 1 in f1 while
it is below block 1 in f2 . It follows that 1 and x will have different orders in π1 and π2 .
2
3.2
Mapping Baxter Permutations to Mosaic Floorplans
Input: A Baxter permutation π = (σ1 σ2 . . . σn ).
Output: A mosaic floorplan with n blocks.
1: Draw a block and name it σ1 ;
2: Construct an n × n grid within the block;
3: for i = 2 to n do
4:
if σi < σi−1 then
5:
Slice the top-right block by a horizontal segment at the ith level of the grid;
6:
Name the new block σi ;
7:
while the block σ 0 to the left of σi has a label smaller than σi do
8:
Extend block σi leftwards (at the expense of σ 0 );
9:
end while
10:
else
11:
Slice the top-right block by a vertical segment at the ith level of the grid;
12:
Name the new block σi ;
13:
while the block σ 0 below σi has a label greater than σi do
14:
Extend block σi downwards (at the expense of σ 0 );
15:
end while
16:
end if
17: end for
Algorithm 2: Algorithm BP2FP
Given a Baxter permutation on [n] Algorithm BP2FP constructs a mosaic floorplan with n
blocks. See Figure 5 for an example. The algorithm simply inserts blocks one by one into the
top-right corner of the floorplan. The current block is created by slicing the previous block
into two, and is labeled according to the current element in the permutation. If the previous
element is smaller (resp., greater) than the current element, then we slice the block vertically
(resp., horizontally). The horizontal (resp., vertical) slicing segment is extended leftwards
(resp., downwards) as long as the block to the left of it (resp., below) has a smaller (resp.,
greater) label than the current block.
The output of Algorithm BP2FP is clearly a mosaic floorplan. We show next that Algorithms BP2FP and FP2BP define a one-to-one correspondence (bijection) between Baxter
permutations and mosaic floorplans.
7
6
3
1
1
4
4
3
1
4
4
(b) 41
(a) 4
(d) 4136
(c) 413
2
5
5
6
6
3
1
4
(e) 4136
6
3
1
4
5
6
3
3
1
2
4
(f) 41365
1
4
(g) 413652
(h) 413652
Figure 5: Applying Algorithm BP2FP to the permutation 413652
Theorem 1 There is a bijection between Baxter permutations on [n] and mosaic floorplans
with n blocks. Moreover, it remains a bijection when restricted to separable permutations on
[n] and slicing floorplans with n blocks.
Proof: Let π be a Baxter permutation on [n], and let f be the output of Algorithm BP2FP
when it is applied on π. Clearly, f is a valid mosaic floorplan containing n blocks. Let π 0 be
the output of Algorithm FP2BP applied to f . To prove the theorem it is enough to show that
π 0 = π. It is easy to see that during the computation of π 0 , the blocks are deleted from the
bottom-left corner of f in the same order they were inserted to the top-right corner of f in
the course of Algorithm BP2FP. Therefore, it is sufficient to prove that the order in which the
blocks of f are deleted from the top-left corner is 1, 2, . . . , n. It is clear that the block labeled 1
is the first removed block (no other block is above or to the left of it). Assume that for every
1 ≤ i ≤ k the block labeled i is the ith removed block from the top-left corner. We now show
that the next deleted block is the one labeled k + 1. Suppose that k + 1 precedes k in π, that
is, π = (. . . , k + 1, A, B, k, . . .), where A is a (possibly empty) sequence of integers that are
greater than k + 1 and B is a (possibly empty) sequence of integers that are smaller than k.
(There are no other options since π is a Baxter permutation.) Figure 6(a) shows the floorplan
after k was inserted in the course of Algorithm BP2FP. According to the induction hypothesis,
all the blocks in B are removed before block k, so when k is removed (from the top-left corner)
the left edge of the block labeled k + 1 is also on the boundary. The bottom-right corner of
k is either a ‘`’ or ‘⊥’ junction. In the first case k + 1 is clearly the next block to be deleted.
For the second case, note that a ‘⊥’ junction can be formed only when the first block with
a label greater than k and to the right of k in π (denote this block by c) has a smaller label
than the block below k and sharing the same segment (as c) as a right edge (denote this block
by a). Figures 6(b,c) illustrate the situation before and after the insertion of c. Note that a
is the last of the elements of A and k < c < a. If A is empty, then a = k + 1; thus, there
cannot be such a block c. Otherwise, there must be an integer i such that k + 1 ≤ i ≤ c − 1, i
is to the left of a in π, and i + 1 is either c or to the right of c. Therefore, i, a, k, i + 1 form a
8
B
k
B
k
B
(a)
A
k+1
c
a
a
k+1
k
k+1
(b)
(c)
Figure 6: Illustration for the proof of Theorem 1.
forbidden subsequence, and π is not a Baxter permutation. The proof for the case k precedes
k + 1 in π is similar and is thus omitted.
2
Definition 3.8 Given a floorplan f and a block b in f , the direct relation set (DRS) of b is
the set of blocks that are directly left of, right of, above, or below b.
The DRS is important for the actual placement of the blocks on the chip, once their
dimensions are set [22].
Theorem 2 Let π be a Baxter permutation on [n] and let f be its corresponding floorplan.
Then f and the DRS of every block in f can be computed in O(n) time.
Proof: Algorithm BP2FP inserts n blocks one after the other. It is easy to update the DRS
of the currently inserted block and of its neighbors while the block is being extended at their
expense. For a certain block there could be many update operations, but every block can be
chopped at most once from above and at most once from right. Hence, the total number of
update operations is O(n).
2
Some of the problems which are hard to solve for general or even mosaic floorplans are
easier for slicing floorplans, due to their simple structure. Therefore, sometimes one wishes
to determine whether a given floorplan is slicing [23]. When a floorplan f is represented as
a permutation π, by Theorem 1 f is slicing if and only if π is separable. Thus, it can be
determined in a linear time whether f is a slicing floorplan using the algorithm suggested
in [4, pp. 282] to test if a permutation is separable.
4
Enumeration of Mosaic Floorplans According to Various Parameters
Baxter permutations are known to be enumerated according to various parameters [6, 11].
Algorithm BP2FP along with those results suggest enumerations of mosaic floorplans according
to various parameters such as the number of vertical segments, and the number of blocks on
the boundary of the floorplan.
Definition 4.1 (rise) Given a permutation π = (σ1 σ2 . . . σn ), a rise (resp., descent) in π is
sequence of two consecutive elements σi σi+1 such that σi < σi+1 (resp., σi > σi+1 ).
9
According to Algorithm BP2FP, every rise in the input permutation is mapped to a vertical segment in the output floorplan. Mallows [11] considered the enumeration of Baxter
permutations according to the number of rises. The next corollary follows from his result.
Corollary 4.2 The number of mosaic floorplans with n blocks and r vertical segments is
n+1 n+1 n+1
r
r+1 r+2
n+1 n+1
2
1
.
Definition 4.3 (left-to-right minimum/maximum) Let π = (σ1 σ2 . . . σn ) be a permutation on [n]. An element σk is a left-to-right minimum (resp., maximum) if σk < σi (resp.,
σk > σi ) for every 1 ≤ i < k.
Algorithm BP2FP maps every left-to-right minimum to a block touching the left edge of the
boundary of the output floorplan f . Similarly, every left-to-right maximum in π is mapped to
a block touching the bottom edge of the boundary of f . Thus, according to a result of Dulucq
and Guibert [6, Theorem 1] we have:
Corollary 4.4 The number of mosaic floorplans with n blocks, r vertical segments, i blocks
touching the left edge of the boundary of the floorplan, and s blocks touching the bottom edge
of the boundary of the floorplan is
n+1
si
n−s−1 n−i−1
n−s−1 n−i−1
−
.
r + 1 n(n + 1)
n−r−2
r−1
n−r−1
r
Dulucq and Guibert have considered the enumeration of Baxter permutations according
to two other parameters.
Definition 4.5 [6, Definition 4] Given a permutation π = (σ1 σ2 . . . σn ),
• rd(π) is the number of rises in σi σi+1 . . . σn , where i = max{j|∃k ≥ 2 : σj < σj+k <
σj+1 < . . . < σj+k−1 } with σ0 = −1 and σn+1 = 0.
• dd(π) is the number of descents in σi σi+1 . . . σn , where i = max{j|∃k ≥ 2 : σj > σj+k >
σj+1 > . . . > σj+k−1 } with σ0 = n + 2 and σn+1 = n + 1.
We define below the corresponding parameters for a mosaic floorplan f .
Definition 4.6 Let f be a mosaic floorplan and let t be a ‘⊥’- (resp., ‘ `’-) junction in f .
We say that t is the last ‘⊥’- (resp., ‘ `’-) junction in f if it is the last ‘⊥’- (resp., ‘ `’-)
junction which is deleted when the blocks of f are removed from the bottom-left corner. Given
a horizontal (resp., vertical) segment s in f , we say that s is above (resp., left of) t if s is
above the horizontal (resp., vertical) segment 2 of t.
2
A segment s1 is above a segment s2 in a floorplan f if: 1. s1 is vertical and its lower endpoint is on s2 ; or
2. s2 is vertical and its upper endpoint is on s1 ; or 3. s1 and s2 are both horizontal and contain opposite edges
of a block (rectangle) in f . The relation left of is defined in a similar manner.
10
permutations
???
potentially optimal floorplans
Baxter permutations
mosaic floorplans
slicing
floorplans
separable
permutations
Figure 7: The hierarchy of bijections between permutations and floorplans.
A careful look at the definitions of rd(π) and dd(π), and the way Algorithm BP2FP works
leads to the following observation.
Observation 4.7 Let π be a Baxter permutation on [n] and let f be the floorplan produced
by the application of Algorithm BP2FP to π. Denote by t the last ‘⊥’- (resp., ‘ `’-) junction
in f . Then, the number of horizontal (resp., vertical) segments in f above (resp., left of ) t is
dd(π) (resp., rd(π)).
It follows from this observation and from Theorem 5 in [6] that:
Corollary 4.8 The number of mosaic floorplans with n blocks, r vertical segments, i blocks
touching the left edge of the boundary of the floorplan, s blocks touching the bottom edge of
the boundary of the floorplan, p vertical segments after the last ‘⊥’-junction, and q horizontal
segments after the last ‘ `’-junction is
n−1−p n−1−s−p
n−1−i−p
r−p
n−1−i
r
n−1−i−q
r
5
r−p
r−s−p
n−1
n−1−s
r−s
r
n−1−q
r
n−1−s−q
r−s
.
Discussion
We have presented a bijection between Baxter permutations and mosaic floorplans. Moreover, from this bijection we have also deduced a similar correspondence between separable
permutations and slicing floorplans (see Figure 7), and have suggested enumerations of mosaic floorplans according to various parameters, such as the number of vertical segments and
the number of blocks on certain edges of the boundary of the floorplan. The algorithm we
use to map Baxter permutations to mosaic floorplans has applications in integrated circuit
(IC) design: it can be used for an easy and efficient construction of a floorplan from the
permutation representing it.
Given a non-Baxter permutation, it is possible to convert it to a Baxter permutation
by inserting dummy elements, as suggested by Murata et al. [10]. The new permutation
can then be mapped to a floorplan containing empty rooms (which is a general, non-mosaic
floorplan) using Algorithm BP2FP. Given a permutation π = (σ1 σ2 . . . σn ), the elimination of a
forbidden subpattern of the form σi . . . σj σj+1 . . . σk , such that σj+1 < σi + 1 = σk < σj (resp.,
11
4
7
5
1
3
6
2
Figure 8: The floorplan with empty rooms corresponding to the non-Baxter permutation
24153.
σj < σk + 1 = σi < σj+1 ), is done by inserting the dummy element σk (resp., σi ) between
σj and σj+1 and increasing by 1 each of the old elements greater than or equal to σ k (resp.,
σi ). For example, the permutation 2413 is converted to 25314. In the mosaic floorplan that
matches the new permutation we mark every block that corresponds to a dummy element as
an empty room. Each of these empty rooms is the center of a ‘pin-wheel’ structure. Figure 8
shows an example with two pin-wheels and their corresponding empty rooms.
Finding a floorplan that minimizes criteria such as area or wire-length is a major problem
in IC design. It is well-known that an optimal floorplan might contain empty rooms. However,
Young et al. [18] showed that when searching for an optimal floorplan, it is enough to consider
floorplans in which every empty room (if such exists) is at the center of pin-wheel structure and
has no room-room neighbor (that is, a touching room) which is an empty room. Characterizing
and enumerating permutations that are mapped to such floorplans is an interesting open
problem (as indicated in Figure 7).
References
[1] E. Ackerman, G. Barequet, and R.Y. Pinter, On the number of rectangular partitions, Proc. 15th
ACM-SIAM Symp. on Discrete Algorithms, New Orleans, LA, 2004, 729–738.
[2] D. Avis and M. Newborn, On pop-stacks in series, Utilitas Mathematica, 19 (1981), 129–140.
[3] G. Baxter, On fixed points of the composite of commuting functions, Proc. Amer. Math. Soc., 15 (1964),
851–855.
[4] P. Bose, J.F. Buss, and A. Lubiw, Pattern matching for permutations, Information Processing Letters,
65 (1998), 277–283.
[5] F.R.K. Chung, R.L. Graham, V.E. Hoggatt, and M. Kleiman, The number of Baxter permutations,
J. Combin. Theory, Ser. A, 24 (1978), 382–394.
[6] S. Dulucq and O. Guibert, Baxter permutations, Discrete Mathematics, 180 (1998), 143–156.
[7] X. Hong, G. Huang, Y. Cai, J. Gu, S. Dong, C.K. Cheng, and J. Gu, Corner block list: an
effective and efficient topological representation of non-slicing floorplan, Proc. IEEE/ACM Int. Conf. on
Computer-Aided Design, San Jose, CA, 2000, 8–12.
[8] Y. Kajitani, The single sequence that unifies placement and floorplanning, presented at the 1st Conf. for
Asia Universities on Semiconductors Design, 2003.
[9] H. Murata, K. Fujiyoshi, S. Nakatake, and Y. Kajitani, VLSI module placement based on rectanglepacking by the sequence-pair, IEEE Trans. on Computer-Aided Design of Integrated Cirtcuits and Systems,
15:12 (1996), 1518–1524.
12
[10] H. Murata, K. Fujiyoshi, T. Watanabe, and Y.Kajitani, A mapping from sequence-pair to rectangular dissection, Proc. Asia and South Pacific Design Automation Conf. Chiba , Japan, 1997, 625–633.
[11] C.L. Mallows, Baxter permutations rise again, J. Combin. Theory, Ser. A, 27 (1979), 394–396.
[12] K. Sakanushi, Y. Kajitani, and D.P. Mehta, The quarter-state-sequence floorplan representation,
IEEE Trans. on Circuits and Systems I: Fundamental Theory and Applications, 50:3 (2003), 376–386.
[13] L. Shapiro and A.B. Stephens, Bootstrap percolation, the Schröder numbers, and the N -Kings problem,
SIAM J. on Discrete Mathematics, 4 (1991), 275–280.
[14] Z.C. Shen and C.C.N. Chu, Bounds on the number of slicing, mosaic, and general floorplans, IEEE
Trans. on Computer-Aided Design of Integrated Circuits and Systems, 22:10 (2003), 1354–1361.
[15] R.P. Stanley, Enumerative Combinatorics, vol. 2, Cambridge, 1999.
[16] J. West, Generating trees and the Catalan and Schröder numbers, Discrete Mathematics, 146 (1995),
247–262.
[17] B. Yao, H. Chen, C.K. Cheng, and R.L. Graham, Floorplan representations: Complexity and connections, ACM Transactions on Design Automation of Electronic Systems, 8:1 (2003), 55–80.
[18] E.F.Y. Young, C.C.N. Chu, and C. Shen, Twin binary sequences: a non-redundant representation for
general non-slicing floorplan, IEEE Trans. on Computer-Aided Design of Integrated Circuits and Systems,
22:4 (2003), 457–469.
[19] X. Zhang and Y. Kajitani, Space-planning: placement of modules with controlled empty area by singlesequence, Proc. Asia and South Pacific Design Automation Conf., Yokohama , Japan, 2004, 25–30.
[20] X. Zhang and Y. Kajitani, A normalized configuration of floorplans and ABLR-relations, Int. Conf. on
Communications, Circuits and Systems, Chengdu, China, 2004, 1218–1222.
[21] X. Zhang and Y. Kajitani, Theory of T-junction floorplans in terms of single-sequence, IEEE Int.
Symp. on Circuits and Systems, Vancouver, Canada, 2004, 341–344.
[22] X. Zhu, C. Zhuang, and Y. Kajitani, A general packing algorithm based on single-sequence, Int. Conf.
on Communications, Circuits and Systems, Chengdu, China, 2004, 1257–1261.
[23] C. Zhuang, X. Zhu, Y. Takashima, S. Nakatake, and Y. Kajitani, An algorithm for checking
slicing floorplan based on HPG and its application, Int. Conf. on Communications, Circuits and Systems,
Chengdu, China, 2004, 1223–1227.
13
Download