Journal of Statistical Planning and Inference 101 (2002) 81–94
www.elsevier.com/locate/jspi
A bijective perimeter enumeration of directed convex polyominoes Svjetlan Fereti(c ∗
Setali ste Joakima Rakovca 17, 51000 Rijeka, Croatia Received 22 February 1999; received in revised form 15 November 1999
Abstract We give new bijective proofs for the following facts: (1) there are ( p+q )( p+q ) directed convex polyominoes with horizontal perimeter 2p + 2 and p q vertical perimeter 2q + 2; (2) there are ( 2n ) directed convex polyominoes with total perimeter 2n + 4; n p+q p+q 2p+2 2q+2 y is the square root of a rational (3) the generating function Dc = ∞ p; q=0 ( p )( q )x function. Once (3) is proved, we have—and take—the opportunity to do an easy computation and obtain the known formula x2 y2 Dc = : 2 1 − 2x − 2y2 + (x2 − y2 )2 c 2002 Elsevier Science B.V. All rights reserved.
1. Introduction Let us =rst say what a directed convex polyomino is. Denition 1. A directed convex polyomino is a convex polyomino which contains the lower left corner of its minimal bounding rectangle. And a convex polyomino is a union of cells (i.e., of unit squares whose vertices are lattice points of the x–y plane) which is =nite, has connected interior, and has connected intersections both with all horizontal straight lines and with all vertical straight lines.1 See Figs. 1 and 2. Directed convex (dc-) polyominoes =rst appeared in Lin and Chang’s 1988 paper (Lin and Chang, 1988). That paper arose from Guttmann and Enting’s paper (Guttmann ∗
Tel.: +385-51-433-015; fax: +385-51-332-816. E-mail address:
[email protected] (S. Fereti(c). 1 In this paper, we adopt the heavily-used convention that polyominoes are “translation-proof”. That is to say, no matter how we translate it, a polyomino remains the same. c 2002 Elsevier Science B.V. All rights reserved. 0378-3758/02/$ - see front matter PII: S 0 3 7 8 - 3 7 5 8 ( 0 1 ) 0 0 1 5 5 - 0
82
S. Fereti"c / Journal of Statistical Planning and Inference 101 (2002) 81–94
Fig. 1. A convex polyomino.
Fig. 2. A directed convex (dc-) polyomino.
S. Fereti"c / Journal of Statistical Planning and Inference 101 (2002) 81–94
83
and Enting, 1988b), and thereby from Guttmann and Enting (1988a), the paper in which the latter authors directly enumerated self-avoiding polygons with up to 56 steps. So it might be said that dc-polyominoes have roots in statistical mechanics. To be fair, dc-polyominoes not rarely (Bousquet-M(elou, 1996; Bousquet-M(elou and F(edou, 1995; Bousquet-M(elou and Guttmann, 1997; Lin and Chang (1988)) play a pretty humble role: they are just an auxiliary object in the enumeration of “ordinary” convex polyominoes. But all the same, dc-polyominoes, with their nice perimeter distribution (and area distribution (Bousquet-M(elou and Viennot, 1992; Dubernard and Dutour, 1996)), are of interest in their own right. Let us endow dc-polyominoes with the generating function Dc(x; y), in which the variables x and y are conjugate to the horizontal perimeter and the vertical perimeter, respectively. Lin and Chang (1988) found the formula x2 y2
Dc =
1 − 2x2 − 2y2 + (x2 − y2 )2
;
(1)
from which Bousquet-M(elou (1994) deduced what follows: p+q There are ( p+q p )( q ) directed convex polyominoes with horizontal perimeter and
vertical perimeter equal to 2p + 2 and 2q + 2 respectively, and there are ( 2n n ) directed convex polyominoes with total perimeter equal to 2n + 4. Do the above simple-looking results admit of some nice bijective proof? This question has remained open for rather a long time. Meanwhile, some interesting attempts were made by Bousquet-M(elou (1992) and Dutour (1996, Chapter 3), but (as those authors admit) the nature of dc-polyominoes was not fully fathomed. Now one might think that dc-polyominoes are past comprehension. We claim, however, that they are not. Namely, as the reader will see in Sections 2 and 3, we have found an easy bijection (consisting of two steps, ’1 and ’2 ) which takes up a dc-polyomino with 2p + 2 horizontal and 2q + 2 vertical edges and converts it into a path-pair (u; v) such that u and v both go from (0; 0) to (p; q). Once this two-step bijection is exhibited, the above binomial-coeLcient formulas (restated in Section 4) are pretty obvious. Our second =nding, presented in Section 5, is that it pays to concatenate the fruits of ’2 with those of ’1 (whatever the latter fruits are). Namely, that act shows the “true colors” of Dc squared: Dc2 is x3 y3 =2 times the gf for all lattice paths that have an odd number of (1; 0)-steps and an odd number of (0; 1)-steps.
2. From dc-polyominoes to pairs of non-crossing paths In this section, dc-polyominoes will somehow evolve into pairs of non-crossing paths. This (original, as far as we know) transformation is progress because pairs of non-crossing paths are a pretty familiar object. For p; q ∈ N ∪ {0}, let DCpq be the set of dc-polyominoes with horizontal perimeter 2p+2 and vertical perimeter 2q+2. Let P ∈ DCpq . In what follows, we refer to certain points of P as W; N; N ; M; E, and E . Since the meaning of W; N; N ; E and E is
84
S. Fereti"c / Journal of Statistical Planning and Inference 101 (2002) 81–94
probably clear from Fig. 2, it only remains to say what is M : M is the point which, together with the “pole” W , cuts the border of P into two components, each of which is of length p + q + 2. With the polyomino P we now associate a certain path-pair ’1 (P). To obtain that path-pair, we =rst manipulate P’s boundary as prescribed here: • reMect the “short” (N ; M )-section about the horizontal line through N and N , • reMect the “short” (M; E)-section about the vertical line through E and E , and • contract the segments [N; N ] and [E; E ] by one lattice unit each. P Let M be the lower endThis manipulation gives us a certain self-avoiding path P. P and let M be the upper endpoint of P. P Denote by r and s the paths whose point of P, step-set is {(1; 0); (0; 1)}, and whose trajectories are the (W; M )- and (W; M )-sections P respectively. And then, de=ne ’1 (P) to be the ordered pair (r; s). See Fig. 3. of P, Let Apq be the set of all ordered pairs (r; s) which have the properties: (a) (b) (c) (d) (e)
r r r r r
and s are paths on the step-set {(1; 0); (0; 1)}; and s have the same origin. But except in the origin, r and s do not meet; begins with a horizontal step, and s with a vertical step; and s are of length p + q + 1 each; and s jointly have 2p + 1 horizontal steps and 2q + 1 vertical steps.
As may easily be seen, ’1 maps the set DCpq into Apq . What is more, we have: 2 Proposition 1. ’1 is a bijection from DCpq to Apq . Proof. Let us describe the mapping ’−1 1 . Let (r; s) be an element of Apq . The paths r and s start at the same point and end ◦ on the same line of direction −45 . However, r ends lower than s. So r makes more (1; 0)-steps than s does, and s makes more (0; 1)-steps than r does. In other words, r makes at least p + 1 (1; 0)-steps, and s makes at least q + 1 (0; 1)-steps. Let us express the path r as the product r = r1 r2 , where r1 ends with the (p + 1)th (1; 0)-step of r. Then, let us change every (1; 0)-step of r2 into a (−1; 0)-step. Instead of r2 , we now have a certain new path r2 . And then we concatenate—in that order—the path r1 , a vertical step and (a copy of) the path r2 . Once concatenated, those three objects form one path, say r . Then we turn to the path s. Here again we begin with a factorization: let s = s1 s2 , where s1 ends with the q+1th (0; 1)-step of s. Then, let s2 be what the path s2 becomes when we replace each (0; 1)-step of its by a (0; −1)-step. Finally, let s be the path produced by concatenating—in that order—the path s1 , a horizontal step and (a copy of) the path s2 . 2 Apropos, we grant “translation-proofness” not only to polyominoes, but also to lattice paths and path-pairs.
S. Fereti"c / Journal of Statistical Planning and Inference 101 (2002) 81–94
85
Fig. 3. The bijection ’1 .
The path r1 lies too low to intersect r2 , and even more too low to intersect s2 . Next, r1 and s1 do not intersect because their “superpaths” r and s do not intersect either. By making such observations, one eventually establishes that the paths r and s together enclose one dc-polyomino. Well, that dc-polyomino is ’−1 1 (r; s).
86
S. Fereti"c / Journal of Statistical Planning and Inference 101 (2002) 81–94
3. From pairs of non-crossing paths to “festoons”3 In this section, the path-pairs will lose the no-intersections property, and will gain the common-endpoint property. To experts, these changes will resemble Chottin and Cori’s Catalan decomposition (Chottin and Cori, 1982) (even though the Catalan decomposition speaks of words on a two-letter alphabet). Let (r; s) be an element of Apq . Let M be the endpoint of r and let M be the endpoint of s. By the de=nition of Apq , the points M and M lie on the same line ◦ of direction −45 , and M lies lower than M does. Hence there exists k ∈ N such that M = M + (−k; k). Actually, k is an odd number; this follows from the facts that the paths r and s have a common origin and jointly make an odd number of (e.g.) horizontal steps. Let k = 2j + 1. For i from 0 to j, let Di be the last among those vertices D of r for which D + (−i; i) is a vertex of s. And let Ei = Di + (−i; i). Each Di is the left end of a (1; 0)-step of r, while each Ei is the lower end of a (0; 1)-step of s. We now proceed as follows: • On the path r, we delete the initial (horizontal) step, and we convert the steps beginning at D1 ; : : : ; Dj from horizontal into vertical ones. (If j = 0, no steps are converted.) • On the path s, we delete the initial (vertical) step, and we convert the steps beginning at E1 ; : : : ; Ej from vertical into horizontal ones. Let t be the path resulting from r, and let u˜ be the path resulting from s. We put ’2 (r; s) = (t; u), where u is that copy of u˜ which has the same origin as t. See Fig. 4. Clearly, t has j + 1 horizontal steps less than r, while u has j horizontal steps more than s. Since r had 2j + 1 horizontal steps more than s, this means that t and u have the same number of horizontal steps. And that “same number” is p, because on the road from (r; s) to (t; u) one horizontal step has been lost, while the other 2p have survived (partly in their original positions and partly not). Similarly, each of the paths t and u has exactly q vertical steps. Let Bpq be the set of all ordered pairs (t; u) which have the properties: (1) t and u are paths on the step-set {(1; 0); (0; 1)}; (2) t and u have the origin in common, have the terminus in common, make p horizontal steps each, and make q vertical steps each. Proposition 2. ’2 is a bijection from Apq to Bpq . Proof. We have already seen that ’2 maps Apq into Bpq . Now we shall describe the mapping ’−1 2 . 3 A festoon (so named by Flajolet (1991)) is a path-pair (t; u) whose components have coinciding origins, and also have coinciding termini.
S. Fereti"c / Journal of Statistical Planning and Inference 101 (2002) 81–94
87
Fig. 4. The bijection ’2 .
Given a path-pair (t; u) ∈ Bpq , the =rst thing to do is to determine the largest j ∈ N ∪ {0} which has the property: there exist a vertex F of t and a vertex G of u such that G = F + (j; −j). For i from 1 to that largest j, let Fi be the =rst (i.e., closest to the origin) vertex of t which, if translated by (i; −i), would land on the path u. And let Gi = Fi + (i; −i). Each Fi is the upper end of a (0; 1)-step of t, while each Gi is the right end of a (1,0)-step of u. We now install an extra (1; 0)-step at the beginning of t, and an extra (0; 1)-step at the beginning of u. Also, on the path t, we replace the steps ending at F1 ; : : : ; Fj by horizontal steps. On u, we replace the steps ending at G1 ; : : : ; Gj by vertical steps. The path resulting from t (resp. u) is then the =rst (resp. second) component of ’−1 2 (t; u).
4. The number of dc-polyominoes with given perimeter(s) So, how many dc-polyominoes have horizontal perimeter equal to 2p+2 and vertical perimeter equal to 2q + 2? By Propositions 1 and 2, the set of such polyominoes has the same cardinality as the set Bpq . The elements of Bpq have two components, each of which is a lattice path with p horizontal and q vertical steps. There are ( p+q p ) ways ) ways to choose the second component. to choose the =rst component and, say, ( p+q q p+q )( The cardinality of Bpq is therefore ( p+q p q ).
88
S. Fereti"c / Journal of Statistical Planning and Inference 101 (2002) 81–94
We have got the following result: p+q Theorem 1. For p; q ∈ N ∪ {0}; there are ( p+q p )( q ) dc-polyominoes with horizontal perimeter 2p + 2 and vertical perimeter 2q + 2.
As a temporary measure, the horizontal and vertical perimeters will now be lumped together. So, how about the number of dc-polyominoes with perimeter 2n + 4 (n ∈ N ∪ {0})? Nice and easy. Let DCn be the set of all such polyominoes, and let |DCn | be the cardinality of DCn . Theorem 1 and Vandermonde’s convolution give n n 2n |DCn | = | DCi; n−i | = = : i n − i n i=0 i=0 n
n
Let us state this result as a theorem. Theorem 2. For n ∈ N∪{0}; there are ( 2n n ) dc-polyominoes with total perimeter 2n+4. Of course, a convolution is not a bijection, and Theorem 2 still wants a bijective proof. But this wanted proof will soon be complete, because Vandermonde’s convolution has a classical bijective bypass. Let Bn be the set of all ordered pairs (t; u) which have the properties: (1) t and u are paths on the step-set {(1; 0); (0; 1)}; (2-) t and u have the origin in common, have the terminus in common, and make n steps each. Just as DCn has the partition {DCi; n−i : i = 0; 1; : : : ; n}; Bn has the partition {Bi; n−i : i = 0; 1; : : : ; n}. If we add this fact to Propositions 1 and 2, we see that ’2 ◦ ’1 induces a bijection between DCn and Bn . Given (t; u) ∈ Bn , let ’3 (t; u) be the path (and not path-pair) t · u , where u stands for the mirror image of u with respect to the line y = x. Naturally, the horizontal steps of u , the vertical steps of u, and the vertical steps of t are all equal in number. The horizontal steps of ’3 (t; u) = t · u are therefore equal in number to all steps of t. So ’3 (t; u) makes n horizontal steps. In addition, ’3 (t; u) is of length 2n and hence makes n vertical steps too. See Fig. 5. Let Cn be the set of all lattice paths z which have the property: the steps of z are 2n in all, and n of them are (1; 0)-steps, while the other n are (0; 1)-steps. Proposition 3. ’3 is a bijection from Bn to Cn . Proof. Informally speaking, ’−1 3 halves a path, and then reMects the second half about the line y = x. Now we have bijections from DCn into Bn and from Bn into Cn . It being obvious that |Cn | = ( 2n n ), our bijective proof of Theorem 2 is =nished.
S. Fereti"c / Journal of Statistical Planning and Inference 101 (2002) 81–94
89
Fig. 5. The bijection ’3 .
5. A formula for the generating function Dc To begin with, let us recall that in the Introduction we wrote the following: in this paper, the perimeter generating function (gf) for dc-polyominoes is denoted Dc, and has two variables, x and y. The variable x relates to horizontal perimeter, and the variable y to vertical perimeter. Next, let us associate gf’s with path-families too. Denition 2. Let S be a family of paths on the step-set {(1; 0); (0; 1)}. Our gf for S—we denote it gf(S)—has the same variables as Dc, the only diSerence being that the variables now relate to steps: x relates to (1; 0)-steps, and y to (0; 1)-steps. We de=ne gf(S) also when S has elements of the form (v; w), where v and w are paths on the step-set {(1; 0); (0; 1)}. Once again, gf(S) has two variables, x and y. The variable x keeps record of the total number of (1; 0)-steps. (On the other hand, x ignores whether, in a path-pair (v; w), the (1; 0)-steps are located two in v and six in w, or =ve in v and three in w.) The role of y is analogous.
90
S. Fereti"c / Journal of Statistical Planning and Inference 101 (2002) 81–94
Let DC be the set of all dc-polyominoes. Let A be the set of all path-pairs (r; s) which possess the following properties: (a) (b) (c) (d-) (e-)
r and s are paths on the step-set {(1; 0); (0; 1)}; r and s have the same origin. But except in the origin, r and s do not meet; r begins with a horizontal step, and s with a vertical step; r and s are of the same length; r and s jointly have an odd number of horizontal steps, as well as an odd number of vertical steps.
The set DC is a disjoint union (over p; q ∈ N ∪ {0}) of the sets DCpq . Likewise, the set A is a disjoint union of the sets Apq (p; q ∈ N ∪ {0}). Recalling Proposition 1, in which we learned that |DCpq | = |Apq |, we readily obtain Dc =
∞ p;q=0
= xy
| DCpq |x2p+2 y2q+2
∞ p;q=0
| Apq |x2p+1 y2q+1 = xy
∞ p;q=0
gf(Apq ) = xy·gf(A):
(2)
Now look again at the de=nition of A. The property (c) has a twin, viz. (c ) r begins with a vertical step, and s with a horizontal step. Let A be the set of all path-pairs (r; s) which possess the properties (a); (b); (c ), (d-) and (e-). For (r; s) ∈ A, let ’4 (r; s) = (s; r). The following proposition is obvious. Proposition 4. ’4 is a bijection between A and A . To be sure, ’4 preserves the numbers of horizontal and vertical steps. So we have gf(A) = gf(A ). Let E be the set of all path-pairs (r; s) which have the four properties (a); (b), (d-) and (e-). The set E is the union of two disjoint blocks: A and A . Hence gf(E) = gf(A) + gf(A ) = 2gf(A). Plugging this into (2) gives xy Dc = gf(E): (3) 2 Next, let B be the set of all path-pairs (t; u) whose components have coinciding origins, and also have coinciding termini. (Thus, B is the set of those creatures which, as we learned in Section 3, answer to the name of festoons.) Now, just as the set A is a disjoint union of Apq ’s, the set B is a disjoint union of Bpq ’s. Using (2) and Proposition 2, we quickly =nd Dc = xy
∞ p;q=0
= x2 y2
| Apq |x2p+1 y2q+1
∞ p;q=0
| Bpq |x2p y2q = x2 y2 ·gf(B):
(4)
S. Fereti"c / Journal of Statistical Planning and Inference 101 (2002) 81–94
91
Taking a cue from the literature (such as, e.g., Gessel (1980, Section 6)), now we shall concatenate and conquer. Let F be the set of all path-pairs (v; w) which possess the following properties: (a) (b-) (d-) (e-)
v and w are paths on the step-set {(1; 0); (0; 1)}; v and w have the same origin; v and w are of the same length; v and w together have an odd number of horizontal steps, and also an odd number of vertical steps.
Given (t; u) ∈ B and (r; s) ∈ E, let v be the concatenation of t with a copy of r, and let w be the concatenation of u with a copy of s. Then let ’5 ((t; u); (r; s)) = (v; w). See Fig. 6. Because of their starting together and ending together, t and u perforce have an even sum of frequencies of (1; 0)-steps. By the de=nition of E, on the other hand, for r and s the analogous sum is odd. So when t; u; r and s join their forces, as they do in (v; w), the total frequency of (1; 0)-steps is an odd number. The (0; 1)-steps behave likewise, and it is altogether easy to see that (v; w) is an element of F. Proposition 5. ’5 is a bijection from B × E to F. Proof. Informally speaking, ’−1 cuts a path-pair (v; w) ∈ F at the last vertex which 5 v and w have in common. The above proposition implies 4 gf(F) = =
(v;w)∈F
(t;u)∈B (r; s)∈E
gf(v; w) =
(t;u)∈B (r; s)∈E
gf(tr; us)
gf(t; u)gf(r; s) = gf(B)gf(E);
which combines with (3) and (4) into Dc2 =
x3 y3 x3 y3 gf(B)gf(E) = gf(F): 2 2
(5)
Now we de=ne one family of paths (and not of path-pairs). This family—we call it G—contains a path z iS the contents of z are: an odd number of (1; 0)-steps, an odd number of (0; 1)-steps, and nothing else. For (v; w) ∈ F, let ’6 (v; w) be the concatenation of v with a copy of w. The following proposition is very easy. 4 Instead of gf({(v; w)}); gf({(tr; us)}); : : : ; we are going to use the simpler notation gf(v; w); gf(tr; us); : : :
92
S. Fereti"c / Journal of Statistical Planning and Inference 101 (2002) 81–94
Fig. 6. The bijection ’5 .
Proposition 6. ’6 is a bijection from F to G. The above proposition leads to gf(G) = gf(z) = gf(vw) = z∈G
(v;w)∈F
(v;w)∈F
gf(v; w) = gf(F);
S. Fereti"c / Journal of Statistical Planning and Inference 101 (2002) 81–94
93
which changes (5) into x3 y3 gf(G): 2 Let I be the set of all paths on step-set {(1; 0); (0; 1)}. Clearly, Dc2 =
gf(I) = =
∞ n=0 ∞ n=0
(6)
gf({z ∈ I: z has a total of n steps}) (x + y)n =
1 : (1 − x − y)
(7)
Let H be the set of all z ∈ I which have an odd number of (1; 0)-steps. Using (7), we quickly obtain x 1 1 1 = gf(H) = · − : (8) 2 1−x−y 1+x−y (1 − x − y)(1 + x − y) Now, by its de=nition (given above), G is the set of all z ∈ H which have an odd number of (0; 1)-steps. It therefore follows from (8) that x x 1 − gf(G) = · 2 (1 − x − y)(1 + x − y) (1 − x + y)(1 + x + y) 2xy = (1 − x − y)(1 + x − y)(1 − x + y)(1 + x + y) 2xy = : (9) 1 − 2x2 − 2y2 + (x2 − y2 )2 Theorem 3. The perimeter gf for directed convex polyominoes is given by x2 y2
Dc =
1 − 2x2 − 2y2 + (x2 − y2 )2
:
Proof. Substitute (9) into (6) and then take the square root. Acknowledgements I would like to thank Professors Dragutin Svrtan and Darko Veljan for their inMuential comments. Thanks are justly extended to the referee, who oSered a helpful critique. I am very grateful to M.Sc. Jasminka Mezak, who generously transformed my felt-tip drawings into computer =les. References Bousquet-M(elou, M., 1992. Une bijection entre les polyominos convexes dirig(es et les mots de Dyck bilatUeres. RAIRO Inform. Th(eor. Appl. 26, 205–219.
94
S. Fereti"c / Journal of Statistical Planning and Inference 101 (2002) 81–94
Bousquet-M(elou, M., Viennot, X.G., 1992. Empilements de segments et q-(enum(eration de polyominos convexes dirig(es. J. Combin. Theory Ser. A 60, 196–224. Bousquet-M(elou, M., 1994. Codage des polyominos convexes et e( quations pour l’(enum(eration suivant l’aire. Discrete Appl. Math. 48, 21–43. Bousquet-M(elou, M., F(edou, J.-M., 1995. The generating function of convex polyominoes: the resolution of a q-diSerential system. Discrete Math. 137, 53–75. Bousquet-M(elou, M., 1996. A method for the enumeration of various classes of column-convex polygons. Discrete Math. 154, 1–25. Bousquet-M(elou, M., Guttmann, A.J., 1997. Enumeration of three-dimensional convex polygons. Ann. Combin. 1, 27–53. Chottin, L., Cori, R., 1982. Une preuve combinatoire de la rationalit(e d’une s(erie g(en(eratrice associ(ee aux arbres. RAIRO Inform. Th(eor. Appl. 16, 113–128. ( Dubernard, J.-P., Dutour, I., 1996. Enum( eration de polyominos convexes dirig(es. Discrete Math. 157, 79–90. Dutour, I., 1996. Grammaires d’objets: e( num(eration, bijections et g(en(eration al(eatoire. Ph. D. Thesis, LaBRI, Universit(e Bordeaux I. Flajolet, P., 1991. P(olya festoons. Research Report No. 1507, INRIA Rocquencourt. Gessel, I., 1980. A noncommutative generalization and q-analog of the Lagrange inversion formula. Trans. Amer. Math. Soc. 257, 455–482. Guttmann, A.J., Enting, I.G., 1988a. The size and number of rings on the square lattice. J. Phys. A: Math. Gen. 21, L165–L172. Guttmann, A.J., Enting, I.G., 1988b. The number of convex polygons on the square and honeycomb lattices. J. Phys. A: Math. Gen. 21, L467–L474. Lin, K.Y., Chang, S.J., 1988. Rigorous results for the number of convex polygons on the square and honeycomb lattices. J. Phys. A: Math. Gen. 21, 2635–2642.