COUNTING 1 × 2 RECTANGLES IN SET PARTITIONS
NENAD CAKI ´C, TOUFIK MANSOUR, AND ARMEND SH. SHABANI
Abstract. In this paper, we study the generating function for the number of set partitions of [n] represented as bargraphs, according to the number of rectangles of dimensions 1×2. In particular, we find an explicit formula and an asymptotic formula for the total number of 1 × 2 rectangles over set partitions of [n].
1. Introduction
A bargraph (known as a sky line, or a wall polyominoe) is a lattice path in the first quadrant of Z starting from the origin with the permissible steps being: the up step -u = (0, 1), down step - d = (0, −1) and horizontal step - h = (1, 0). The first step is an up step, no up step can follow a down step and vice versa, all the horizontal steps strictly lie above the x-axis, and the path terminates once it intersects the x-axis again. A bargraph can be identified as a sequence of columns s = s1s2· · · sm such that the
j-th column (from the left) contains sj cells, where m denotes the number of horizontal
steps of the bargraph.
Bargraphs (see, e.g., [6,7]) have been studied from different points of views and connec-tions to different fields have appeared. Prellberg and Brak [14] and Fereti´c [6] studied the generating function for the number of bargraphs according to the number of hor-izontal and up steps. Blecher et al., enumerated bargraphs according to statistics: levels [1], peaks [2], descents [3] and walls [4]. In [9, 10] was considered the statistic interior vertices in bargraphs and in set partitions, respectively. Recently, statistics on bargraphs of set partitions have been considered by several authors (see, e.g., [11–13]). A set partition of [n] is any collection of nonempty, pairwise disjoint subsets, called blocks, whose union is [n] (If n = 0, then there is a single empty set partition of [0] which has no blocks). We will denote the set of all set partitions of [n] with k blocks by P (n, k) and the set of all set partitions of [n] by P (n). A set partition π ∈ P (n, k) is said to be in the standard form if it is written as π = B1/B2/ · · · /Bk,
where min(B1) < min(B2) < · · · < min(Bk). Equivalently, one may also represent
a set partition by the canonical sequential form π = π1π2· · · πn, wherein i ∈ Bπi for
i ∈ [n] (see, e.g., [8, 15]). For example, the set partition π = {1, 4, 7}/{2, 3}/{5, 6}/{8} has the canonical sequential form π = 12213314.
We represent each set partition π by the corresponding bargraph of the canonical sequential form of π.
Given a bargraph B, a cell is formed by four vertices (x, y), (x + 1, y), (x + 1, y + 1) and (x, y + 1) that lie either along B or within the area it subtends in the first quadrant. Naturally, a rectangle of dimensions 1 × 2 (2 × 1) is a rectangle that is composed of
2010 Mathematics Subject Classification. 05A18.
Key words and phrases. Bargraphs; Generating functions; 1 × 2 rectangle; Set partitions.
two consecutive horizontal (vertical) cells. The number of 1 × 2 rectangles in π will be denoted by rec2(π). In this paper we will find the number of rectangles of dimensions
1 × 2 in the bargraph representation of set partitions. Note that such rectangles can overlap.
For example, Figure 1 represents the bargraph of π = {1, 4, 7}/{2, 3}/{5, 6}/{8} and 1 × 2 rectangles, drawn as horizontal lines. Note that for the given set partition we have rec2(π) = 10.
Figure 1. The bargraph of {1, 4, 7}/{2, 3}/{5, 6}/{8} and 1 × 2 rectangles
The aim of this paper is to study the generating function for the number of set partitions in P (n, k), according to the number of 1 × 2 rectangles.
In particular, we show that the total number of 1 × 2 rectangles over all set partitions of [n] is given by (see Theorem 2.3)
an= 4n − 3 12 Bn+1− 1 9Bn+2+ 18n − 17 36 Bn+ 6n + 7 36 Bn−1, where Bn is the nth Bell number.
In deriving our results, besides using the techniques of converting the ordinary gener-ating functions to exponential genergener-ating functions, we also solve a partial differential equation. Assymptotic estimates for the moments were also obtained.
2. Main results
Let Rk(x; q) be the generating function for the number of set partitions in P (n, k)
according to the number of 1 × 2 rectangles, namely, Rk(x; q) = X n≥k X π∈P (n,k) xnqrec2(π).
In order to study Rk(x; q), we refine it by defining Rk(x; q|a1a2. . . as) to be the
generat-ing function for the number of set partitions in P (n, k) such that the element n + 1 − j belongs to the block aj, j = 1, 2, . . . , s according to the number of 1 × 2 rectangles.
By the definitions, we have that for all a = 1, 2, . . . , k − 1, Rk(x; q|a) = k X b=1 Rk(x; q|ba) = a X b=1 Rk(x; q|ba) + k X b=a+1 Rk(x; q|ba) = x a X b=1 qbRk(x; q|b) + xqa k X b=a+1 Rk(x; q|b). (2.1) and Rk(x; q|k) = k−1 X b=1 Rk(x; q|bk) + Rk(x; q|kk) = x k−1 X b=1 qb(Rk(x; q|b) + Rk−1(x; q|b) + xqkRk(x; q|k). (2.2) Define Rk(x; q; v) = Pk
a=1Rk(x; q|a)va. Thus (2.2) can be written as
Rk(x; q|k) = xRk(x; q; q) + xRk−1(x; q; q)
(2.3)
By multiplying (2.1) by va and summing over a = 1, 2, . . . , k − 1 we obtain
k−1 X a=1 Rk(x; q|a)va = x k−1 X a=1 a X b=1 qbRk(x; q|b) + x k−1 X a=1 k X b=a+1 qaRk(x; q|b), which is equivalent to Rk(x; q|v) − Rk(x; q|k)vk = x k X j=1 (vq)j − vkqj 1 − v Rk(x; q|j) + x k X j=1 vq − (vq)j 1 − vq Rk(x; q|j). Thus by (2.3), we have Rk(x; q|v) = xvk(Rk(x; q; q) + Rk−1(x; q; q)+ + x 1 − v(Rk(x; q; vq) − v kR k(x; q; q)) + x 1 − vq(vqRk(x; q; 1) − Rk(x; q; vq) (2.4) Define R(x, y; q; v) = 1 +P
k≥1Rk(x; q; v)yk. Then, by multypliyng (2.4) by yk and
summing over k ≥ 1 we have the following result.
Proposition 2.1. The generating function R(x, y; q; v) satisfies R(x, y; q; v) = 1 + xR(x, vy; q; q) + xvyR(x, vy; q; q)
+ x
1 − v(R(x, y; q; vq) − R(x, vy; q; q))
+ x
Note that R(x, y; 1; 1) =P
k≥0
xkyk Qk
j=1(1−jx)
. By Proposition 2.1, for q = 1, we have
R(x, y; 1; v) = 1 + xR(x, vy; 1; 1) + xvyR(x, vy; 1; 1)
+ x 1 − v(vR(x, y; 1; 1) − R(x, vy; 1; 1)), which gives R(x, y; 1; v) = 1 +X k≥0 xk+1(v + v2+ · · · + vk+ vk+1y)yk Qk j=1(1 − jx) . (2.5)
Next, we are interested to find the total number of 1×2 rectangles over all set partitions in P (n, k). In order to do that we define S(x, y; v) = ∂q∂ R(x, y; q; v) |q=1and T (x, y; v) =
∂ ∂vR(x, y; 1; v). By Proposition 2.1, we have S(x, y; v) − x(1 + vy)S(x, vy; 1) − x 1 − v(vS(x, y; 1) − S(x, vy; 1)) = x(1 + vy)T (x, vy; 1) + x 1 − v(vF (x, y; 1, 1) − T (x, vy; 1)) + xv (1 − v)2(vF (x, y; 1, 1) − F (x, y; 1, v)).
By taking the limit at v = 1 and using (2.5), we obtain
xy ∂ ∂yS(x, y; 1) − (1 − xy)S(x, y; 1) = −x 2 6 X k≥0 (yx)k(k + 1)(2k2+ k + 6(k + 1)y + 6y2) Qk j=0(1 − jx) . (2.6) Let f (x) =P n≥0anx nand g(x) =P n≥0an xn
n! be the ordinary generating function and
the exponential generating function for the sequence an, respectively. In this context,
we say that g(x) is the corresponding exponential generating function of f (x), and write f (x) → g(x).
Define E(x, y) =P
n≥0[x
n](S(x, y; 1))xn
n! to be the exponential generating function for
the coefficient of xn in the series S(x, y; 1). Clearly, S(x, y; 1) → E(x, y).
Thus, by this fact, we have x2 3 X k≥0 k2(k + 1)(xy)k Qk j=0(1 − jx) → y 3 Z x 0 Z t 0 ∂ ∂y y ∂ 2 ∂y2(ye y(er−1) ) drdt x2 6 X k≥0 k(k + 1)(yx)k Qk j=0(1 − jx) → y 6 Z x 0 Z t 0 ∂2 ∂y2(ye y(er−1) )drdt x2yX k≥0 (k + 1)2(yx)k Qk j=0(1 − jx) → y Z x 0 Z t 0 ∂ ∂y y ∂ ∂y(ye y(er−1) ) drdt x2y2X k≥0 (k + 1)(yx)k Qk j=0(1 − jx) → y2 Z x 0 Z t 0 ∂ ∂y(ye y(er−1) )drdt. Hence, by (2.6), we have y Z x 0 ∂
∂yE(t, y)dt − E(x, y) + y Z x 0 E(t, y)dt = −y 3 Z x 0 Z t 0 ∂ ∂y y ∂ 2 ∂y2(ye y(er−1) ) drdt − y 6 Z x 0 Z t 0 ∂2 ∂y2(ye y(er−1) )drdt − y Z x 0 Z t 0 ∂ ∂y y ∂ ∂y(ye y(er−1) ) drdt − y2 Z x 0 Z t 0 ∂ ∂y(ye y(er−1) )drdt. By differentiating with respect to x, we obtain
y ∂ ∂yE(x, y) − ∂ ∂xE(x, y) + yE(x, y) = −y 3 Z x 0 ∂ ∂y y ∂ 2 ∂y2(ye y(et−1) ) dt − y 6 Z x 0 ∂2 ∂y2(ye y(et−1) )dt − y Z x 0 ∂ ∂y y ∂ ∂y(ye y(et−1) ) dt − y2 Z x 0 ∂ ∂y(ye y(et−1) )dt.
By solving this partial differential equation with the initial condition E(0, y) = 0, we obtain the following result.
Theorem 2.2. The exponential generating function E(x, y) for the total number of 1 × 2 rectangles over all set partitions in P (n, k) is given by
∂
∂xE(x, y) = y 36e
yex−y
(4y2(3x − 1)e3x+ 9y(6x − 1)e2x+ 36xex+ 4y2+ 9y). By Theorem 2.2, we have ∂ ∂xE(x, y) = ( x 3 − 1 9) ∂3 ∂x3e yex−y + (x 2 + 1 12) ∂2 ∂x2e yex−y + (x 6 + 1 36) ∂ ∂xe yex−y + (y 3 9 + y2 4 )e yex−y .
Theorem 2.3. The total number of 1×2 rectangles over all set partitions in P (n+1, k) is given by 4n + 1 12 Sn+2,k− 1 9Sn+3,k + 18n + 1 36 Sn+1,k+ n 6Sn,k+ 1 9Sn,k−3 + 1 4Sn,k−2
and the total number of 1 × 2 rectangles over all set partitions in P (n + 1) is given by 4n + 1 12 Bn+2− 1 9Bn+3+ 18n + 1 36 Bn+1+ 6n + 13 36 Bn,
where Sn,k are the Stirling numbers of the second kind and Bn is the nth Bell number.
In order to obtain asymptotic estimates for the moments as well as the limiting distri-bution, we need Bn+h = Bn (n + h)! n!rh 1 + O log n n (2.7)
uniformly for h = O(logn), where Bn is the nth Bell number and r is the positive root
of rer = n + 1. See [5] for an even stronger form that includes further terms in the asymptotic expansion. So, Theorem 2.3 gives
lim n→∞ an Bn = lim n→∞ 4n − 3 12 Bn+1 Bn − 1 9 Bn+2 Bn +18n − 17 36 + 6n + 7 36 Bn−1 Bn = lim n→∞ 4n − 3 12 Bn+1 Bn − 1 9 Bn+2 Bn , which, by (2.7), leads to the following corollary. Corollary 2.4. Asymptotically,
an =
n2B n
3(log(n) − log log n)
1 − 1
3(log n − log log n)
1 + O log n n
.
Remark 2.5. Note that the other symmetric case of 2 × 1 rectangles is trivial. If a set partition is given by the canonical sequential form π = π1π2· · · πn then the number of
2 × 1 in π equals Pn
i=1(πi− 1) ≡ area(π) − n. Note that the statistic area (number of
cells) on set partition has been considered n [12]. References
[1] A. Blecher, C. Brennan and A. Knopfmacher, Levels in bargraphs, Ars Math. Contemp. 9 (2015) 287–300.
[2] A. Blecher, C. Brennan and A. Knopfmacher, Peaks in bargraphs, Trans. Royal Soc. S. Afr. 71 (2016) 97–103.
[3] A. Blecher, C. Brennan and A. Knopfmacher, Combinatorial parameters in bargraphs, Quaest. Math. 39 (2016) 619–635.
[4] A. Blecher, C. Brennan and A. Knopfmacher, Walls in bargraphs, Online Journal of Analytic Combinatorics 12 (2017) 619–635.
[5] E. R. Canfield, Engel’s inequality for Bell numbers, J. Combin. Theory Ser. A 72 (1995) 184–187. [6] S. Fereti´c, A perimeter enumeration of column-convex polyominoes, Discrete Math. Theor.
Com-put. Sci. 9 (2007) 57–84.
[7] A. Geraschenko, An investigation of skyline polynomials, 2016, preprint, available at http:// people.brandeis.edu/gessel/47a/geraschenko.pdf.
[8] T. Mansour, Combinatorics of Set Partitions, CRC, 2012.
[10] T. Mansour, Interior vertices in set partitions, Advances in Applied Mathematics, 101, (2018) 60–69.
[11] T. Mansour and M. Shattuck, Combinatorial parameters on bargraphs of permutations, Trans. Combin. 7:2 (2018) 1–16.
[12] T. Mansour and M. Shattuck, Bargraph statistics on words and set partitions, J. Diff. Equat. Appl. 23:6 (2017) 1025–1046.
[13] T. Mansour A. Sh. Shabani and M. Shattuck, Counting corners in compositions and set partitions presented as bargraphs, J. Diff. Equat. Appl. 24:6 (2018) 992–1015.
[14] T. Prellberg and R. Brak, Critical exponents from nonlinear functional equations for partially directed cluster models, J. Stat. Phys. 78 (1995) 701–730.
[15] D. Stanton and D. White, Constructive Combinatorics, Springer, New York, 1986.
Department of Mathematics, Faculty of Electrical Engineering, University of Bel-grade, Belgrade 11120, Serbia
Email address: [email protected]
Department of Mathematics, University of Haifa, 3498838 Haifa, Israel Email address: [email protected]
Department of Mathematics, University of Prishtina, 10000 Prishtin¨e, Republic of Kosovo