Formulae and Growth Rates of Animals on Cubical and Triangular Lattices

Mira Shalah

Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 Formulae and Growth Rates of Animals on Cubical and Triangular Lattices

Research Thesis

Submitted in partial fulfillment of the requirements for the degree of Doctor of Philosophy

Mira Shalah

Submitted to the Senate of the Technion — Israel Institute of Technology Elul 5777 Haifa September 2017

Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 This research was carried out under the supervision of Prof. Gill Barequet, at the Faculty of Computer Science.

Some results in this thesis have been published as articles by the author and research collaborators in conferences and journals during the course of the author’s doctoral research period, the most up-to-date versions of which being:

• Gill Barequet and Mira Shalah. Polyominoes on Twisted Cylinders. Video Review at the 29th Symposium on Computational Geometry, 339–340, 2013. https://youtu.be/MZcd1Uy4iv8.

• Gill Barequet and Mira Shalah. Automatic Proofs for Formulae Enu- merating Proper . In Proceedings of the 8th European Conference on Combinatorics, Graph Theory and Applications, 145–151, 2015. Also in Video Review at the 31st Symposium on Computational Geometry, 19–22, 2015. https://youtu.be/ojNDm8qKr9A. Full version: Gill Barequet and Mira Shalah. Counting n-cell Polycubes Proper in n − k Dimensions. European Journal of Combinatorics, 63 (2017), 146–163.

• Gill Barequet, Gunter¨ Rote and Mira Shalah. λ > 4. In Proceedings of the 23rd European Symposium on Algorithms, 83–94, 2015. Full version: Gill Barequet, Gunter¨ Rote and Mira Shalah. λ > 4 : An improved lower bound on the growth constant of polyominoes, Communications of the ACM, 59 (2016), 88–95.

• Gill Barequet, Mira Shalah and Yufei Zheng. An Improved Lower Bound on the Growth Constant of . In Proceedings of The 22nd International Computing and Combinatorics Conference, 50–61, 2017.

Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 Acknowledgements

First and foremost, I would like to extend my sincere gratitude to my advisor, Prof. Gill Barequet, for guiding and mentoring over the past five years, raising me to be the person and researcher I am today. Throughout my studies, you have always inspired me with your creativity, intuition, vision, and positivity, all which had a tremendous impact on me. Thank you for always being there to encourage me and offer me your kind advice on many scientific, academic, and personal matters, for pushing me to peruse directions which were challenging, yet promising, at the same time, and for giving me the freedom, at times, to try other directions. Finally, thank you for teaching me, by means of example, to be committed, respectful, and patient towards my work. Expressions of gratitude are also in order for Prof. Gunter Rote, for his support of this research and the opportunity to learn first-hand from one of the top researchers in the field. Many of the results presented in this thesis would not have been possible without the support of the facilities and staff of both the Hasso Plattner Institute Future SOC Lab and the Technion’s Division of Computing and Information Systems. My time at the Technion gave me the opportunity to work with many amazing people who shared their wisdom, expertise and kind advice. I owe special thanks to Prof. Freddy Bruckstein, whose kindness and friendliness is only matched by his brilliance and enthusiasm. I also owe a lot of gratitude to Prof. Nader Bshouty, who was my temporary advisor when I started graduate school at the Technion, and whose advise and guidance were truly invaluable to me. I was also fortunate to have wonderful fellow peers around me. Special thanks to my friends Raeda, Majd and Areej, who were my office mates for five years combined, and to Nurit for all the enjoyable coffee breaks we shared. The journey towards becoming amongst the first Israeli-Arab women with a PhD in Computer Science was only possible thanks to the support and education I received from my school teachers and family, especially my parents, who always supported and believed in me, and who already at a very early age awoke in me the love of knowledge, the enjoyment of study, and the drive to success. Thank you for your love, patience, infinite dedication, and for the independence you trusted me with already at an early age. I am incredibly blessed to have you and my brothers Ramzy and Amir, my sisters Christina and Aml, my mother, father, brother, and sister in law Omaima, Eli, Rani and Lyan, and my dearest friends Suzan and Mariana. Thank you for your support, encouragement, and for standing by me and cheering me up through it all. I have been fortunate to begin my academic path as a student at the Etgar framework at the University of Haifa. I am forever indebted to the head of Etgar, Prof. Gadi Landau, for this educational experience, where I fell in love with Computer Science and my husband, soul mate, and best friend, Amir Abboud. Thank you Amir for your wisdom, patience, advice, scientific insight, love, and support, and for being a source of

Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 perspective, inspiration and happiness. This thesis is dedicated to you.

The generous financial support of the Technion, the Israeli Science Foundation, the Israeli Council for Higher Education, the Google Anita Borg Memorial Scholarship program, and the Nevai, Zelig, and Levy Family Fellowships, is gratefully acknowledged.

Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 Dedicated to my husband Amir Abboud, and my mom and dad, Najat and Zuhair Shalah

Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 Contents

List of Figures

Abstract 1

1 Introduction 3

2 Preliminaries 15 2.1 The Triangular Lattice ...... 15 2.2 The Twisted Cylinder ...... 15 2.3 Motzkin Path ...... 15 2.4 Concatenation of Lattice Animals ...... 16 2.5 Composition of Lattice Animals ...... 16 2.6 Cayley Trees ...... 17 2.7 Integer Partition ...... 17 2.8 Graph Isomorphism ...... 17

3 Polyominoes 19 3.1 Introduction ...... 19 3.2 Lower Bound ...... 19 3.2.1 Counting Polyominoes on Twisted Cylinders ...... 19 3.2.2 Method ...... 22

3.2.3 Computing λ27 ...... 25 3.2.4 Validity and Certification ...... 30 3.3 Upper Bound ...... 31 3.3.1 Polyominoes Viewed as Sequences of Twigs ...... 31 3.3.2 Mapping Lattice Animals to Binary Strings ...... 34 3.3.3 Klarner and Rivest’s Enhancement ...... 35 3.3.4 Improved Upper Bound ...... 39 3.3.5 Comparison of the Results ...... 42

4 Polyiamonds 47 4.1 Introduction ...... 47 4.2 Lower Bound ...... 47

Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 4.3 Upper Bound ...... 49 4.3.1 Number of Compositions ...... 49 4.3.2 Balanced Decompositions ...... 49 4.3.3 The Bound ...... 50

5 Polycubes 53 5.1 Introduction ...... 53 5.2 Overview of the Method ...... 56 5.2.1 Counting ...... 58 5.2.2 Distinguished Structures ...... 58 5.3 Inclusion-Exclusion Graph ...... 66 5.4 Counting Polycubes ...... 67 5.4.1 Trees ...... 68 5.4.2 Nontrees ...... 69 5.5 Proof of Main Theorem ...... 69 5.6 Results ...... 72

6 Conclusion and Open Problems 75 6.1 Polyominoes ...... 75 6.2 Polyiamonds ...... 79 6.3 Polycubes ...... 79

A Appendix 83 A.1 Certified Computations - Chapter 3 ...... 83

A.2 The Functions Wi(x, y) - Chapter 3 ...... 84 A.3 Disconnected Structures - Chapter 5 ...... 87

Hebrew Abstract i

Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 List of Figures

1.1 Polyiominoes of sizes 1 ≤ n ≤ 4...... 4 1.2 Polyiamonds of sizes 1 ≤ n ≤ 5 ...... 5

2.1 Polyiamonds on the triangular lattice ...... 15 2.2 A twisted cylinder of perimeter W = 5. The wrap-around connections are indicated; for example, cells 1 and 2 are adjacent...... 16 2.3 A Motzkin path of length 7...... 16 2.4 The three Cayley trees of size 3...... 17

3.1 A embedded on a twisted cylinder ...... 20 3.2 Bottom: A snapshot of the boundary line (solid line) during the transfer- matrix calculation. The dashed line indicates two adjacent cells which are connected “around the cylinder,” where this is not immediately apparent. The boundary cells (top row) are shown darker. The numbers are the labels of the boundary cells. Middle: A symbolic encoding of the state. Top: the same state encoded as the Motzkin path (0,1,0,0,1,1,-1,1,0,-1,- 1,0,1,0,-1,0,-1)...... 21 3.3 The dependence between the different groups of ynew and yold...... 23

3.4 Extrapolating the sequence λW ...... 24 3.5 Front view of the “supercomputer” which we used. It is only a box of about 45 × 35 × 70 cm3...... 25 3.6 An unreachable state...... 26 3.7 The process of computing succ0 and succ1 for an integer index...... 27 3.8 Simplified pipeline of the successor computation...... 28 3.9 text ...... 28 3.10 A Motzkin path of length 29, its symbolic representation as a sequence of steps ‘0’, ‘+’, and ‘-’, and the associated bit pattern ...... 29 3.11 Results for W = 23,..., 27...... 30 3.12 Eden’s set of twigs E [KR73, Figure 3] ...... 32 3.13 A spanning tree generated by Eden’s method [KR73, Figure 4] . . . . . 33 3.14 A snapshot of the hexagonal lattice. Cells a and b adjoin both cells i and j [Lun72a, Figure 11] ...... 35 3.15 The eight L-contexts of cell u [KR73, Figure 6] ...... 36

Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 3.16 The set of twigs L [KR73, Figure 7] ...... 36 3.17 A single living cell...... 37

3.18 [KR73, Figure 8], LP = (L5,L4,L3,L5,L1,L1,L2,L1,L4,L1). Let ui be

the cell visited by the algorithm at step i, and wi and yi be the cells

connected to ui on the right and above it, respectively. The cell u1 (the left-most cell in the bottom row of P ) is assigned the label 1 and the

twig L1 since w1, y1 ∈ P . Note that in order to assign a twig ` ∈ L to ◦ u2, ` needs to be rotated by 90 and reflected around the x axis. Note

also that u5 is assigned the twig L1 since the cell on its right was already discovered at the forth iteration of the algorithm and assigned the label 8. 38 3.19 Results obtained by Klarner and Rivest [KR73, Table 1] ...... 39

3.20 The tree modeling the algorithm that generates the set Ci. The root r is a twig with one open cell and four context cells. For i, j = 1,..., 5,

Ti = Li = Li ∗ r, and Ti,j = Lj ∗ Ti. The twig T1 is a leaf because it has no open cells...... 40 3.21 Our results ...... 41 3.22 The only two twigs with two dead cells and no open cells ...... 42

3.23 Concatenation of L2 and L3...... 44

3.24 Concatenation of L3 and L3...... 45 3.25 A ...... 45

4.1 Possible concatenations of polyiamonds ...... 48

5.1 The diagonal formulae Peard and Gaunt [PG95] conjectured (without proof) for DX(n, n − k) up to k = 6, and the seventh diagonal formula DX(n, n − 7) Luther and Mertens [LM11] conjectured (also without proof). 54 5.2 A P , its corresponding adjacency graph γ(P ), and the spanning trees of γ(P )...... 56 5.3 An illustration of the possible repetitions of edge labels in a spanning tree of an n-cell polycube that is proper in n−4 dimensions. In (a), the three edges are labeled with three different labels i, j, ` ∈ {1, . . . n − 4}, each of which would thus appear twice in T . In (b) two of the three edges are labeled with the same label i, and one edge with a different label j. As a result, i would appear three times in T and j would appear twice. Finally, in (c), the three edges are labeled with the same label i, and thus i would have a repetition of 4 in T . These are all the possible combinations of repeated edge labels for the n−4 case, which are equivalent to Π(3), as shown above...... 58 5.4 (a–f) A few distinguished structures for k=4 (note that (d) is discon- nected); (g) and (h) are cycle structures. A dotted line is drawn between every pair of neighboring cells and around every pair of coinciding cells. 59

Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 5.5 (a) A disconnected distinguished structure which has three connected

components s1, s2, s3. (b–d) Some other possible configurations of its

connected components s1, s2, s3...... 60

5.6 All members of DS2...... 61 5.7 A construction which yields the maximum possible number of unique 0 edge labels. `i and `i form the structure shown in Figure 5.6(c), and every remaining occurrence of `i creates another copy of the same structure, resulting in a new unique label...... 62

5.8 A sequence of three rooted trees τ1, τ2, τ3 (roots are shown in black and edge labels and directions are omitted for simplicity) attached to the vertices of the structure shown in Figure 5.6(a)...... 63 5.9 An example of a distinguished structure σ with c=4 connected components

s1, . . . , s4. Each connected component si has a connector κi, shown in

white. κ1 is attached to the root of τ1, and a sequence of |σ|−(c−1) = 10

rooted trees τ1, . . . , τ10 is attached to the rest of the vertices of σ. The

three additional distinguished roots r, r1, r2 are shown in gray. τ1 must always have at least two distinguished roots (which might coincide). In

this example, τ1 has two distinguished roots: the original root which is

attached to κ1, and r. Both τ7 and τ10 have two distinguished roots as

well (r2 and r1, respectively)...... 64

5.10 r1 ∈/ S2, so κ2 is attached to r1; r2 ∈ S3, so κ3 is attached to r; r is

updated by r := r2. Finally, κ4 is attached to r, yielding the tree shown above...... 65 5.11 The six different configurations of the structure shown in Figure 5.4(a). 67 5.12 A snapshot of the IE graph for k =4...... 68 5.13 Results for k = 3, 4...... 72 5.14 Continuation of Table 5.13. Results for k = 5...... 73

W  6.1 Plots of i, y [i]) (0 ≤ i ≤ MW −1) for W = 10, 11, 12...... 76 3 6.2 Two polyominoes P1 and P2 that can be composed in a non-linear (O(L )) number of ways...... 80

A.1 (a) A disconnected structure σ; (b) A configuration of σ which contains an occurrence of the structure given in Figure 5.6(a) (shown in gray); (c) Another configuration of σ which does not contain such an occurrence. . 88

Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 Abstract

A polyomino of size n consists of n squares joined along their edges. The popular computer game features polyominoes of size 4. Polyominoes can also be considered on the two-dimensional triangular lattice, or in higher dimensions, where they are called polyiamonds and polycubes, respectively. In general, a connected set of cells on a lattice is called a lattice animal. Lattice animals are well-known combinatorial objects, studied both in pure and , and in various other fields, such as computational geometry and statistical physics, where they play a fundamental role in modeling branched polymers and the analysis of percolation processes. The focus of this work is on fundamental questions along the lines of: how many lattice animals of size n are there? In most cases, even for the relatively simple case of the two-dimensional square lattice, a simple closed formula for this number is not known, and so other results are sought: a generating function, an estimation of their asymptotic growth rate, an efficient counting algorithm, and so on. Finding A(n), the number of polyominoes of size n, is one of the “holy grails” of enumerative combinatorics. In this thesis, we use an interplay between computational methods, on the one hand, and analytical and theoretical methods, on the other hand, to tackle these problems in several directions:

Polyominoes We investigate a fundamental question concerning polyominoes, namely,

what is their growth constant λ = limn→∞ A(n + 1)/A(n), also known as “Klarner’s constant.” Previously, the best known lower and upper bounds on λ were roughly 3.98 and 4.65, respectively, and so not even a single decimal digit of λ was known. Using high computing resources, we improve the upper bound to about 4.5252, and more importantly, we show that λ > 4.00253, thereby settling the long-standing problem of proving formally that the leading decimal digit of λ is 4.

Polyiamonds We prove that λT , the growth constant of polyiamonds, is between 2.8424

and 3.6050, narrowing the known gap between the lower and upper bounds on λT from roughly 1.7 to 0.76.

1

Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 Polycubes We develop a theoretical framework for computing the explicit formula enumerating polycubes with n cubes that span n−k dimensions, for a fixed value of k. Besides the interest in the number of these simple combinatorial objects, known as proper polycubes, these polycubes are key for understanding the behavior of high-dimensional polycubes. We use this framework to implement a computer program which reaffirms the known formulae for k = 2, 3, and proves rigorously, for the first time, the formulae for k = 4, 5. The main contribution of this framework is a proof of a conjecture about the general form of the formula for a general value of k.

Our work provides and improves upon some of the few rigorously known results in this area, some of which could have been so far derived only by non-rigorous methods and estimates. It also showcases the power of pairing computers with theory to tackle fundamental problems in combinatorics.

2

Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 Chapter 1

Introduction

Polyominoes are edge-connected sets of squares on the square lattice. Examples of some small polyominoes are shown in Figure 1.1. The size of a polyomino is the number of squares it contains. Polyominoes were introduced at the beginning of the 20th century, but they became much more popular after the publication of the pioneering book of Solomon Golomb titled “polyominoes” [Gol94], then by ’s columns in Scientific American, and finally by numerous research papers of David Klarner. In fact, the term “polyomino” (a play on the words “poly” and “”) was invented by Golomb himself. Counting polyominoes by size has since become a popular fascinating combinatorial problem, and polyominoes themselves became one of the most popular subjects in mathematical recreations. Polyominoes have also been considered on the two-dimensional triangular and hexagonal lattices, or in higher dimensions, where they are called polyiamonds, polyhexes, and polycubes, respectively. Polyiamonds are edge-connected clusters of equilateral triangles. Figure 1.2 shows polyiamonds of size up to 5. Polyhexes are edge-connected clusters of hexagons, and polycubes are facet-connected sets of d-dimensional unit cubes, where connectivity is through (d−1)-dimensional faces. In general, especially in the literature of statistical physics, connected sets of cells on any lattice are called “lattice animals.” To understand this term, consider, for example, the dual graph of the hypercubic lattice. The dual entities of a cube and an adjacency relation of two cubes are a cell and an edge (bond) connecting two cells, respectively. An “animal” is a connected subgraph (cluster) of cells. The focus of this thesis is on square, triangular, and cubical lattice animals, or namely, polyominoes, polyiamonds, and polycubes, respectively. When considering lattice animals simply as connected subsets of cells on a lattice, there are infinitely-many lattice animals of any size. Therefore, two lattice animals are usually considered identical if they only differ by their relative location, that is, if one can be obtained by a translation of the other. The family of fixed lattice animals is the set of equivalence classes of animals under this relation. Throughout this thesis, we only consider “fixed” lattice animals, and so we omit this adjective in the sequel. The fundamental combinatorial problem concerning all lattice animals is “How many

3

Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 (a) n = 1: The single monomino (b) n = 2: The two dominoes

(c) n = 3: The six triominoes

(d) n = 4: The nineteen tetrominoes (Tetris pieces)

Figure 1.1: Polyiominoes of sizes 1 ≤ n ≤ 4

4

Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 (a) n = 1: Two moniamonds (b) n = 2: Three diamonds

(c) n = 3: 6 triamonds

(d) n = 4: 14 tetriamonds

(e) n = 5: 36 pentiamonds

Figure 1.2: Polyiamonds of sizes 1 ≤ n ≤ 5

5

Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 animals with n cells are there?” This problem seems to have originated in parallel in two different communities, more than half a century ago. In statistical physics, Temperley [Tem56] investigated the mechanics of macro-molecules, and Broadbent and Hammersley [BH57] studied percolation processes. In mathematics, Harary [Har60] composed a list of unsolved problems in the enumeration of graphs, and Eden [Ede61] analyzed cell growth processes. Thus, besides being a pure mathematical problem, enumeration of lattice animals has a broad range of applications to many other problems; it arises in the graph-theoretic treatment of the cell growth problem [Har67], the theory of chemical graphs [DH83, FGSW94, LI79, MSW+90], the theory of percolation [GSR76, SG76], and even cryptography [SE05], and has, as a result, attracted much attention in the mathematical literature as well as in the literature on physics. However, despite serious efforts over the last 50 years, the counting problem is far from being solved. Even for its simplest instance of counting polyominoes, not much is known, and much less is known for higher dimensions or other lattices. Counting polyominoes is listed in The Open Problem Project [opp] as one of the fundamental open problems in combinatorial geometry. In physics, chemistry, and materials science, percolation theory deals with the movement and filtering of fluids through porous materials, such as water flowing through coffee grains or soil. Giving it a mathematical model, the theory describes the behavior of connected clusters in random graphs. Suppose that a unit of liquid L is poured on top of some porous material M. What is the chance that L makes its way through M and reaches the bottom? An idealized mathematical model of this process is a two- or three-dimensional grid of vertices (“sites”) connected with edges (“bonds”), where each bond is independently open (or closed) for liquid flow with some probability p. In 1957, Broadbent and Hammersley [BH57] investigated solute diffusing through solvent, molecules penetrating a porous solid, and other similar processes, representing space as a lattice with two distinct types of cells, and asked what is the probability that a path consisting of open bonds exists from the top to the bottom, for a fixed value of p and the size of the grid tending to infinity. This problem, called bond percolation, has been studied intensively by mathematicians and physicists since then. The symbol A(n) usually denotes the number of polyominoes of size n. Thus, A(1)=1, A(2) = 2, A(3) = 6, and A(4) = 19. See sequence A001168 in the On-line Encyclopedia of Integer Sequences (OEIS) [oei]. Similarly, the number of polycubes of size n in d

dimensions is usually denoted by Ad(n), and so, A(n) = A2(n). In the same manner, we let T (n) denote the number of polyiamonds of size n (sequence A001420 [oei]), and H(n) denote the number of polyhexes of size n (sequence A000228 [oei]). To-date, no formula

is known for T (n), H(n), or Ad(n), for any fixed value of d > 1, let alone in the general case.

Enumeration Data Since no analytic formula for the number of animals is yet known for any nontrivial lattice, a great portion of the research has so far focused on efficient

6

Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 algorithms for counting animals on lattices, primarily on the square lattice. Researchers have suggested efficient back-tracking [ML92, Red81] and transfer-matrix [Con95, Jen03] algorithms for computing A(n) for a given value of n. These methods are based on explicitly or implicitly enumerating all polyominoes. Jensen also adapted the latter algorithm for polyiamonds [ibid., p. 173], and determined elements of the sequence T (n) up to n = 75 [Gut09, p. 479]. The latter algorithm was also adapted by Barequet et al. [BMRR06] and in Chapter 3 for counting polyominoes on so-called twisted cylinders (see Chapter 2). Earlier values of the sequence T (n) were given by Lunnon [Lun72b] up to size 16, by Sykes and Glen [SG76] up to size 22,1 and by Aleksandrowicz and Barequet [AB09] (extending Redelmeier’s polyomino-counting algorithm [Red81]) up to size 31. On the other hand, the sequence A(n) has been determined up to n = 56 by a parallel computation on an HP server cluster using 64 processors [Jen03]. Enumerating polycubes in higher dimensions is an even more elusive problem. Aleksandrowicz and Barequet [AB09] extended polycube counting by efficiently generalizing Redelmeier’s polyomino-counting algorithm [Red81] to higher dimensions. Lunnon [Lun72b], manually counted 3-dimensional polycubes (up to size 6) by considering symmetry groups. In a subsequent work, Lunnon [Lun75] computed the number of small-sized polycubes in up to 6 dimensions. The statistical-physics literature also provides extensive enumeration data of polycubes [GSR76, Mar90, MSW+90, Gau80], and the numbers of 3- to 9- dimensional polycubes have been determined up to size 19, 16, 15, 15, 14, 12, and 12, respectively [LM11]. Several mathematicians, notably Klarner, have investigated the problem theoretically. pn In 1967, Klarner [Kla67] showed that the limit λ := limn→∞ A(n) exists. The proof uses a standard concatenation argument, whereby pairs of polyominoes of size n are uniquely concatenated to produce a subset of all polyominoes of size 2n. Since then, λ has been called “Klarner’s constant.” Only in 1999, Madras [Mad99] proved the stronger statement that the asymptotic growth rate in the sense of the limit

λ = limn→∞ A(n + 1)/A(n) exists. The proof uses a novel pattern-frequency argument. Estimating the value of λ is one of the central problems in the field. Its exact value has

remained elusive for many years. The same is true for λT = limn→∞ T (n + 1)/T (n), the

growth constant of polyiamonds, and λd = limn→∞ Ad(n+1)/Ad(n), the growth constant pn of d-dimensional polycubes, which also exist and are equal to the limits limn→∞ T (n) pn and limn→∞ Ad(n), respectively [Mad99]. In the literature of statistical physics, the term free energy corresponds to the natural logarithm of λ. Sykes and Glen [SG76] were the first to observe that A(n) grows asymptotically like Cλnnθ, for some constants C > 0 and θ ≈ −1. λ also plays

1 Note that in this reference the lattice is called “honeycomb” (hexagonal) and the terms should be doubled. The reason for this is that the authors actually count clusters of vertices on the hexagonal lattice, whose connectivity is the same as that of cells on the triangular lattice, with no distinction between the two possible orientations of the latter cells. This is why polyiamonds are often regarded in the literature as site animals on the hexagonal lattice, and polyhexes (cell animals on the hexagonal lattice) are regarded as site animals on the triangular lattice, which sometimes causes confusion.

7

Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 a fundamental role in the study of the collapse transition which branched polymers undergo in dilute solutions at high temperatures. In physics, a field is an entity, each of whose points has a value which depends on location and time. Lubensky and Isaacson [LI79] developed a field theory of branched polymers in the dilute limit, using statistics of lattice animals (which are important in the theory of percolation) to imply when a solvent is good or bad for a polymer. Derrida and Herrmann [DH83] investigated two-dimensional branched polymers by looking at lattice animals on the square lattice and studying their free energy. Flesia et al. [FGSW94] made the connection between collapse processes to percolation theory, relating λ to the free energy in the processes. Based on interpolation methods applied to the known values of the sequences A(n) and T (n), it is estimated, but has not been proven, that λ ≈ 4.0625696±0.0000005 [Jen03]

and that λT = 3.04 ± 0.02 [SG76]. Setting good bounds on these constants is a hard and challenging problem in enumerative combinatorics.

Bounding λ from below There have been several attempts to bound λ from below, and some rigorous results are known. Here we give a brief summary of the methods used and the lower bounds obtained:

• Eden seems to be the first to give a lower bound on λ. In 1961, Eden [Ede61] showed that λ ≥ 3.14 by estimating the growth constant of polyominoes of size n Ph that have exactly aj cells in their jth row. Letting Fa1,a2,...,ah (n)( i=1 ai = n)

denote this subset of polyominoes of size n, and fa1,a2,...,ah (n) = |Fa1,a2,...,ah (n)|,

Eden observed that fa1,a2,...,ah (n) ≥ (a1 + a2 − 1)(a2 + a3 − 1) ... (ah−1 + ah − 1), since the product in the right hand side gives the number of polyominoes composed by stacking strips one on top of the other, and a strip of x cells can be joined above a strip of y cells in x + y − 1 ways. Klarner later improved this bound to λ ≥ 3.20 [Kla65], and subsequently to λ ≥ 3.72 [Kla67], by proving that

fa1,a2,...,ah (n) ≥ f(a1, a2)f(a2, a3) . . . f(ah−1, ah), which lead to a better (higher) lower bound.

Using a similar approach, Klarner [Kla67, p. 857] also showed that λT ≥ 2.13 by taking the square root of 4.54, a lower bound he computed for the growth constant of animals on the rhomboidal lattice, using the fact that a rhombus is made of two neighboring equilateral triangles.

• Read [Rea62] gave a method for computing the generating function for polyominoes whose cells occupy no more than r rows. For example, when r = 2, this generating function is (1+x2)/(1−2x+x4). In general, Read’s method gives rise to a rational

generating function pr(x)/qr(x), where pr and qr are relatively prime polynomials,

and qr(0) = 1. Thus, if the largest real root of qr(1/x) is αr, then it follows that ∞ α1 ≤ α2 ≤ · · · ≤ λ. It was also shown that the sequence {αi}i=1 converges to λ [KR73]. Therefore, this method leads to a procedure for improving the lower

8

Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 bound on λ indefinitely. However, the amount of work required by this method to improve the lower bound has remained prohibitive.

• Rands and Welsh [RW81] used renewal sequences in order to show that λ ≥ 3.57. Then, using a minor modification of the original method, they claimed to improve the lower bound to λ ≥ 3.735. The modified technique was subsequently applied by Jensen and Guttmann [JG00], and later by Jensen [Jen03], who used the values they computed for the sequence A(n) up to n=46 and n=56, to improve the bound to 3.903184 and 3.927378, respectively. However, Barequet et al. [BMRR06] pointed out that the modified technique was based on an incorrect assumption, and corrected the lower bound to λ ≥ 3.87565. Using renewal sequences, Rands and Welsh [RW81] also showed that

1/n λT ≥ (T (n)/(2(1 + λT ))) , (1.1)

for any n ∈ N. Substituting the easy upper bound λT ≤ 4 (see below) in the right-hand side of this relation, and knowing at that time elements of the sequence T (n) only for 1 ≤ n ≤ 20 (data provided by Sykes and Glen [SG76]), 1/20 2 they used T (20) = 173, 338, 962 to show that λT ≥ (T (20)/10) ≈ 2.3011. Nowadays, since we know T (n) up to n = 75,3 we can obtain, using the same 1/75 method, that λT ≥ (T (75)/10) ≈ 2.7714. We can even do slightly better

than that. Substituting in Equation (1.1) the upper bound λT ≤ 3.6050, which 1/75 we prove in Chapter 4, we see that λT ≥ (T (75)/(2(1 + 3.6050))) ≈ 2.7744. However, we can still improve on this. In Chapter 4, we use a concatenation

argument, tailored to the triangular lattice, to show that λT ≥ 2.8424.

• A lower bound is immediately attainable by the fact that

pn pn lim A(n) = λ = sup A(n) [Kla67]. n→∞ n≥1

Using A(56) [Jen03], we obtain λ ≥ 3.7031.

• Barequet et al. [BMRR06] improved the lower bound to λ ≥ 3.980137 by counting polyominoes on twisted cylinders. We describe this method in detail in Chapter 3, and use it to show that λ ≥ 4.0025.

Bounding λ from above On the other hand, only a few procedures are known for bounding λ from above. Eden [Ede61] was the first to give an upper bound on λ by q 3n  n 3n  27 showing that A(n) ≤ n−1 . Since limn→∞ n−1 = 4 , it followed that λ ≤ 6.75. 2(n−1) In the same manner, Lunnon [Lun72b, p. 98] showed that T (n) ≤ n−1 . Hence,

2 We wonder why Rands and Welsh did not use T (22) = 1, 456, 891, 547 (which was also available in 1/22 their reference [SG76]) to show that λT ≥ (T (22)/10) ≈ 2.3500. 3 T (75) = 15, 936, 363, 137, 225, 733, 301, 433, 441, 827, 683, 823.

9

Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 2(n−1)1/n λT ≤ limn→∞ n−1 = 4. Similarly, Lunnon [ibid., Eq. (17)] also showed that the growth constant of polyhexes is bounded from above by 6.75. Eden [Ede61] claimed that λ ≤ 4. However, as noted by Klarner [Kla67], the proof for this upper bound was questionable. Having now proved that λ ≥ 4.0025 [BRS16], we know for certain that the proof is indeed incorrect. In their beautiful paper [KR73], Klarner and Rivest provided a procedure for improv- ing the upper bound on λ, and proved that λ ≤ 4.65, a considerable improvement over Eden’s bound. The main computational challenge behind this approach is constructing

algorithmically a sequence of increasingly larger sets C1,C2,... of “building blocks” for polyominoes. Every polyomino of size n can be uniquely encoded as a sequence of

elements of Ci, but not all such sequences encode legal polyominoes. Unlike the gener-

ating function for the original problem, the radius of convergence σi of the generating function of these sequences can be determined [KR73, §3], which therefore provides an upper bound on λ. The method has the advantage of being amenable to systematic

improvement; As i increases, 1/σi decreases. However, the size of Ci increases roughly

by a factor of 4 as i is incremented by 1, and thus constructing Ci+1 and computing σi+1

requires more than 4 times the computer power needed to construct Ci and compute σi. Klarner and Rivest carried their approach to the limits of the computing power they

had available, and computed σi up to i = 10. The value 1/σ10 = 4.6495 has remained the best known upper bound on λ for more than 40 years. We are not aware of any attempts of reproducing this result, nor carrying the approach beyond i = 10. On the other hand, V¨ogeand Guttmann [VG03] applied the same method for the hexagonal lattice and improved the upper bound on the growth constant of polyhexes from 6.75 to 5.9047. From our perspective, improving the upper bound on λ using this

approach seemed rather at reach. The algorithm for constructing Ci is fairly simple and we have implemented it with a relatively simple computer program. With the

computing resources available to us, we compute σ21 and improve the upper bound to λ ≤ 4.5252. Recently, Barequet et al. [BB15] claimed to improve the upper bound on λ to 4.5685. However, G¨unter Rote (personal communication) found a mistake in the

proof. Nevertheless, we use the latter method in Chapter 4 to show that λT ≤ 3.6050. Thus, before carrying out the research described in Chapter 3 of this thesis, 3.9801 and 4.6496 were the best proven bounds on λ, and so not even a single decimal digit of λ was rigorously known. Our goal was to raise the lower bound over the mythical barrier of 4, and thus reveal its first decimal digit. Our proven bounds 4.0025 ≤ λ ≤ 4.5252, are currently the best known bounds on λ. The proof of the lower bound [BRS16] appears to be amongst the largest mathematical proofs ever given.

Proper Polycubes Given a d-dimensional polycube P , one may ask if P is properly d-dimensional, meaning, “does P span all d dimensions?”. If the answer to this question is positive (respectively, negative), then P is called proper (respectively, improper) in d dimensions. In the latter case, the centers of the cubes of P all lie in some k-dimensional

10

Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 (k ≤ d − 1) subspace, whereas in the former case, the convex hull of the centers of its cubes is d-dimensional. Proper polycubes are the main focus of Chapter 5 of this thesis. The main interest in proper polycubes stems from a simple relation between the total

number of polycubes Ad(n), and the number of proper i-dimensional polycubes, for 1 ≤ i ≤ d. (Lunnon’s formula [Lun75], explained in detail in Chapter 5.) A polycube with n cubes can span at most n − 1 dimensions, and the number of n-cell polycubes that are proper in n − 1 dimensions has been known for years [ABBR12]; it is based on a simple bijection between these polycubes and Cayley Trees (see Chapter 2). Naturally, researchers became interested in finding formulae enumerating proper (n − 2)-, (n − 3)- ,..., (n − k)-dimensional polycubes (the 2nd, 3rd, ... , k-th diagonal formulae), for some fixed (small) constant k > 1 and variable n. Explicit formulae for k = 2 [ABBR12] and k = 3 [BBR10] have been derived based on a graph-theoretic model for polycubes. The latter case involved an elaborate case analysis, and an inclusion-exclusion formula involving various types of graph and tree “patterns” which may or may not occur in polycubes. Finding these patterns is the main bottleneck of this approach, which makes it totally impractical to manually carry it beyond k = 3. Our goal was to create a theoretical framework that would enable carrying the approach to higher values of k, automatically. Our efforts to achieve this goal resulted in computer-generated proofs of the formulae for k = 4 and k = 5 (see Theorems 5.2 and 5.3), which have never been proven rigorously before. Proper polycubes are key to understanding the behavior of high-dimensional poly-

cubes. The best asymptotic estimate of λd, as d → ∞, that had hitherto been derived only by non rigorous methods, was obtained with a relatively simple analysis of diagonal formulae. We conclude Chapter 5 with a formal proof of a conjecture about the pattern of the kth diagonal formula (for any fixed k > 0), which dates back to Peard and Gaunt [PG95]. In the physics literature [PG95], this pattern is usually assumed to be true just because it is supported by the available enumeration data. The pattern was recently refined by Asinowski et al. [ABBR12]. Still, it has never been formally proven before. Some of our proofs in Chapters 3 and 5 heavily rely on computer calculations and, thus, might raise questions about their credibility and reliability. There are two complementary approaches to address these issues: formally-verified computations and certified computations.

Formally-Verified Computing In this paradigm, a program is accompanied by a correctness proof which is refined to such a degree of detail and formality that it can be checked mechanically by a computer. This approach, and more generally, formally- verified mathematics, has become feasible for industry-level software as well as for mathematics far beyond toy problems due to big advances in recent years, see the review of Avigad and Harrison [AH14]. One highlight is the Gonthier’s formally-verified proof of the Four-Color Theorem [Gon08], whose original proof by Appel and Haken [AH77]

11

Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 in 1977 already relied on computer assistance, and which was the prime instance of discussion about the validity and appropriateness of computer methods in mathematical proofs. (Incidentally, one step in Gonthier’s proof involves also polyominoes.) Another example is the verification of Hales’s proof [Hal05] of the Kepler conjecture, which states that the face-centered cubic packing of spheres is the densest possible. This proof, in addition to involving extensive case enumerations at different levels, is also very complicated in the interaction between the various parts. In August 2014, a team headed by Hales announced the completion of the Flyspeck project, constructing a formal proof of Kepler’s conjecture [HST]. Yet another example is the proof by Tucker [Tuc02] for Lorenz’s conjecture (#14 in Smale’s list of challenging problems for the 21st century). The conjecture states that Lorenz’s system of three differential equations, which provides a model for atmospheric convection, supports a strange attractor. Tucker described [ibid., p. 104] the run of a parallel ODE solver several times on different setups of computers, obtaining similar results.

Certified Computation This technique is based on the idea that it may be easier to check a given answer for correctness than to come up with such an answer. The prototype example is the solution of an equation like 3x3 − 4x2 − 5x + 2 = 0. While it may be hard to find the solution x = 2, it is straightforward to substitute the solution into the equation and check whether it is fulfilled. The result is trustworthy not because it is accompanied by a formal proof, but because it is so simple to check, much simpler than the algorithm (for example, Newton iteration in this case) which was used to solve the problem in the first place. In addition to the solution itself, it may be required that a certifying algorithm provide a certificate in order to facilitate the checking procedure [MMNS11]. Developing such certificates and computing them without excessive overhead may require algorithmic innovations (see Section A.1).

In Chapter 3, the lower bound λ ≥ 4.0025 is a result our program found by computing the eigenvalue of a giant matrix Q, which is not explicitly stored but implicitly defined through an iteration procedure. The certificate is a vector v which is a good-enough approximation of the corresponding eigenvector. From this vector, one can compute certified bounds on the eigenvalue in a rather straightforward way by comparing the vector v to the product Qv. In Chapter 5, our software provides a full proof of the diagonal formulae, a complete listing of all structures, all the intermediate computations, a full description of the inclusion-exclusion relations between the tree patterns, and a detailed account of all the calculations. The two approaches described above of formally-verified computations and certified computations complement each other: A simpler checking procedure will be more amenable to a formal proof and verification procedure. We did not go to such lengths; a formal verification of the program would have made sense only in the context of a full

12

Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 verification that includes also the human-readable parts of the proofs. Instead, we used traditional methods of ensuring program correctness of the certificate checking program, see, e.g. Sections 3.2.4 and 5.6.

13

Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 Chapter 2

Preliminaries

2.1 The Triangular Lattice

We orient the triangular lattice as is shown in Figure 2.1(a), and define a lexicographic

order on the cells of the lattice as follows: A triangle t1 is smaller than triangle t2 =6 t1

if the lattice column of t1 is to the left of the column of t2, or if t1, t2 are in the same

column and t1 lies below t2. Triangles that look like a “left arrow” (Figure 2.1(b)) are of Type 1, and triangles that look like a “right arrow” (Figure 2.1(c)) are of Type 2.

2.2 The Twisted Cylinder

A “twisted cylinder” is a half-infinite wrap-around spiral-like square lattice (see Fig- ure 2.2). We denote the perimeter or width of the twisted cylinder by W .

2.3 Motzkin Path

A Motzkin path of length n is a path from (0, 0) to (n, 0) in an n × n grid, consisting of up steps (1, 1), down steps (1, −1), and horizontal steps (1, 0), that never goes below the

x-axis. See Figure 2.3 for an illustration. The number Mn of Motzkin paths of length n

(b) Left arrow

(a) A (c) Right arrow

Figure 2.1: Polyiamonds on the triangular lattice

15

Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 7 2 8 3 W =5 4 5 6 1 2

Figure 2.2: A twisted cylinder of perimeter W = 5. The wrap-around connections are indicated; for example, cells 1 and 2 are adjacent.

Figure 2.3: A Motzkin path of length 7.

is known as the nth Motzkin number. Motzkin numbers satisfy the recurrence

n−2 X Mn = Mn−1 + (Mi · Mn−i−2) i=0

∞ for n ≥ 2, and M0 = M1 = 1. The first few Motzkin numbers are (Mn)n=0 = (1, 1, 2, 4, 9, 21, 51, 127, 323, 835, 2188,... ) (sequence A001006 [oei]). Asymptotically, we have r 3n 27 Mn = · · (1 + O(1/n)). (2.1) n3/2 4π

2.4 Concatenation of Lattice Animals

A concatenation of two animals P1,P2 is the union of P1 and a translated copy of P2,

so that the largest cell of P1 is attached to the smallest cell of P2, and all cells of P1 are

smaller than the translates of cells of P2.

2.5 Composition of Lattice Animals

A composition of two animals P1,P2 is a natural generalization of their concatenation.

P1 and P2 can be composed so as to yield an animal P if the cell set of P can be split 0 0 0 0 into two complementing non-empty subsets P1,P2, such that P1 = P1 and P2 = P2. Thus, concatenation is a composition in lexicographic order.

16

Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 1 1 1

2 3 2 3 2 3

Figure 2.4: The three Cayley trees of size 3.

2.6 Cayley Trees

For every positive integer n, the set of Cayley trees with n vertices is the set of all undirected trees on n uniquely labeled vertices. See, e.g., Figure 2.4. Cayley’s formula states that the number of Cayley trees on n labeled vertices is nn−2.

2.7 Integer Partition

A partition of a natural number m ∈ N is a way of writing m as the sum of one or P more positive integers, i.e., m = i ai. Two sums that differ only in the order of their summands are considered the same, and so we choose the canonical representation of a partition to be the list of its summands in nondecreasing order. Let Π(m) denote the set of all partitions of the natural number m. For example, there are two partitions of 2 and three partitions of 3: Π(2) = {1 + 1, 2} and Π(3) = {1 + 1 + 1, 1 + 2, 3}. For a partition p ∈ Π(m), we denote by |p| the number of summands in p, and by p[i] the P|p| ith summand of p. In addition, we let ⊕p = i=1 p[i] denote the sum of the elements of p (i.e., ⊕p = m), and π(p) denote the number of essentially-different permutations of the summands of p. For example, π(1, 1, 1) = 1 and π(1, 2) = 2. Finally, we let

pr = ⊕p + |p|. (Note that ⊕p+1 ≤ pr ≤ 2·⊕p since 1 ≤ |p| ≤ ⊕p.) For two partitions p1

and p2, we say that p1 contains p2, and denote this relation by p2  p1, if there is a ∗ ∗ subpartition p1 of p1 (an ordered subset of the elements of p1), such that |p1| = |p2| and ∗ p2[i] ≤ p1[i] for all 1 ≤ i ≤ |p2|. For example, 2  1 + 2, but 2  1 + 1 + 1.

2.8 Graph Isomorphism

Let G = (VG,EG) and H = (VH ,EH ) be two directed edge-labeled graphs with respective

edge labels WG and WH , such that |VG| ≤ |VH |. G is said to be isomorphic to H if

there is a bijection f : VG → VH such that

• If for any u, v ∈ VG such that (u, v) ∈ EG, then (f(u), f(v)) ∈ EH ; and

• If for any e1 = (u1, v1), e2 = (u2, v2) ∈ EG, such that the labels of e1 and e2 are

equal, then the labels of (f(u1), f(v1)) and (f(u2), f(v2)) are equal.

An automorphism of a graph G is a form of symmetry in which G is mapped into itself while preserving the conditions above.

17

Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 Chapter 3

Polyominoes

3.1 Introduction

In the first part of this chapter, we describe our effort to prove that λ, the growth constant (or asymptotic growth rate, also called the connective constant) of polyominoes is strictly greater than 4. In the second part of the chapter we describe our effort to improve the upper bound on λ, using Klarner and Rivest’s approach [KR73]. To achieve these aims we exploited to the maximum possible computer resources which were available to us.

3.2 Lower Bound

3.2.1 Counting Polyominoes on Twisted Cylinders

In this section we briefly describe the idea behind the transfer-matrix method for counting polyominoes on twisted cylinders. A polyomino on a twisted cylinder is a finite edge-connected set of squares on this cylinder. Figure 3.1 shows a 3D visualization of a polyomino embedded on a twisted cylinder. Like in the plane, one can count

polyominoes on a twisted cylinder of width W and study their growth constant, λW . It ∞ was proven that the sequence (λW )W =1 is monotone increasing [BMRR06] and converges to λ [AABB14]. Thus, the bigger W is, the better (higher) the lower bound λW on λ gets. Analyzing the growth constant of polyominoes is more convenient on a twisted cylinder than in the plane. The reason is that we want to build up polyominoes incrementally by considering one square at a time. On a twisted cylinder, this can be done in a uniform way, without having to jump to a new row from time to time. Imagine that we walk along the spiral order of squares, and at each square decide whether or not to add it to the polyomino. The size of a polyomino is the number of positive decisions we make on the way. The crucial observation is that no matter how big the polyominoes get, they can be characterized in a finite number of ways that depends only on W . This

19

Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 Figure 3.1: A polyomino embedded on a twisted cylinder

is because all one needs to remember is the structure of the last W squares of the twisted cylinder (the “boundary” of the polyomino), and how they are inter-connected through cells that were considered before the boundary. This provides enough information for the continuation of the process: whenever a new square is considered, and a decision is taken about whether or not to add it to the polyomino, the boundary is updated accordingly. Thus, the growth of polyominoes on a twisted cylinder can be modeled by a finite-state automaton whose states are all possible boundaries. Every state of this automaton has two outgoing edges that correspond to whether or not the next square is added to the polyomino. A slight variation of this automaton can be seen in action in a video animation [BS13]. In the video, the states of the automaton are all possible boundaries, but each state has up to w outgoing edges, labeled “0” through “W − 1”; being at state s, and upon reading the input character i (for 0 ≤ i < w), the automaton switches to the new state s that corresponds to concatenating to a polyomino with signature s an occupied cell and then i more empty cells. This guarantees that a sequence of n input characters corresponds to a polyomino of size precisely n. The number of states of the automaton that models the growth of polyominoes on a twisted

cylinder of perimeter W is large [BM07, BMRR06]: it is MW +1, the (W +1)st Motzkin n −3/2 number. Asymptotically, Mn ∼ 3 n , and thus, MW increases roughly by a factor of 3 when W is incremented by 1. The number of polyominoes with n cells that have state s as the boundary equals the number of paths the automaton can take from the starting state to s, involving n transitions in which a cell is added to the polyomino. We compute these numbers in a dynamic-programming recursion. The states have a very clean combinatorial structure, and they are in bijection with Motzkin paths. Figure 3.2 illustrates the representation of polyomino boundaries as Motzkin paths. The light-gray cells away from the boundary need not be remembered individually; what matters is the connectivity among the boundary cells that they provide. This is indicated in a symbolic code -AAA-B-CC-AA--AA. Boundary cells in

20

Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17

3 2 1 0 Motzkin path

- A A A - B - C C - A A - - A A code

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16

Figure 3.2: Bottom: A snapshot of the boundary line (solid line) during the transfer- matrix calculation. The dashed line indicates two adjacent cells which are connected “around the cylinder,” where this is not immediately apparent. The boundary cells (top row) are shown darker. The numbers are the labels of the boundary cells. Middle: A symbolic encoding of the state. Top: the same state encoded as the Motzkin path (0,1,0,0,1,1,-1,1,0,-1,-1,0,1,0,-1,0,-1).

the same component are represented by the same letter, and the character ‘-’ denotes an empty cell. We represent a boundary as a Motzkin path, as shown in the top part of the figure. This representation allows for a convenient bijection to successive integers and therefore for a compact storage of the boundary in a vector. Intuitively, the Motzkin path follows the movements of a stack when reading the code from left to right. Whenever a new component starts, like component A in position 2 or component B in position 6, the path moves up. Whenever a component is temporarily interrupted, such as component A in position 5, the path also moves up. The path moves down when an interrupted component is resumed (e.g., component A in positions 11 and 15) or when a component is completed (positions 7, 10, and 17). The crucial property is that components cannot cross, i.e., a pattern like ..A..B..A..B.. cannot occur. As a consequence of these rules, the occupied cells correspond to odd levels in the path, and the free cells correspond to even levels. Below is the automaton that models the growth of polyominoes on a twisted cylinder of width W = 3. The starting state is --A. We associate the labels ‘1’ and ‘0’ with the edges, corresponding to whether or not a cell was added to the polyomino in the corresponding step. The states A-B and --A have no outgoing ‘0’ edge since the decision of not adding the next cell to the polyomino would split it into components that can never be connected again. The construction of a polyomino is modeled by tracing the

21

Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 0

0

--A -A- A-B A-A -AA 0 1 1 1 1 0 1 0 0

A-- AA- AAA 1 1 1

path in the automaton while processing an input word of 1s and 0s, where the number of occurrences of ‘1’ is the size of the polyomino (minus 1, since the starting state contains already one cell). We want to accept only legal polyominoes, that is, polyominoes that are composed of connected squares. It is sufficient to consider a single accepting state for the automaton (--A in the example) because this state can always be reached by adding enough empty cells. The polyominoes on a twisted cylinder are in one-to-one correspondence with the binary words recognized by the automaton, that is, whose processing by the automaton terminates in an accepting state. Automata theory and linear algebra give us strong tools to analyze the behavior of a finite automaton. First, we can represent the automaton as an M × M 0/1 transfer matrix B, where M is the number of states of the automaton, and the (ij)th entry of B is 1 if an edge leads from the ith to the jth state of the automaton. One can derive from B (through its characteristic polynomial) the generating function of the sequence enumerating polyominoes on the twisted cylinder, and a linear recurrence formula satisfied by this sequence. This has been carried out [AABB14] up to width W = 10. Second, this matrix has a few useful properties. It is proven [BMRR06] that the

largest eigenvalue (in absolute value) of B is exactly the desired growth constant λW .

Moreover, B is a primitive and irreducible matrix, and, hence, λW is the only positive eigenvalue of B. Under these conditions, the Perron-Frobenius theorem provides an effective method for computing this eigenvalue: Start from any positive vector (e.g., the vector in which all entries are 1) and repeatedly multiply it by B. In the limit, this process converges to the eigenvector, and the ratios between successive vectors in this process converge to the desired eigenvalue, which is the desired growth constant.

3.2.2 Method

In 2004, a sequential program that computes λW for any perimeter W was developed by Ms. Ares Rib´oas part of her Ph.D. thesis under the supervision of G¨unter Rote. The program first computes the endpoints of the outgoing edges from all states of the automaton and saves them in two long arrays succ0 and succ1, which correspond to the states reached by adding an empty or an occupied cell, respectively. Both arrays are

22

Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 old G1 G2 G3 ... Gi Gi+1 ... GW 1 GW y −

succ1 [s] succ0 [s]

new y G1 G2 G3 ... Gi Gi+1 ... GW 1 GW −

Figure 3.3: The dependence between the different groups of ynew and yold.

of length M := MW +1. Two successive iteration vectors, which contain the number of polyominoes corresponding to each boundary, are stored as two arrays yold and ynew of numbers, also of length M. The four arrays are indexed from 0 to M − 1. After initializing yold := (1, 0, 0,... ), each iteration computes the new version of y by the following simple loop:

yold := (1, 0, 0,... ) repeat till convergence ynew[0] := 0 for s := 1,...,M − 1: (∗) ynew[s] := ynew[succ0[s]] + yold[succ1[s]] yold := ynew

The pointer succ0[s] may be null, in which case the corresponding zero entry (ynew[0]) is used. As explained above, each index s represents a state. The states are encoded by Motzkin paths, and these paths can be bijectively mapped to numbers s between 0 and M − 1. In the iteration (∗), the vector ynew depends on itself, but this does not cause any problem because succ0[s], if non-null, is always less than s. Therefore, there are no circular references and each entry is set before it is used. In fact, the states

can be partitioned into groups G1,G2,...,GW : The group Gi contains the states corresponding to boundaries in which i is the smallest index of occupied cell, or, in other words, boundaries that start with i − 1 empty cells. The dependence between the

entries of the groups is schematically shown in Figure 3.3: succ0[s] of an entry s ∈ Gi

(for 1 ≤ i ≤ W − 1), if it is non-null, belongs to Gi+1. At the end, ynew is moved to yold to start the next iteration. In the iteration (∗), the new vector ynew is a linear function of the old vector yold and, as was already indicated, this can be written as a linear transformation ynew := Qyold. The nonnegative integer matrix Q is implicitly given through the iteration (∗). We are interested in the growth old rate of the sequence of vectors y , which is determined by the dominant eigenvalue λW

of Q. It is not hard to show [BMRR06] that after every iteration, λW is contained in

23

Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 4

3.5

3

λW 2.5

2

1.5

1 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 W

Figure 3.4: Extrapolating the sequence λW .

the interval ynew[s] ynew[s] min ≤ λW ≤ max . (3.1) s yold[s] s yold[s] By the Perron-Frobenius Theorem about the eigenvalues of nonnegative matrices, the old two bounds converge to λW , and y converges to a corresponding eigenvector.

As written, the program calculates the exact number of polyominoes of each size and state, provided that the computations are carried out with precise integer arithmetic. n However, these numbers grow like (λW ) , and therefore we cannot afford to store them exactly. Instead, we use single-precision floating-point numbers for yold and ynew. The loss of accuracy will be addressed in Section 3.2.4. Even so, we have to rescale the vector yold from time to time in order to prevent floating-point overflow: Whenever the largest entry exceeds 280 at the end of an iteration, we divide the whole vector by 2100. This rescaling does not affect the convergence of the process. The program terminates when the two bounds are close enough. The left-hand side of (3.1) is a lower bound on

λW , which in turn is a lower bound on λ, and this is our real goal.

In 2004, good approximations of λW were obtained up to W = 22. The program required quite a lot of main memory (RAM) by the standards of that time. The

computation of λ22 ≈ 3.9801 took about 6 hours on a single-processor machine with 32 GB of RAM. (Today, the same program runs in 20 minutes on a regular workstation.)

By extrapolating the first 22 values of the sequence λW (see Figure 3.4), it was estimated that breaking the mythical barrier of 4.0 would only be possible when reaching W = 27.

However, as mentioned above, the storage requirement is proportional to MW , and MW increases roughly by a factor of 3 when W is incremented by 1. With this exponential growth of both memory consumption and running time, the goal of breaking the barrier was then out of reach.

24

Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 Figure 3.5: Front view of the “supercomputer” which we used. It is only a box of about 45 × 35 × 70 cm3.

3.2.3 Computing λ27

Environment In the spring of 2013, we were granted access to the Hewlett Packard ProLiant DL980 G7 server of the HPI (Hasso Plattner Institute) Future SOC Lab in Potsdam, Germany (see Figure 3.5). This server consists of 8 Intel Xeon X7560 nodes (Intel64 architecture), each having eight physical 2.26 GHz processors (16 virtual cores), for a total of 64 processors (128 virtual cores). Each node was equipped with 256 GiB of RAM (and 24 MiB of cache memory), for a total of 2 TiB of RAM. Simultaneous access by all processors to the shared main memory was crucial to the success of the project. Distributed memory would incur a severe penalty in running time. The machine was run with the Ubuntu version of Gnu/Linux. Compilation was done using the gcc C compiler with OpenMP 2.0 directives for parallel processing.

Programming Improvements

11 Since for W =27 the finite automaton has M28 ≈ 2.1 · 10 states, we initially esti- mated that we would need memory for two 8-byte arrays (for storing succ0 and succ1) old new and two 4-byte arrays (for storing y and y ), all of length M28, for a total of 24·2.1·1011 ≈ 4.6 TiB of RAM, which exceeded the available capacity. Only a combina- tion of parallelization, storage-compression techniques, and a few other enhancements

and tricks allowed us to compute λ27 and push the lower bound on λ above 4.0. Here is a detailed description of the improvements we used in order to reduce the memory consumption of our program.

1. Elimination of unreachable states. A considerable portion of the states of the automaton (about 11% asymptotically) are unreachable, and thus redundant. This happens because not all seemingly legal states can be realized by a valid boundary. As a result, there is no binary string leading to these states. For example, the

25

Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 code A - - - A - B B

1 2 3 4 5 6 7 8

Figure 3.6: An unreachable state.

hypothetical state A---A-BB shown in Figure 3.6 is prima facie legal, and it has a corresponding Motzkin path. However, it cannot arise as the boundary of a partial polyomino: Since boundary cells #1 and #5 belong to the same connected component A, one of the two cells adjacent to cell #1 must be occupied. The cell to the right (#2) is empty because of the symbol ‘-’. The cell immediately below cell #1 can also not be taken because it is adjacent to cell #8, which belongs to a different component B. Therefore, this state will never be reached: it is not the succ0 or succ1-successor of any other state. We were able to characterize the unreachable states in terms of their Motzkin paths, and eliminated them in order to reduce the memory consumption of the program. This required modifying the bijection between successive integer numbers and the Motzkin paths representing the remaining states, but had no effect on the correctness of the computation.

2. Bit-streaming of the succ0/1 arrays.

• Instead of storing each entry of these arrays in an 8-byte word (once the number of states exceeded 232), we allocated to each entry the exact number of required bits and stored all entries consecutively in a packed manner. Since the succ0/1 entries were only accessed sequentially, there was only a small overhead in the running time for unpacking the resulting bit sequences.

• In addition, since we knew a priori to which group Gi each pointer belonged,

we needed only dlog2 |Gi|e bits per pointer for all entries in Gi (plus a negligible amount of bits required to delimit between the different groups). • Finally, the succ0-pointer was often null because the choice of not adding the next cell to the polyomino caused a component of the polyomino to lose contact with the boundary. By spending one extra indicator bit per pointer, we eliminated altogether the illegal pointers, which comprised about 11% of all succ0 entries.

3. Storing higher groups only once. In the recursion (∗), only states belonging new to G1 are needed for computing y . Thus, we did not need to keep two separate complete arrays in memory. We only needed to keep one full array of size M for new old new old y , and another array of size |G1| for y [s]. The quotient y [s]/y [s] could still be computed before overwriting yold[s] by ynew[s], and thus the minimum

26

Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 calculate state s states s0, s00 succ0, succ1

decode encode

Motzkin path Motzkin path

unrank rank

integer index integer index

Figure 3.7: The process of computing succ0 and succ1 for an integer index.

and maximum of these quotients, which give the bounds (3.1) on λ, could be

accumulated as we scanned the states. Asymptotically, G1 accounts for 2/3 of all states. (The states not in G1 correspond to Motzkin paths of length W .)

4. Recomputing succ0. Instead of storing the succ0 array, we computed its entries on-the-fly whenever they were needed. Naturally, this required more running time. Streamlined computation of the pointers accelerated the successor computation (see below). This variation has also benefited from parallelization since each processor could do the pointer computations independently. Since the elimination of the succ0 pointers was sufficient to get the program running with W =27, we did not pursue the option of eliminating the succ1 array in an analogous way.

5. Streamlining the Successor Computation. The steps (1, 0), (1, 1) and (1, −1) of a Motzkin path can be represented by the vertical moves 0, 1 and −1, respectively. The horizontal moves are omitted since they are always 1. Thus, a Motzkin path of length n is represented as a string of n symbols of the alphabet {1, −1, 0}. Originally, we represented a Motzkin path by a sequence of W +1 integer numbers taking values from {−1, 0, +1}. However, we compressed the representation into a sequence of W +1 two-bit items, each encoding one step of the path, which we could store in one 8-byte word (since W ≤ 31). This compact storage opened up the possibility of word-level operations and look-up tables for a fast mapping from paths to numbers, as explained in more detail below. If we follow the definition, the computation of the successor arrays goes through a number of conversion steps, as shown in Figure 3.7. The encode and decode operations denote the conversion to a more readable format like the letter code -AAA-B-CC-AA--AA, in which the successor computations of states can be readily done. However, this level can be eliminated. It is already described in [BMRR06] how the successor computation can be carried out at the level of Motzkin paths, thus leading to the simplified pipeline shown in Figure 3.8. When the computation of the succ arrays was done in the preprocessing phase, we simply looked up the pointers during the iterations (as indicated by the dashed arrow in the figure),

27

Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 calculate Motzkin path Motzkin path succ0, succ1

unrank rank

look up integer index integer index succ0, succ1 Figure 3.8: Simplified pipeline of the successor computation.

Motzkin path Motzkin path rank unrank faster through directly enumerate0 index and table look-up succ look up integer index integer index succ0, succ1 Figure 3.9: text

and did not need to worry about the successor computation. However, recall that we eventually avoided storing the succ0 pointers. Eliminating the storage of the succ0 arrays would now mean that we have to go through the three-step procedure of computing succ0 in each iteration. We sped up this procedure by the following considerations:

After computing the succ0 of a Motzkin path, we still needed to convert it to the corresponding index. Stepping individually through the 28 symbols of the path was slow. Figure 3.10 shows an example of a path in the network, its symbolic representation as a sequence of steps ‘0’, ‘+’, and ‘-’, and the associated bit pattern. This compact storage opens up the possibility of word-level operations, as illustrated schematically in the figure. A subsequence of 14 bits can be extracted from the binary representation of the path to jump 7 levels at a time. For each marked vertex in the figure, we needed a precomputed table, indexed by 14-bit patterns, which contains the next network node that is reached by the corresponding path, and the quantity which needs to be accumulated to determine the rank. The ranking procedure was then completed very fast with only four table look-ups, a few shifts, masking (bitwise and) operations, and additions.

The 14-bit patterns were first converted into one of 37 = 2,187 indices, since we used only three of the four possibilities for each two-bit group. This was done with one table of 214 = 16,384 entries. For each of the marked vertices, we had a table of size 2,187 with the necessary data for the ranking algorithm. The network was actually more complicated than shown in the figure because of the elimination of unreachable states: we needed three different copies of each vertex. In this context, it was also more convenient to jump from right to left through the network, instead of the more natural order from left to right. The total space requirement of these look-up tables was about 500 KB. This was small enough

28

Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 1001011001000001101010100100011001101000000001000100010100 +00+0--0++... Figure 3.10: A Motzkin path of length 29, its symbolic representation as a sequence of steps ‘0’, ‘+’, and ‘-’, and the associated bit pattern

to fit in the level-1 cache attached to each processor. We took care that each processor used its own copy of the table in order to avoid the bottleneck of shared memory access. In our program, we did not need the successors of arbitrary indices but of indices which are incremented sequentially in the main loop. Thus, we maintained the “configuration” (we avoid the term “state”) of the conversion in the network, backtracking when the index was increased instead of starting from scratch. As the Motzkin paths of successive indices differ only a little in most cases, this turned out to be a fast operation. We also wanted to find the succ0 successors simultaneously as we enumerated the indices and the corresponding Motzkin paths. For this goal, we had to analyze how the successor computation reacts when the path is changed. By storing additional configuration variables in the network, we managed to integrate this computation into the enumeration procedure. Thus, we could simultaneously enumerate the sequence s, s + 1,... of indices, the corresponding Motzkin paths (which we did not need), and the Motzkin paths of the succ0 successor. Most of the time, the Motzkin path changed only in the last few items, and despite the overhead, the procedure was faster than individually looking at each of the 28 symbols of the path.

6. Parallelization. Since the set of states G of the automaton is partitioned into

groups G1,...,GW , such that succ0[s] for an element s ∈ Gi belongs to Gi+1,

the groups GW ,...,G1 had to be processed sequentially (in this order) but all elements in one group could be computed in parallel. The size of the groups is

exponentially decreasing; in fact, G1 comprises more than half of all states, and

GW contains only a single state. Therefore, for the bulk of the work (computing ynew), we easily achieved coarse-grained parallelization and an equal distribution

29

Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 W λW 23 3.9856 24 3.9990 25 3.9994 26 3.9998 27 4.0025

Figure 3.11: Results for W = 23,..., 27

of the work to the 128 available cores, requiring concurrent read but no concurrent write operations.

Execution After 120 iterations, the program announced the lower bound 4.00064

on λ27, thus breaking the 4 barrier. We continued to run the program for a few more days. On May 23, 2013, after 290 iterations, the program reached the stable situation

(observed in a few successive tens of iterations) 4.002537727 ≤ λ27 ≤ 4.002542973, establishing the new record λ > 4.00253. The total running time for the computations leading to this result was about 36 hours, using about 1.5 Terabytes of RAM. We had exclusive use of the server for a few dozens of hours in total, spread over several weeks. We report our results for W = 23,..., 27 in Table 3.11.

3.2.4 Validity and Certification

Our proof heavily depends on computer calculations. This raises two issues about its validity: (a) Elaborate calculations on a large computer are hard to reproduce, and in particular when a complicated parallel computer program is involved, one should be skeptical. (b) We performed the computations with 32-bit floating-point numbers. We address these issues in turn. (a) Our program computes an eigenvalue of a matrix. The amount and length of the computations are irrelevant to the fact that eventually we have stored on disk a witness array of floating-point numbers (the “proof”), about 450 GB in size (32 GB compressed size), which is a good approximation of the eigenvector corresponding

to λ27. This array provides rigorous bounds on the true eigenvalue λ27, because the relation (3.1) holds for any vector yold and its successor vector ynew. To check the proof and evaluate the bounds (3.1), one only has to read the approximate eigenvector yold and carry out one iteration (∗). This approach of providing simple certificates for the result of complicated computations is the philosophy of certifying algorithms [MMNS11] mentioned in Chapter 1 and Appendix A. For ensuring the correctness of our checking program, we relied on traditional methods, such as testing and code inspection. Some parts of the program, such as reading the data from the files, are irrelevant for the correctness of the result. The main body of the program consists of a few simple loops, such as the iteration (∗) or the evaluation of (3.1). The only technically-challenging part of the algorithm is the

30

Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 successor computation. For this task, we had two programs at our disposal that were written independently by two people who used different state representations (and who lived in different countries and did their work several years apart). We ran two different checking programs based on these procedures, which gave us additional confidence. We also tested explicitly that the two successor programs yielded the same results. Both checking programs ran in a purely sequential manner, and the running time was about 20 hours each. (b) Regarding the accuracy of the calculations, one can analyze how the recurrence (∗) produces ynew from yold. One finds that each term in the lower bound (3.1) results from the input data (the approximate eigenvector yold) through at most 26 additions of positive numbers for computing ynew[s], plus one division, all in single-precision float. The final minimization is error-free. Since we took care that no denormalized floating-point numbers occurred, the magnitude of the numerical errors is comparable to the accuracy of floating-point numbers, and therefore the accumulated error is much smaller than the gap that we opened above 4. By carefully bounding the floating-point error, we obtained 4.00253176 as a certified lower bound on λ. Thus, in particular, we now know that the leading digit of λ is 4.

3.3 Upper Bound

3.3.1 Polyominoes Viewed as Sequences of Twigs

Eden [Ede61] observed that a unique planted plane tree TP may be associated with

each polyomino P . TP may then be interpreted as a sequence of “twigs,” a collection of small subtrees. Figure 3.12 shows E, Eden’s set of eight twigs. The number of trees spanning polyominoes (and hence the number of polyominoes) is bounded from above by the number of ways of concatenating the twigs. The cells of a twig are divided into two types, namely dead and living (open), colored black and white, respectively, in Figure 3.12. Every twig contains at least one dead cell, but not necessarily any living cells. Each twig e ∈ E is assigned a weight w(e) = xayb, where a denotes the number of cells in e minus 1, and b denotes the number of dead cells in e. We use Ek to denote the set of all sequences of elements of E that have k length k, for k ∈ {0} ∪ N. The weight of a sequence e¯ = (e1, . . . , ek) ∈ E is defined to be W (¯e) = xw(e1) . . . w(ek), and the weight of the empty sequence is defined to be x. The sum of the weights of all finite sequences of elements of E is

∞ ∞ !k !−1 X X X X X W (¯e) = x w(e) = x 1 − w(e) . (3.2) k=0 e¯∈Ek k=0 e∈E e∈E

31

Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 e1

e2 e3 e4

e5 e6 e7

e8

Figure 3.12: Eden’s set of twigs E [KR73, Figure 3]

32

Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 4 76

2 5 89

31 10

0

Figure 3.13: A spanning tree generated by Eden’s method [KR73, Figure 4]

P 3 Clearly, e∈E w(e) = y(1 + x) , thus, the generating function given by (3.2) is

∞ ∞ 3n+1 x X X X  3n  = xyn(1 + x)3n = xmyn. (3.3) 1 − y(1 + x)3 m − 1 n=0 n=0 m=1 Eden described an injection of the set of polyominoes of size n into the set of finite sequences of E having weight xnyn, in the following way. Consider a polyomino P .A

spanning tree TP of P is constructed as follows:

• Assign the label 1 to the leftmost cell in the bottom row of P , and the label 0 to the cell below it (which, clearly, does not belong to P ), and extend an edge from cell 0 into cell 1.

• For i = 1, . . . , n: Suppose that an edge has been extended from cell di into cell i.

The three cells: ai, bi, ci (together with the cell di) surround cell i, going clockwise

around cell i, and starting from di. If ai is a cell of P that has not been labeled

earlier in this process, extend an edge from cell i into ai, and assign ai the successor

of the last label used in the process. Repeat the last step for bi and ci as well.

At vertex i of TP , we find exactly one of the twigs shown in Figure 3.12. Let us

denote this twig by ei, and define TP = (e1, . . . , en). See Figure 3.13 for an example of a spanning tree created by this process for a polyomino of size 10. The sequence

of twigs in this example is e = (e4, e4, e8, e3, e6, e8, e8, e6, e7, e8), and its weight is 2 2 2 10 10 w(e) = xw(e1) . . . w(e10) = x · x y · x y · y · x y · xy · y · y · xy · xy · y = x y . In fact, it can be easily verified that for every polyomino P of size n, the weight of n n TP = (e1, . . . , en) is x y , and that two different polyominoes P1,P2 are associated with n n different sequences TP1 ,TP2 . Thus, the coefficient e(n, n) of x y in the power series in

33

Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 Equation (3.3) is an upper bound on A(n), and if 1/ is the radius of convergence of the P∞ n 3n  “diagonal” power series n=0 e(n, n)z of (3.3), then λ ≤ . Clearly, e(n, n) = n−1 , 27 and  = 4 , and this is exactly Eden’s result mentioned in Chapter 1.

3.3.2 Mapping Lattice Animals to Binary Strings

The process described in the previous section can also be viewed as a mapping f(P )=WP ,

which maps a polyomino P of size n to a binary string WP of length 3n−1. A similar mapping was described by Lunnon [Lun72b] for polyiamonds and polyhexes, and by Barequet et al. [BBR10] for d-dimensional polycubes (for a fixed d ≥ 3). In fact, the same process can be applied for any lattice where each cell has a constant number of neighbors. Let us then describe this mapping in detail for our lattice animals of interest, namely, polyominoes, polyiamonds, and polycubes.

Let δ = 4, δ4 = 3, δ = 6, and δ = 2d denote the degree of a cell of the square, triangular, hexagonal, and7 d-dimensional cubical lattice, respectively. Now let P be an

n-cell polyomino, polyiamond, , or d-dimensional polycube, δ be δ, δ4, δ , or δ, and F (n) be A(n), T (n), H(n), or Ad(n), respectively. 7

Lemma 3.3.1. [Ede61, Lun72b, BBR10] P can be uniquely encoded with a binary

string WP of length (δ − 1)n − 1.

Proof. Following closely the proofs in [Lun72b, BBR10], let r be the smallest cell of P in lexicographic order (defined by the coordinates of the centers of the cells), and set ` to 1. Assign the label ` to r, and increment ` by 1. Now perform a breadth-first search on the cell-adjacency graph G of P , starting from r. In the course of this procedure, any cell c ∈ P (except r) is reached through an incoming edge e. (An imaginary edge incoming into r is fixed so as to supposedly originate from a cell that cannot belong to P .) Cell c is connected by edges of G to at most δ−1 additional neighboring cells. For each outgoing edge e0 leading to each of these neighbors, going in a fixed order determined by the orientation of the edge relative to e (for example, for polyominoes, the outgoing edges are traversed according to their clockwise order relative to e), if the edge leads to a cell of P that has not yet been labeled in this process, assign this cell

the label `, set ` = `+1, and WP = WP · 1. Otherwise, set WP = WP · 0 (where “·” denotes the concatenation operator). Since each cell can be assigned a number only once, this procedure maps animals in a one-to-one manner into binary sequences with n − 1 ones and (δ − 2)n zeros. Hence, we obtain by using Stirling’s formula,

n (δ − 1)n − 1 (δ − 1)δ−1  F (n) ≤ ≤ . (3.4) n − 1 (δ − 2)δ−2

Polyiamonds For polyiamonds, we obtain

34

Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 j

ba

i

Figure 3.14: A snapshot of the hexagonal lattice. Cells a and b adjoin both cells i and j [Lun72a, Figure 11] .

2n T (n) ≤ ≤ 4n, n

Hence, λT ≤ 4, and this is exactly the upper bound mentioned in Chapter 1.

Polyhexes For polyhexes, Lunnon [Lun72b] noted that only three digits (instead of δ −1 = 5) are needed to encode the neighborhood of a cell on the hexagonal lattice (refer7 to Figure 3.14). Cells i and j have two common neighbors: cells a and b. Thus, if cell j is first numbered by cell i, then j > i, and at step j of the process described above, a and b must be already numbered (possibly, but not necessarily, by i) as well. Therefore, the string in this case has length (δ − 3)n = 3n, and so we have 7 (6 − 3)(6−3) λ ≤ = 6.75 (3.5) (6 − 4)(6−4) 7

δ−1  δ−2 Polycubes (δ−1) − 1 − Finally, for polycubes, since (δ−2)δ−2 = (δ 1) 1 + δ−2 < (δ 1)e, it follows that λd ≤ (2d − 1)e.

3.3.3 Klarner and Rivest’s Enhancement

Klarner and Rivest [KR73] developed Eden’s idea further, noting that the spanning

tree TP of a polyomino P may be viewed as a sequence of elements selected from a set of “larger” twigs (i.e., twigs with more dead cells). They showed that a simple

extension of E to larger sets E1,E2,E3,... , such that E1 = E and |Ei| ≤ |Ei+1|, yields a sequence of better (smaller) upper bounds on λ. Similarly to E, every polyomino of n n size n gives rise to a unique sequence e¯ of elements of Ei, such that w(e¯) = x y . The

key idea is that both polyomino encoding sequences of elements of Ei and Ei+1 can be converted into sequences of elements of E, and, in addition, the former sequences constitute subsets of the latter. Using the extension up to i = 3, Klarner and Rivest improved the upper bound to 5.25. Nevertheless, they came up with a more compact set of twigs L, shown in Figure 3.16, which is more efficient than the extensions of E. Using L, they improved the upper bound to 4.83. Extending L to sets with more dead

35

Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 ∗ ∗∗∗ ∗∗ ∗ ∗∗ ∗ ∗∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ uuuu ∗∗∗ ∗ ∗∗ ∗ ∗∗ ∗∗ ∗

Figure 3.15: The eight L-contexts of cell u [KR73, Figure 6]

12 2

∗ ∗ ∗ ∗ ∗ 1 ∗∗∗ ∗∗∗ ∗∗∗ ∗∗∗ ∗∗ ∗ L1 L2 L3 L4 L5

Figure 3.16: The set of twigs L [KR73, Figure 7]

cells, they further improved the upper bound to 4.65, which has remained the best known upper bound on λ to-date.

The set of twigs L Refer to Figures 3.15 and 3.16. For a square u, there are eight L-shaped 4-sets of squares around u. These sets are called the L-contexts of u. Each element of L is composed of a root cell (colored black) with a specified L-context, which is marked with asterisks, and a (possibly empty) set of open cells (colored white), which

is ordered linearly (see L3 and L5). This is necessary to ensure the uniqueness of the construction, as will be explained below. Each open cell has an assigned L-context (indicated with an L). Finally, certain cells are indicated with an ×; these cells are forbidden cells and they will never become cells of the subpolyomino of which the twig is a root. The interpretation of the L-context of u is as a set of cells whose status of whether or not they belong to the polyomino is known. Note that this is true for the

root cell of the twigs L1 ...L5, for the single open cell of L2 and L4, and for the first

open cell of L3 and L5. However, for the second open cell of L3 and L5, this is true only after the twig assigned to their first open cell has been specified. This use of knowledge about the “past” (the L-context), to constrain the number of possibilities for the “future” is the ingenuity behind Klarner and Rivest’s idea.

Similarly to e1, . . . , e8 (in Figure 3.12), the twigs L1,...,L5 (in Figure 3.16) serve as building blocks for polyominoes. Every n-cell polyomino P corresponds to a unique n-term sequence of elements of L, and different polyominoes are assigned different sequences. This sequence can be constructed algorithmically by assigning a linear order to the cells of P at the same time of assigning an element of L to each cell of P . We start with a single living cell (see Figure 3.17), which is assumed to be the lexicographically-smallest cell of P , and use a queue to keep a list of living cells. The addition of twigs to the configuration T constructed so far proceeds as follows: let u be

36

Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 ∗ ∗∗∗

Figure 3.17: A single living cell.

the oldest living cell of T , let w and y denote the cells connected to u on the right and above it, respectively, x denote the cell (=6 u) connected to w and y, and let ` denote the last label assigned to a cell of P (in the first step, ` = 0). The twig L assigned to u is

(i) L1 if w, x, y∈ / P ;

(ii) L2 if w, x∈ / P , y ∈ P ;

(iii) L3 if w∈ / P , x, y ∈ P ;

(iv) L4 if y∈ / P , w ∈ P ;

(v) L5 if w, y ∈ P . It is easy to check that (i–v) cover all possible situations. A new configuration L ∗ T is then constructed as follows:

1. Place the root cell of the L over u such that the orientation (L-context) of L and u coincide (this may require a reflection and/or rotation of L). The addition is legal if no other cells L overlap with any part of T and no cell of L occupies a cell marked as forbidden.

2. Make the forbidden cells of L forbidden cells of configuration.

3. Append the living cells of L to the list of living cells, observing the order of the living cells in L.

4. Assign the open cell (or cells) of L the label ` + 1 (or the labels ` + 1 and ` + 2, according to their linear order).

5. Remove the oldest cell from the list of living cells.

6. Turn the living cell, where L has been added, into a dead cell.

The procedure above is repeated until no living cells are left. The spanning tree and sequence of twigs generated by this method, corresponding to the decomino shown in Figure 3.13, is shown in Figure 3.18. Note that a cell marked forbidden indicates that it is not a cell of the polyomino, as is the case, for example, with the cell on top of cell 5,

as cell 5 is assigned the twig L1. In addition, a cell can only be labeled once, as is the

case with cell 8, which was labeled by cell 4. Therefore, cell 5 is assigned the twig L1

(not L4). Hence, there is an injection of polyominoes of size n into the set of sequences of elements of L of length n.

37

Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 6 5 8

3 4 7 9

1 102

Figure 3.18: [KR73, Figure 8], LP = (L5,L4,L3,L5,L1,L1,L2,L1,L4,L1). Let ui be the cell visited by the algorithm at step i, and wi and yi be the cells connected to ui on the right and above it, respectively. The cell u1 (the left-most cell in the bottom row of P ) is assigned the label 1 and the twig L1 since w1, y1 ∈ P . Note that in order ◦ to assign a twig ` ∈ L to u2, ` needs to be rotated by 90 and reflected around the x axis. Note also that u5 is assigned the twig L1 since the cell on its right was already discovered at the forth iteration of the algorithm and assigned the label 8.

Observation 3.1. λ ≤ 5.

This follows from the fact that every polyomino of size n can be expressed as a

sequence of length n of the five twigs L1,...,L5 (shown in Figure 3.16). However, not every such sequence represents a polyomino. This implies that 5 is a trivial upper bound on λ, which is already a substantial improvement over Eden’s λ ≤ 6.75 bound.1 As a result, Klarner and Rivest reduced the number of building blocks of polyominoes from eight to five. Naturally, one might ask if a more compact set of building blocks exists. We can now give a negative answer to this question, as a set of size four would imply that λ ≤ 4, which is impossible since λ ≥ 4.0025, as we proved in Section 3.2.

We can construct a sequence of increasingly larger sets C1,C2,C3,... , of increasingly larger twigs (i.e., twigs with more dead cells) from the basic twigs by using almost the

same algorithm. A complete set of twigs Ci contains all configurations that can be constructed according to the above rules and that contain exactly i dead cells (and possibly living cells), or contain less than i dead cells and no living cells (in particular,

C1 = L = {L1,...,L5}). One can construct any polyomino with such a set of twigs.

Observation 3.2. |Ci| > A(i).

P ∈ Let Wi(x, y) = T ∈Ci w(T ). For a twig T Ci, the weight w(T ) of T is defined exactly as in Section 3.3.1, namely, w(T ) = xayb, where a denotes the number of cells in T

1In fact, Klarner and Rivest [KR73] did not mention the trivial fact that λ ≤ 5, perhaps because a simple analysis of the generating function in Equation(3.2), with the set of twigs L, already yielded the better bound λ ≤ 4.83.

38

Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 i |Ci| σi 1 5 4.828428 2 21 4.828428 3 93 4.828428 4 409 4.796156 5 1803 4.765534 6 7929 4.738062 7 34928 4.714292 8 151897 4.690920 9 656363 4.669409 10 2821227 4.649551

Table 3.19: Results obtained by Klarner and Rivest [KR73, Table 1]

minus 1, and b denotes the number of dead cells in T . We can write down the two-variable

generating function, fi(x, y) = x/(1−Wi(x, y)), as in Equation (3.2). We are interested P m n in the diagonal term e(n, n) of the series expansion of fi(x, y) = m,n e(m, n)x y . This term represents the configurations that contain no living cells; configurations which

include all polyominoes. Therefore, the growth constant σi of e(n, n) would be an upper bound on the growth constant of polyominoes. Klarner and Rivest [KR73, §3] show how one can obtain the growth constant of the diagonal term of a rational two-variable generating function. This requires a change of variable in order to apply the residue P n theorem. The diagonal function fD(z) = n e(n, n)z can then be written as a sum over residues. Klarner and Rivest were able to carry their extension of the set L to twigs with 10 dead cells, which was the limit of the computing power available to them. Their results are summarized in Table 3.19.

3.3.4 Improved Upper Bound

For completeness, let us begin this section by describing the algorithm for constructing Ci, as given originally by Klarner and Rivest [KR73].

Step 1. Set Ci = ∅, B = the set containing the single twig shown in Figure 3.17,

and Wi(x, y) = 0.

Step 2. If B = ∅, stop (Ci is the desired set).

Step 3. Select any twig T ∈ B, and set B = B\{T }. If T contains no open cells

or exactly i dead cells, set Ci = Ci ∪ {T }, W = W + w(T ), and return to Step 2.

Step 4. For i = 1,..., 5, set Ti = Li ∗ T , and if Ti meets condition (∗) given below,

set B = B ∪ {Ti}. Return to Step 2.

39

Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 ∗ ∗∗∗

T1 = L1 T2 T3 T4 T5

∗ ∗∗∗

T2,1 T2,2 T2,3 T2,4 T2,5 T3,1 T3,2 T3,3 T3,4 T3,5 T4,1 T4,2 T4,3 T4,4 T4,5 T5,1 T5,2 T5,3 T5,4 T5,5 ......

Figure 3.20: The tree modeling the algorithm that generates the set Ci. The root r is a twig with one open cell and four context cells. For i, j = 1,..., 5, Ti = Li = Li ∗ r, and Ti,j = Lj ∗ Ti. The twig T1 is a leaf because it has no open cells.

Condition (∗):

• None of the cells of Li (except its root) overlap any of the cells or forbidden cells of T ; and

• None of the forbidden cells of Li overlap any cells of T .

The algorithm above can be viewed as a breadth-first-search traversal on an infinite tree (see Figure 3.20), which is rooted at the twig shown in Figure 3.17. The other vertices of the tree are all the twigs that can be “grown” from its root by repeatedly

applying operation ∗. The tree contains a directed edge from a twig T1 to a twig T2 if

T2 = Li ∗ T1 (for some Li ∈ L). Hence, each vertex of the tree has at most five outgoing edges, and its leaves are all twigs which have no open cells. We implemented the algorithm in a parallel C++ program, using Maple to derive

σi from fi(x, y). In our program, we did not keep the set Ci in memory, as its size is exponentially increasing. Instead, we simply accumulated the weights of the twigs as in Step 3. The “for loop” of Step 4 can be run in parallel, as there is no dependency

between the twigs T1,...,T5, as illustrated in Figure 3.20. We used OpenMP and OpenMPI to run the program in parallel on Tamnun–a high-performance computer cluster at the Technion. We had a limit of 24 hours for a single run of the program, and access to 33 computing nodes, each having 12 cores, with a total 396 cores. The

time for computing C10 is negligible (even without the use of parallelization). The results were systematically improved by increasing the number of dead cells in the set of basic twigs. The calculations become increasingly complex with increasing twig size, requiring exponentially-increasing amounts of computer time. We obtained the

improved upper bound λ ≤ 4.5252 from twigs with 21 dead cells. Computing C21 took roughly seven hours. Our results are summarized in Table 3.21, and the functions

W1(x, y),...,W21(x, y) are provided in Section A.2.

40

Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 i |Ci| σi 1 5 4.828427124 2 21 4.828427124 3 93 4.828427124 4 409 4.796155640 5 1803 4.765532996 6 7937 4.738743624 7 35084 4.716641912 8 153458 4.695386599 9 668128 4.676042980 10 2899941 4.658412767 11 12557503 4.642235017 12 54137703 4.627069746 13 232203877 4.612780890 14 991607177 4.599355259 15 4218349778 4.586741250 16 17881987659 4.574877902 17 75568307191 4.563716381 18 318489941731 4.553209881 19 1339093701964 4.543308340 20 5617897764831 4.533962650 21 23521568438976 4.525128839

Table 3.21: Our results

41

Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 ∗ ∗ ∗∗∗ ∗∗∗

L1 ∗ L2 L1 ∗ L4

Figure 3.22: The only two twigs with two dead cells and no open cells

3.3.5 Comparison of the Results

For i ≥ 6, the size of the set Ci in Table 3.21 is consistently larger than reported

in Table 3.19. As a result, σ10 in the former is slightly higher than in the latter. Unfortunately, Klarner and Rivest provided neither their implementation of the algorithm

for generating the sets Ci, nor the functions W6(x, y),...,W10(x, y). As a result, we have no means for comparing our results to theirs. Moreover, although Klarner and Rivest did not state this fact explicitly, we believe that they did not use the second bullet of condition (∗) in their program, motivating this claim with the following two arguments.

Argument 1. Consider the set C4. C4 contains all twigs that have exactly 4 dead cells, or those that have fewer dead cells and no open cells. Let us enumerate the twigs that have one, two, or three dead cells and no open cells. It can be easily seen that:

(i) There is only one twig (L1 ∈ L, shown in Figure 3.16) with one dead cell and no open cells.

(ii) There are only two twigs (see Figure 3.22) with two dead cells and no open cells.

(iii) There are only six twigs with three dead cells and no open cells. The sequences corresponding to these twigs are:

(a) L1 ∗ L2 ∗ L2;

(b) L1 ∗ L4 ∗ L2;

(c) L1 ∗ L1 ∗ L3;

(d) L1 ∗ L2 ∗ L4;

(e) L1 ∗ L4 ∗ L4; and

(f) L1 ∗ L1 ∗ L5.

We now show that there are 400 twigs with 4 dead cells. Each such twig T corresponds to a sequence α, β, γ, δ of four elements of L (Figure 3.16), such that T = δ ∗ γ ∗ β ∗ α. In total, there are |L|4 = 54 = 625 sequences of elements of L of length 4, some of which are invalid, namely, not representing a valid twig. For example, the only valid sequence

42

Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 that starts with L1 has length 1, since L1 has no open cells. Hence, it is easy to see that all the following sequences:

S1: L1, β, γ, δ;

S2: L2,L1, γ, δ;

S3: L4,L1, γ, δ;

S4: L2,L4,L1, δ;

S5: L4,L2,L1, δ;

S6: L2,L2,L1, δ;

S7: L4,L4,L1, δ;

S8: L3,L1,L1, δ; and

S9: L5,L1,L1, δ

are invalid since their prefixes correspond to configurations with less than four dead 3 2 cells and no open cells. Clearly, |S1| = 5 = 125, |S2| = |S3| = 5 = 25, and

|S4| = |S5| = |S6| = |S7| = |S8| = |S9| = 5. Finally, we show that there are exactly

twenty remaining invalid sequences. Refer to Figures 3.16, 3.23, and 3.24. The twigs L4

and L5 cannot be concatenated to any of the configurations (a–j) since this violates the

first bullet of condition (∗), namely, a cell of L4 or L5 would overlap with an occupied cell of the configuration or a cell marked forbidden. This results in 2·10 = 20 more invalid sequences. Thus, we obtain that the number of twigs with four dead cells is 4 P9 |L| − i=1 |Si| − 2·10 = 625−125 − 2·25−6·5−20=400. Hence, adding items (i–iii) above, we obtain |C4| = 400+1+2+6 = 409, which is consistent with |C4| given in

Table 3.19. On the other hand, restricting the construction of C4 further with the

second bullet of condition (∗) would imply that, for example, concatenating L1 to

configuration (d) is invalid. This would have decreased the size of C4.

Argument 2. Consider the pentomino P shown in Figure 3.25. The spanning tree

of P corresponds to the sequence L1∗L1∗L4∗L2∗L3 (equivalent to concatenating L1 twice

to configuration (d) shown in Figure 3.23). In terms of elements of C4, this sequence corresponds to a sequence of length two; its first element T is the twig corresponding

to adding L1 to configuration (d), and its second element is L1. By definition, these

two twigs (T and L1) belong to C4. However, if we were to use the second bullet of

condition (∗), T would be discarded as an element of C4. In such case, C4 would not be a complete set of building blocks for polyominoes; P would have no corresponding 5 5 sequence of weight x y of elements of C4. This implies that the method would fail to provide an upper bound on λ if the second bullet of condition (∗) is used, as some polyominoes (like P ) would be overlooked.

43

Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 1

(a) L1 ∗ L2 ∗ L3

1

2

(b) L2 ∗ L2 ∗ L3

2 31

21 1 2

L3 L2 ∗ L3 (c) L3 ∗ L2 ∗ L3

21

(d) L4 ∗ L2 ∗ L3

12

3

(e) L5 ∗ L2 ∗ L3

Figure 3.23: Concatenation of L2 and L3.

44

Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 12

(f) L1 ∗ L3 ∗ L3

21

3

(g) L2 ∗ L3 ∗ L3

32 421

21 1 3

L3 L3 ∗ L3 (h) L3 ∗ L3 ∗ L3

321

(i) L4 ∗ L3 ∗ L3

213

4

(j) L5 ∗ L3 ∗ L3

Figure 3.24: Concatenation of L3 and L3.

Figure 3.25: A pentomino.

45

Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 As a result, we discard the second bullet of condition (∗), and allow forbidden cells

of Li to overlap with cells of T in Step 4. Still, our results agree with Klarner and Rivest’s results only up to i = 5, and we are unable to trace the causes for the differences any further.

46

Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 Chapter 4

Polyiamonds

4.1 Introduction

While there is an extensive literature on polyominoes, the available data for the triangular lattice are much sparser, and as mentioned in Chapter 1, there is a large gap between

the lower and upper bounds on λT , the growth constant of polyiamonds. In this chapter,

we narrow this gap by improving both lower and upper bounds on λT . We show that

2.8424 ≤ λT ≤ 3.6050. The new lower bound is achieved through a concatenation argument tailored to the triangular lattice, and the new upper bound is obtained by using a composition argument and by analyzing the growth constant of a sequence dominating T (n), the sequence enumerating polyiamonds.

4.2 Lower Bound

We let T1(n) be the number of polyiamonds of size n whose largest (top-right) triangle is

of Type 1 (see Chapter 2), and let T2(n) be the number of polyiamonds of size n whose largest triangle is of Type 2. Lastly, we let x(n) (0 < x(n) < 1) denote the fraction of

polyiamonds of Type 1 out of all polyiamonds of size n, that is, T1(n) = x(n)T (n) and

T2(n) = (1 − x(n))T (n).

Our proof of the lower bound on λT uses the division of polyiamonds into Type 1 and Type 2, but does not employ the asymptotic proportion between the two types.

Theorem 4.1. λT ≥ 2.8424.

Proof. First note that by rotational symmetry, the number of polyiamonds of size n,

whose smallest (bottom-left) triangle is of Type 2, is T1(n). Similarly, the number of

polyiamonds, whose smallest triangle is of Type 1, is T2(n). We proceed with a concatenation argument tailored to the specific case of the triangular lattice. Interestingly, not all pairs of polyiamonds of size n can be concatenated. In addition, there exist many polyiamonds of size 2n which cannot be represented as

47

Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 (a) Two polyiamonds (b) Vertical concatenation (c) Horizontal concatenation Two attachments of Type-1 and Type-2 triangles

(d) Two polyiamonds (e) Vertical concatenation A single attachment of Type-2 and Type-1 triangles Figure 4.1: Possible concatenations of polyiamonds

the concatenation of two polyiamonds of size n. Let us count carefully the amount of pairs of polyiamonds that can be concatenated.

• Polyiamonds, whose largest triangle is of Type 1, can be concatenated only to polyiamonds whose smallest triangle is of Type 2, and this can be done in two 2 different ways (see Figures 4.1(a–c)). There are 2(T1(n)) concatenations of this kind.

• Polyiamonds, whose largest triangle is of Type 2, can be concatenated, in a single way, only to polyiamonds whose smallest triangle is of Type 1 (see Figures 4.1(d,e)). 2 There are (T2(n)) concatenations of this kind.

2 2 Altogether, we have 2(T1(n)) + (T2(n)) possible concatenations, and, as argued above,

2 2 2(T1(n)) + (T2(n)) ≤ T (2n). (4.1)

Let us now find an efficient lower bound on the number of concatenations. Equation (4.1) can be rewritten as T (2n) ≥ 2(x(n)T (n))2 + ((1 − x(n))T (n))2 = (3x2(n) − 2x(n) + 1)T 2(n). Elementary calculus shows that the function f(x) = 3x2 − 2x + 1 assumes its minimum at x = 1/3 and that f(1/3) = 2/3. Hence,

2 T 2(n) ≤ T (2n). 3

By simple manipulations of this relation, we obtain that

2 /n 2 / n T (n)1 ≤ T (2n)1 (2 ). 3 3

48

Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 2 1/k 2 1/(2k) 2 1/(4k) This implies that the sequence 3 T (k) , 3 T (2k) , 3 T (4k) ,... is mono-  2 1/n tone increasing for any value of k, and, as a subsequence of 3 T (n) , it converges 2 1/n to λT too. Therefore, any term of the form 3 T (n) is a lower bound on λT . In 2 1/75 particular, λT ≥ ( 3 T (75)) ≈ 2.8424.

4.3 Upper Bound

4.3.1 Number of Compositions

Theorem 4.2. Let P1,P2 be two polyiamonds of sizes n1 and n2, respectively. Then, 1 P1 and P2 can be composed and yield at most (n1 + 2)(n2 + 2)/2 different polyiamonds.

Proof. Refer again to Figure 2.1(a). A boundary edge of a polyiamond can be either vertical, ascending, or descending. The inside of the polyiamond can be either to the left or to the right of a boundary edge,2 where the latter case is marked below by overlining. Denote, then, the number of boundary edges of the various types by x and x¯, where x ∈ {v, a, d}. Thus, if the perimeter of a polyiamond is p, we can classify its boundary by the vector (v, a, d, v,¯ a,¯ d¯), where v + a + d + v¯ + a¯ + d¯= p. Suppose we are

given two polyiamonds P1,P2 with respective perimeters p1, p2 and associated perimeter

vectors (vi, ai, di, v¯i, a¯i, d¯i) (for i = 1, 2). Then, a trivial upper bound on the number of P ¯ ¯ compositions of P1,P2 is t∈{v,a,d,v,¯ a,¯ d¯} t1t2, using the convention ti = ti. Note that the number of boundary edges of any type of a polyiamond of perimeter p cannot exceed

p/2. Therefore, by convexity, the number of compositions of P1,P2 is bounded from

above by 2(p1/2 · p2/2) = p1p2/2. The perimeter of a polyiamond of size n is maximized when the cell-adjacency graph of the polyiamond is a tree, in which case the perimeter is n + 2. (Indeed, the perimeter of a single triangle is 3, and each of the additional n−1 triangles adds at most 1 to the perimeter.) The claim follows.

4.3.2 Balanced Decompositions

Definition 4.3.1. A decomposition of a polyiamond of size n into two polyiamonds

P1,P2 is k-balanced if k ≤ |Pi| ≤ n − k (for i = 1, 2).

Theorem 4.3. Every polyiamond of size n has at least one d(n − 1)/3e-balanced de- composition.

Proof. Let us rephrase the claim in graph terminology. In fact, we prove a stronger claim which states that every connected graph G, for which ∆(G) ≤ 3, can be partitioned

into two vertex-disjoint subgraphs G1,G2, such that (1) G1,G2 are connected; and

(2) d(n − 1)/3e ≤ |Gi| ≤ b(2n + 1)/3c (for i = 1, 2). This can be done constructively

1 A slightly sharper upper bound is (dn1/2e + 1)(dn2/2e + 1) + (bn1/2c + 1)(bn2/2c + 1). 2 The “left” (resp., “right”) side of an ascending edge means above (resp., below) the edge, while the “left” (resp., “right”) side of a descending edge means below (resp., above) the edge.

49

Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 by considering a spanning tree of G, marking an arbitrary vertex as its root, and traversing the tree downwards from the root while keeping the invariant that either the already-traversed subgraph meets the size requirement or the untraversed part contains a subgraph with this property. When the process stops, which must be the case, the desired decomposition is found.

4.3.3 The Bound

We can now prove our main result.

Theorem 4.4. λT ≤ 3.6050.

Proof. First, the combination of Theorems 4.2 and 4.3 implies that

bn/2c X δk,n/2 (k + 2)(n − k + 2) T (n) ≤ (1 − ) T (k)T (n − k). n−1 2 2 k=d 3 e

Indeed, every polyiamond of size n can be decomposed in at least one d(n − 1)/3e-

balanced way into a pair of polyiamonds P1,P2 of sizes n1 and n2, respectively (where

n1 + n2 = n), and a code with up to (n1 + 2)(n2 + 2)/2 options will tell us uniquely how

to compose P1,P2 in order to reconstruct P . (The factor (1 − δk,n/2/2), where δ·,· is the Kronecker delta, compensates for double counting which occurs when P1,P2 are of the same size.) Naturally, P may be decomposed in a balanced manner in more than one

way, and the number of compositions of P1,P2 can be smaller than (n1 + 2)(n2 + 2)/2, but this only helps. Second, define the sequence T 0(n) as follows.

  T (n) 1 ≤ n ≤ 75; T 0(n) = Pbn/2c δk,n/2 (k+2)(n−k+2) 0 0  n−1 (1 − 2 ) 2 T (k)T (n − k) n>75. k=d 3 e

(Recall that the sequence T (n) is known for 1 ≤ n ≤ 75.) Since T 0(n) ≥ T (n) for any value of n ∈ N (this can be proven by a simple induction on n), the growth constant 0 of T (n), if it exists, is an upper bound on λT . We show the existence of this growth constant by applying a standard calculation to n2 Pn/2 a simplified sequence with the Catalan-like recurrence a(n) = 2 k=n/3 a(k)a(n − k). The sequence a(n) dominates T 0(n) but both have the same asymptotic behavior. Assume that a(n) ∼ µn/n3. Then,

n/2 n/2 a(n) n2 X µk µn−k n3  n2 X  1 1 3 ∼ · · = + (∗) µn/n3 2 k3 (n − k)3 µn 2 k n − k k=n/3 k=n/3

50

Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 The quantity (*) is bounded from below and from above by some constants:

n/2 n2 X  2 3 3 n2 n 343 343 (∗) ≥ + = · · = ≈ 3.57; and 2 n 2n 2 6 8n3 96 k=n/3 n/2 n2 X  3 2 3 n2 n 125 125 (∗) ≤ + = · · = ≈ 10.42. 2 n n 2 6 n3 12 k=n/3

Hence, a(n) = Θ(µn/n3) and so the growth constant of a(n) is µ. As noted above, T 0(n) has the same asymptotic behavior. Finally, numerical calculations show that the asymptotic growth constant of T 0(n), 0 1/n i.e., limn→∞(T (n)) , is about 3.6050, implying the claim.

51

Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 Chapter 5

Polycubes

5.1 Introduction

A d-dimensional polycube is said to be proper in d dimensions if it spans all the d dimen- sions (and thus, cannot be embedded in d − 1 dimensions). Following Lunnon [Lun75], we let DX(n, d) denote the number of polycubes of size n that are proper in d dimensions, and DT(n, d) denote the number of tree polycubes (polycubes whose cell-adjacency graph is a tree) of size n, which are proper in d dimensions. Despite the simplicity of these definitions, computing the functions DX(n, d) and DT(n, d) has shown to be an extremely difficult task. The main interest in proper polycubes stems from the simple relation between the total number of polycubes and the number of proper polycubes, provided by the formula

d X d A (n) = DX(n, i), d i i=0

given originally by Lunnon [Lun75]. The formula is proved by noting that every proper d i-dimensional polycube can be embedded in the d-dimensional space in exactly i different ways (according to the choice of dimensions for the polycube to occupy). In addition, if n ≤ d, the polycube simply cannot occupy all d dimensions (since a polycube of size n can occupy at most n−1 dimensions), and so DX(n, d) = 0 in this case. Hence, in a matrix listing the values of DX, where the vertical coordinate is n and the horizontal coordinate is d, the top-right triangular half and the main diagonal contain only 0s. This gives rise to the question of whether a pattern can be found in the sequences DX(n, n − k), where k < n is the ordinal number of the diagonal.

pn It was proven [BBR10] that limn→∞ DX(n+1, d)/DX(n, d) = limn→∞ DX(n, d) =

λd, and using a relatively simple analysis of the diagonals DX(n, n−k), it was proven

that λd = 2ed−o(d). Moreover, λd was conjectured to be asymptotically equal to T (2d−3)e+O(1/d). It was also shown [AB11] that λd , the growth constant of tree polycubes, is also 2ed−o(d), and it was estimated at (2d−3.5)e + O(1/d). Significant

53

Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 k DX(n, n − k)

1 2n−1nn−3

2 2n−3nn−5(n−2)(2n2 − 6n + 9)

3 2n−6nn−7(n−3)(12n5 − 104n4 + 360n3 − 679n2 + 1122n − 1560)/3

2n−7nn−9(n−4)(8n8 −128n7 +828n6 −2930n5 +7404n4 −17523n3 +41527n2 − 4 114302n + 204960)/6

2n−9nn−11(n−5)(240n11 − 6000n10 + 62240n9 − 356232n8 + 1335320n7 − 5 4062240n6 + 12397445n5 − 42322743n4 + 150403080n3 − 535510740n2 + 1923269040n − 3731495040)/360

2n−11nn−13(n−6)(96n14 − 3424n13 + 51856n12 − 440688n11 + 2398912n10 − 9580440n9 + 33940138n8 − 127651774n7 + 535284225n6 − 2448081038n5 + 6 11984445891n4 − 56265094748n3 + 248868418932n2 − 939451308048n + 1785362705280)/360

2n−13nn−15(n−7)(4032n17 − 193536n16 + 4019904n15 − 47679184n14 + 363148352n13 − 1946680944n12 + 8322494124n11 − 33793043592n10 + 7 149724735468n9 − 747463726205n8 + 4148836864606n7 − 24441080660523n6 + 146137469433102n5 − 851686123590540n4 + 4585470174542376n3 − 22517704978919136n2 + 85163968967728896n − 156017752081551360)/45360

Table 5.1: The diagonal formulae Peard and Gaunt [PG95] conjectured (without proof) for DX(n, n − k) up to k = 6, and the seventh diagonal formula DX(n, n − 7) Luther and Mertens [LM11] conjectured (also without proof).

progress in estimating λd has been obtained along the years in the literature of statistical physics, although the computations usually relied on unproven assumptions and on formulae for DX(n, n − k) which were interpolated empirically from known values

of Ad(n). Peard and Gaunt [PG95] predicted that the diagonal formula DX(n, n−k) has the n−2k+1 n−2k−1 pattern 2 n gk(n) (for k > 1), where gk(n) is a polynomial in n. In fact,

k has to be a root of gk(n) since DX(n, 0) = 0 for n > 1. Therefore, the expected n−2k+1 n−2k−1 form is 2 n (n − k)hk(n), where hk(n) is a polynomial in n, and explicit

formulae for hk(n) were conjectured for k ≤ 6 [PG95]. Luther and Mertens [LM11] later conjectured a formula for k = 7. These formulae are given in Table 5.1. After a careful inspection of the polynomials, which revealed that the leading coefficient of k−1 hk(n) has the form 2 /(k − 1)!, Asinowski et al. [ABBR12] refined the conjectured 2n−knn−2k−1(n−k) formula to DX(n, n − k) = (k−1)! Pc(n), where Pc(n) is a monic polynomial in n. It has also been conjectured [BBR10, LM11] that the degree of Pc(n) is 3k−4. In this Chapter, we prove these conjectures rigorously as stated in the following theorem.

54

Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 Theorem 5.1. The general pattern of DX(n, n − k), for a fixed k > 0, is

2n−k nn−2k−1(n − k)P (n), (k − 1)! 3k−4

where Pc(n) is a monic polynomial in n of order c.

An immediate consequence of this theorem is that DX(n, n − k) can be extrapolated from 3k−3 known values of DX(n, n − k). Using Cayley trees, it can be shown (see, e.g., [BBR10]) that

DX(n, n − 1) = 2n−1nn−3

(sequence A127670 in the Online Encyclopedia of Integer Sequences [oei]). Barequet et al. [BBR10] proved rigorously, for the first time, that

DX(n, n − 2) = 2n−3nn−5(n − 2)(2n2 − 6n + 9)

(sequence A171860). The proof uses a case analysis of the possible structures of spanning trees of the polycubes, and the various ways in which cycles can be formed in their cell-adjacency graphs. Similarly, Asinowski et al. [ABBR12] proved that

DX(n, n − 3) = 2n−6nn−7(n − 3)(12n5 − 104n4 + 360n3 − 679n2 + 1122n − 1560)/3,

again, by counting spanning trees of polycubes, yet the reasoning and the calculations were significantly more involved. The proof applies the inclusion-exclusion principle in order to count correctly polycubes whose cell-adjacency graphs contains certain subgraphs, so-called “distinguished structures.” In comparison with the case k = 2, the number of such structures for k = 3 is substantially higher, and the ways in which they can appear in spanning trees are much more varied. The latter proof provided a better understanding of the difficulties that one would face in applying this technique to higher values of k. The number of distinguished structures grows rapidly, the inclusion relations between them are much more complicated, and the ways in which they can be connected by forests are much more varied. This yields a much larger number of terms in the inclusion-exclusion analysis, and as anticipated [ABBR12], carrying this approach beyond k=3 would create a case analysis beyond the patience and ability of a human, making it totally impractical to achieve a similar proof manually for k > 3. We thus create a theoretical set-up for proving the formula for DX(n, n−k), for a fixed value of k. Our method fully automates the manual method presented in [ABBR12, BBR10], allowing the case analysis to be made by a computer. For this nontrivial generalization we prove a few key observations about polycubes that are proper in n−k dimensions. We also provide a general characterization of distinguished structures, and design algorithms that produce, analyze, and enumerate them automatically, even for

55

Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 1 22

x3 x2 11 3

x1 (a) Polycube P (b) Adjacency graph γ(P ) 10 10 10 2 20 2 2 20 2

10 1 3 00 3 111 3 11 00 3

(c) The spanning trees of γ(P )

Figure 5.2: A polycube P , its corresponding adjacency graph γ(P ), and the spanning trees of γ(P ).

complex structures, forests, and cycles that do not appear in the case k=3. Using our implementation of this method, we find the explicit formulae (which have never been proven before) for DT(n, n−4) and DX(n, n−4) (sequences A259015 and A259017 in OEIS [oei]), and DT(n, n − 5) and DX(n, n − 5) (sequences A290738 and A290868 [oei]), stated in the following theorems.

Theorem 5.2.

1. DT(n, n − 4) = 2n−7nn−9(n − 4)(8n8 − 140n7 + 1010n6 − 3913n5 + 9201n4 − 15662n3 + 34500n2 − 120552n + 221760)/6.

2. DX(n, n − 4) = 2n−7nn−9(n − 4)(8n8 − 128n7 + 828n6 − 2930n5 + 7404n4 − 17523n3 + 41527n2 − 114302n + 204960)/6.

Theorem 5.3.

1. DT(n, n − 5) = 2n−9nn−11(n − 5)(240n11 − 6480n10 + 73640n9 − 461232n8 + 1778615n7 − 4707195n6 + 11632070n5 − 41919528n4 + 158857920n3 − 483329520n2 + 1481660640n − 2863123200)/360.

2. DX(n, n − 5) = 2n−12nn−11(n − 5)(240n11 − 6000n10 + 62240n9 − 356232n8 + 1335320n7 − 4062240n6 + 12397445n5 − 42322743n4 + 150403080n3 − 535510740n2 + 1923269040n − 3731495040)/45.

5.2 Overview of the Method

Denote by Pn the set of polycubes of size n which are proper in n−k dimensions. (The

value of k is fixed, therefore we omit it from the notation.) For P ∈ Pn, let γ(P ) denote the directed edge-labeled graph that is constructed as follows:

56

Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 • The vertices of γ(P ) correspond to the cells of P ;

• Two vertices of γ(P ) are connected by an edge if the corresponding cells of P are adjacent;

• An edge has label i (1 ≤ i ≤ n − k) if the corresponding cells have different

i-coordinates (their common (d−1)-dimensional face is perpendicular to the xi axis); and

• The direction of the edge is from the lower to the higher cell (with respect to the

xi direction).

See Figure 5.2 for an example. Since P 7→ γ(P ) is an injection, it suffices to count the graphs obtained from the

members of Pn in this way. We shall count these graphs by counting their spanning trees. A spanning tree of γ(P ) has n−1 edges labeled by numbers from the set {1, 2, . . . , n − k}; all these labels are present because the polycube is proper in n−k dimensions. Hence, n−k edges of the spanning tree are labeled with the labels 1, 2, . . . , n − k, and the remaining k−1 edges are labeled with repeated labels from the same set. Observation 5.2.1 characterizes all the different possibilities of repeated edge labels in the spanning tree of a proper polycube.

Observation 5.2.1. There is a bijection between the combinations of repeated edge labels and the partitions of the integer k−1. Specifically, each partition p ∈ Π(k − 1) corresponds to the combination of |p| different repeated labels in the spanning tree, in which the ith repeated label appears p[i]+1 times. In such a case, we say that the tree is labeled according to p.

For example, let T be a spanning tree of γ(P ) for a polycube P that is proper in n−4 dimensions. Hence, T must contain all the edge labels 1, . . . n − 4. Thus, three edges of T will repeat labels from the set {1 . . . n − 4}, as illustrated in Figure 5.3. An immediate consequence of Observation 5.2.1 is that a tree can have at most 2(k−1) repeated edge labels, in which case the repeated labels appear in k−1 pairs.

Observation 5.2.2. Every label must occur an even number of times in any cycle of γ(P ).

In order to compute |Pn|, we consider all possible directed edge-labeled trees of size n with combinations of edge labels as in Observation 5.2.1, and count only those that represent valid polycubes. In Section 5.2.2 we characterize all substructures that are present in some of these trees due to the fact that there are less dimensions than cells. By analyzing these substructures, we are able to compute how many of these trees actually represent polycubes. Then, we develop formulae for the numbers of all possible spanning trees of the polycubes, and finally derive the actual number of polycubes.

57

Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 j j i T T T i ` i i i i

(a) (1,1,1) (b) (1,2) (c) (3)

Figure 5.3: An illustration of the possible repetitions of edge labels in a spanning tree of an n-cell polycube that is proper in n−4 dimensions. In (a), the three edges are labeled with three different labels i, j, ` ∈ {1, . . . n − 4}, each of which would thus appear twice in T . In (b) two of the three edges are labeled with the same label i, and one edge with a different label j. As a result, i would appear three times in T and j would appear twice. Finally, in (c), the three edges are labeled with the same label i, and thus i would have a repetition of 4 in T . These are all the possible combinations of repeated edge labels for the n−4 case, which are equivalent to Π(3), as shown above.

5.2.1 Counting

Lemma 5.2.3. [ABBR12, Lemma 7] [BBR10, Lemma 2] The number of directed trees with n vertices and n−1 distinct edge labels 1, . . . , n − 1 is 2n−1nn−3, for n ≥ 2.

Our approach is based on counting polycubes by enumerating the spanning trees of their adjacency graphs. In order to apply Lemma 5.2.3 to counting spanning trees of polycubes, we use the distinct labels i, i0, i00,... for the edges in direction i. (See, e.g., Figure 5.2 (c).) Note that the trees that can be obtained by exchanging (permuting) i, i0, i00,..., are, in fact, also spanning trees of the same adjacency graph, and that we do not make this distinction in the adjacency graph itself.

Let, then, Tp denote the number of directed trees with n vertices that are labeled according to p ∈ Π(k − 1).

n−k n−1 n−3 Corollary 5.4. Tp = π(p) |p| 2 n .

5.2.2 Distinguished Structures

Generation

In the reasoning below, we shall consider several small structures which may be contained in the spanning trees that we count. These structures are of interest because the following two things may happen when we attempt to build the polycube corresponding to a directed edge-labeled tree:

(a) Cells may coincide (Figures 5.4(e) and 5.6(a,b)). A tree with overlapping cells is invalid and does not correspond to any polycube; and

58

Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 j ` ij i j0 `2 `1

ii 0 i00 ` ` jjj 0 j00 j000

i0 j0 i0 j00

(a) (b) (c) (d)

j a b ij i j

0 00 i 0 jjj j `` i aa `

0 ij j i j

(e) (f) (g) (h)

Figure 5.4: (a–f) A few distinguished structures for k=4 (note that (d) is discon- nected); (g) and (h) are cycle structures. A dotted line is drawn between every pair of neighboring cells and around every pair of coinciding cells.

(b) Two cells which are not connected by a tree edge may be adjacent (Figures 5.4(b) and 5.6(c,d)). Such a tree corresponds to a polycube which has cycles in its cell-adjacency graph, and therefore, its spanning tree is not unique.

Hence, in order to count trees correctly, we will consider several small structures con- tained in the trees we count, which cause the two problems above. Following [ABBR12], we will refer to such structures as distinguished structures. A distinguished structure is a small labeled graph that is “responsible” for the presence of two coinciding or adjacent cells, as explained above. More precisely, a distinguished structure is the union of all paths (edges and incident vertices) that run between two coinciding or adjacent cells. Every such path uses some repeated labels. Therefore, the number of their occurrences in the trees that we count is limited. The enumeration of the distinguished structures is, thus, a finite task. A distinguished structure can be classified as one of the following:

• Basic Structures: A basic structure consists of a path that connects a pair of coinciding or neighboring cells. Basic structures are the building blocks of the two other types of distinguished structures.

• Compound Structures: A compound structure is a connected structure that contains two or more occurrences of basic structures which cover all its edges, such that every such occurrence shares an edge with another occurrence.

• Disconnected Structures: A disconnected structure (see, e.g., Figure 5.5(a)) is a collection of edge-connected structures (basic or compound). Different com- ponents of a disconnected structure may share a vertex, as illustrated in Fig- ures 5.5(b–d).

Similarly to Observation 5.2.2, for every label of an edge along the path between two vertices that correspond to coinciding cells, repetitions of this label occur an even number

59

Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 a

0 jj j0 `iii `0

s1 s2 s3 (a) A disconnected structure

a a

0 0 `0 jj j0 ` jj j ` a `

0 0 i0 ` jj j i ` i0 i iii 0

(b) (c) (d)

Figure 5.5: (a) A disconnected distinguished structure which has three connected components s1, s2, s3. (b–d) Some other possible configurations of its connected compo- nents s1, s2, s3.

of times on this path, and a structure that leads to a non-existing adjacency results in a path obtained by removing one edge from a cycle of an even length. Therefore, the length (number of edges) of a path that connects two coinciding cells (respectively, neighboring cells) is bounded from above by 2(k−1) (respectively, 2k−1). Therefore, the length of a cycle in γ(P ) can be at most 2k. Moreover, the number of cycles in γ(P ) is bounded from above by k−1, since a spanning tree of a cycle must have at least one pair of repeated edge labels and there can be at most 2(k−1) such pairs. Therefore, the polycube can have at most k−1 cycles.

Let DSk denote the set of distinguished structures in n−k dimensions. We hereafter

refer to the size of a distinguished structure σ ∈ DSk as the number of its vertices, and denote this quantity by |σ|. We now set an upper bound on |σ|.

Observation 5.2.4. The size of a basic structure is bounded from above by 2k.

Lemma 5.2.5. Let σ ∈ DSk be a compound structure labeled according to some partition p ∈ Π(i), 1 ≤ i ≤ k−1. Then, |σ| ≤ 2(i + 1).

Proof. By induction on i. For the basis of the induction (i = 1), the only distinguished structures are shown in Figure 5.6 and there are no compound structures. For i = 2, the compound structures are formed by identifying edges of two copies of the structures in Figure 5.6, forming connected compound structures of size at most 6, which are labeled according to (2) ∈ Π(2), and for which the claim holds. (Note that the partition (1, 1) cannot label any compound structures in this case.)

We now proceed with the inductive step. Let σ ∈ DSk be a compound structure labeled according to some partition p ∈ Π(i). Let e be an edge of σ which appears in

60

Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 ` ` ` ` ` ` ` `

iii iii 0 iii 0 iiiiii0 i0ii 0 iii 0jijii 0 jj 0 jj jj0j jjj0 jj0 j0j jj0j j0 j0 j0

(a)(a)(a)(a) (b) (b) (b) (b) (c) (c) (c) (c) (d) (d) (d) (d) (a) (b) (c) (d)

FigureFigure 5:Figure All 5:Figure members All 5: members All 5: Allmembers of DS members of2.DS of2DS. of 2DS. 2. Figure 5.6: All members of DS2. compoundcompoundcompoundcompound structure structure structure labeled structure labeled labeledaccording labeled according according to according some to some to partition tosome partition some partitionp partition∈ pΠ(∈kpΠ(−∈pk1).Π(∈−kΠ(1). The−k1).− The1). The The twostructure orstructure morestructureσstructure occurrencescanσ becanσ decomposedcan beσ can decomposed be of be decomposed one decomposed into or more into two into twocompound basic into two compound two structures compound compound or basic or basic in or structuresσ basicor. structures basicThe structures structureσ structures1 andσ1 andσ1 σσand1canand be σ2 labeledσ2 labeledσ2 accordingσlabeled2 labeled according according to accordingp1 to∈pΠ( to1 ∈jp to)1Π( and∈pj1Π()∈ andpj2Π()∈ andjp)Π(2 and∈`p),2Π(∈ respectively,p`2),Π(∈ respectively,`Π(),` respectively,), respectively, such such that: such that: such that: that: split (at the edge e) into two compound or basic structures σ1 and σ2, labeled according • 1 ≤• j,1•≤ ` <1j,•≤ k `1−

•| σ|•|=σ•|σ||=1σ•| |+|σ=σ1|σ||2+=σ|1 −||σ+22;1||| −σ+ and22;|σ −2 and|2; − and2; and • 1 ≤ j, ` < i; • pr•=p|r•p|=+p•r⊕|p=pp|+r=|=⊕p||p+p|p|=⊕+(|+p|p⊕k=|−p+(|1)=pk|+(− =|p1)|k|+(p−1 =k|1)+−|p⊕ =1)1p|+|1 =p+⊕1||p+p112⊕+|+p|p1⊕2+p|+|12p+−⊕2||1p+22 =⊕−|+pj12⊕+ =−p`1+2j−+ =|p1`1j+| =+|p`j|p1+2|+||−`p+|1p1.||2+p|−1||p+1.2|−|p21.|−1. Hence,Hence,jHence,+Hence,`j=+kj` +=j`|k+p=|+` −k|=p(+|pk −1|p+|(|+| −|pp1||p(| −|2+p|).1(|||pp+21||).|p+2||).p2|). •| σ|=|σ1|+|σ2|−2; and NoteNote thatNote thatNote|p| that −|p that(||p −|1p||(+| −p1||(|p −|2+p|1()||p+ =12|)|+p−2 =1||)p since2− =|)1 =− since1σ−1 since1andσ since1 andσσ12 σandshare1σ2andshareσ2 anσshare2 edge. anshare edge.an Hence,an edge. edge. Hence, Hence, Hence, j + `j =+j`k+=−j`1.+k=−` Byk=1.−k the By1.− induction1. Bythe By the induction the induction hypothesis, induction hypothesis, hypothesis, hypothesis, we have we havewe that we have that| haveσ that|| ≤σ that2(||σ ≤i +|2(σ ≤ 1)i|+2( ≤ andi 1)2(+ andi 1)+ and1) and • p = |p|+⊕p = |p|+i = |p |+⊕p +|p |+⊕p −δ = j+`1+|p1 |+1|p 1|−δ, such that |σ || ≤σr 2(||σ ≤j +|2(σ ≤ 1).j|2(+ ≤j Therefore,1).2(+j 1). Therefore,+ 1). Therefore, Therefore,|σ|1=|σ|σ=|σ|1|+||σ=σ|σ||=2+σ| −|σ+2|| −+σ≤2 |22(σ −≤i|2+ −2(≤ 1)2i +2(≤ +i 1) 2(+ +ji1 1)+ 2( + 1)j 2 2(+ +−j 1) 2(2+j− = 1)+2− 1) =2− =2 = 2 2 2 2 1 1 2 1 21 2 2 2(i +2(ji++2( 1)ji12(+ =ij 1)+ if2+k =je. 1)+is 2k = 1). labeled 2 =k. 2k. with a repeated label 2 2 2 2 δ = CorollaryCorollaryCorollary0Corollary 10. otherwise 10.The 10.The size 10.The sizeofThe a size of compound size a of compound a of compound a structure compound structure structure is structure bounded is bounded is bounded isfrom bounded from above from above from by above2k by above. 2 byk. 2 byk.2k.

Hence, j+` = i+|p|−(|p1|+|p2|)+δ. LemmaLemmaLemma 11.Lemma 11.Let 11.σLet 11.∈Letσ DS∈Letσk DS∈beσ k DS∈ abe distinguished DSk abek distinguishedbe a distinguished a distinguished structure structure structure that structure that is composed that is that composed is composed is of composedc of c of c of c connectedconnectedconnected componentsconnected components components components and andlabeled and labeled and according labeled labeled according according to according some to some to partition some to partition some partitionp partition∈ Π(p ∈i)p,Π(1∈ip≤)Π(,∈i1iΠ(≤)≤, i1i),≤1i≤≤i ≤ Note that |p|−(|p1|+|p2|) = −δ by the definition of δ and the fact that σ1 and σ2 share k − 1k.− Then,k1.−k Then,1−.pr Then,1.≤ Then,p |rσ≤|p −r |σc≤p|r≤ − |≤σpc|r| −≤σ+|cp −⊕r≤pc+.p≤r⊕+pr.⊕+p.⊕p. the edge e. Hence, j+` = i. By the induction hypothesis, we have that |σ1| ≤ 2(j+1) Proof:Proof:Proof:TheProof:The firstThe first relation,The first relation, first relation,|σ relation,| −|σc|≥ −|σc|p| −σ≥,|c states −p≥c,p states≥, thatp states, statesthat the that number the that the number the number of number edges of edges of in edges ofσ in edgesσ in σ in σ and |σ | ≤ 2(`+1). Therefore, |σ| = |rσ |+r |σ r|−r2 ≤ 2(j+1)+2(`+1)−2 = 2(j+`+1) = is atis2 least atis least atis the leastat number the least the number the number of number repeated of repeated of repeated of labels repeated labels1 implied labels2 impliedlabels implied by implied the by partition the by by the partition the partitionp. partition Clearly,p. Clearly,p.p Clearly,. Clearly, 2(ithis+ 1).this conditionthis conditionthis condition is condition necessary is necessary is necessary is for necessaryp forto forp labelto forp labeltoσp. labelto Theσ label. Theσ second.σ The. second The relation second second relation relation is relationtrue is true since is true is since true since since the numberthethe numberthe number of unique number of unique oflabelsunique of uniquelabels inlabelsσ inlabels(labelsσ in(labelsσ in each(labelsσ (labels each of which each of each which of appears which of appearswhich appears only appears only once only once in onlyσ once) in onceσ in) σ in) σ) is boundedis boundedis boundedis from bounded from above from above from by above⊕ byabovep.⊕ This byp. by⊕ Thisp is.⊕ because Thisp. is This because is because a is path because a path which a path a which path contains which containswhich contains a uniquecontains a unique a unique a unique Corollary 5.5. The size of a compound structure is bounded from above by 2k. edge-labeledge-labeledge-labeledge-label must must contain must contain must contain at contain least at least at two atleast two occurrences least two occurrences two occurrences occurrences of a of repeated a of repeated aof repeated a edge-label repeated edge-label edge-label edge-label`i `i `i `i (Figure(Figure(Figure 5 (c-d)).(Figure 5 (c-d)). 5 Therefore, (c-d)). 5 (c-d)). Therefore, Therefore, Therefore,in the in worst the in the inworst case, the worst case, worst two case, twooccurrences case, two occurrences two occurrences occurrences of `i ofmay`i ofmay form` ofi may` formi may form form Lemmaeithereither structure 5.2.6.either structureeither structureLet (c) structure orσ (c)∈ (d) or(c) DS (Figure (d) (c) ork be (d)(Figureor a (d) (Figure5), distinguished (Figure and 5), andevery 5), 5), and every remaining and structure every remaining every remaining occurrence remainingthat occurrence is composed occurrence occurrence of `i ofcan of`i ofcanc` ofconnectedi can`i can resultresult inresult one inresult moreone in one in more unique one more unique more label, unique unique label, as label, illustrated as label, illustrated as illustrated as inillustrated Figure in Figure in 6. Figure in Since Figure 6. Since 6. this Since 6. thisis Since true this is thistrue for is true is for true for for componentsall |pall| repeated|allp| repeatedall| andp| |repeatedp labels,| labeledrepeated labels,σ labels, accordingcan labels,σ havecanσ can haveσ atcan to havemost at some have most at⊕p mostat partitionunique⊕ mostp ⊕uniquep⊕ labels.uniqueppunique labels.∈ Π( labels.i labels.), 1 ≤ i ≤ 2k −21.2 Then,2 pr ≤ |Theσ| −The abovec ≤The abovepThe characterizationr above+ characterizationabove⊕p. characterization characterization of distinguished of distinguished of distinguished of distinguished structures structures structures allows structures allows for allows the allowsfor design thefor for the design the design design of anof algorithm anof algorithm anof an algorithm for algorithm producing for producingfor for producingDS producingkDS. ThekDS. TheDS algorithmk.k The. algorithm The algorithm begins algorithm begins with begins begins with generating with generating with generating generating all all all all “free“free trees”“free trees”“free (non-isomorphic trees” (non-isomorphictrees” (non-isomorphic (non-isomorphic trees) trees) of trees) size of trees) atsize of most size ofat sizemost at2k, most at the 2k most, upper 2thek, 2 the upperk, bound the upper bound upper specified bound bound specified specified specified Proof.in ObservationinThe Observationin Observationfirstin Observation 8 relation, and 8 and Corollary 8 and| Corollary 8σ| and − Corollaryc 10. Corollary≥ Then,p 10.r, 10.states Then, it 10. Then, labels Then,it that labels it the the labels it edges the labels number the edges of the edges every of of edges every edges of free every of freetree every in freeσ treeis free tree at tree least k−1 k−1 k−1k−1 theT numberofT sizeofTt sizeofaccordingT of sizeoft repeatedaccording sizet accordingt toaccording every to labels every to partition every to implied partition every partitionp partition∈ by ∪pi=1∈ thep ∪Π(∈i=1p partitioni ∪)∈Π(i which=1 ∪ii)Π(=1 whichiΠ() satisfies whichpi). satisfies which Clearly, satisfies the satisfies relation the this the relation the condition relation relation is necessary for p to label σ. The second relation is true since the number of unique labels in σ (labels each of which appears10 10 only10 10 once in σ) is bounded from above by ⊕p. This is because a path which contains a unique edge label must contain at least

two occurrences of a repeated edge label `i (Figures 5.6(c–d)). Therefore, in the worst

case, two occurrences of `i may form either structure (c) or (d), and every remaining

occurrence of `i can result in one more unique label, as illustrated in Figure 5.7. Since this is true for all |p| repeated labels, σ can have at most ⊕p unique labels.

61

Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 u1 u2 u3 ... up[i]−1 up[i]

0 00 000... 0000... `i `i `i `i `i

Figure 5.7: A construction which yields the maximum possible number of unique 0 edge labels. `i and `i form the structure shown in Figure 5.6(c), and every remaining occurrence of `i creates another copy of the same structure, resulting in a new unique label.

The above characterization of distinguished structures allows for the design of an

algorithm for producing DSk. The algorithm begins with generating all “free trees” (non- isomorphic trees) of size at most 2k, the upper bound specified in Observation 5.2.4 and Corollary 5.5. Then, it labels the edges of every free tree T of size t according to every k−1 partition p ∈ ∪i=1 Π(i) which satisfies the relation in Lemma 5.2.6 (pr ≤ t−1 ≤ pr +⊕p) so as to obtain a directed edge-labeled tree T 0. Then, the algorithm checks whether T 0 contains coinciding or neighboring cells by using a simple depth-first traversal that starts from an arbitrary node and assigns every other node its appropriate coordinate. 0 If such cells are found, then T is added to DSk if it is not isomorphic to any structure

σ ∈ DSk of size t, and at least one of the following conditions holds:

1. T 0 is basic, meaning that it contains two coinciding or neighboring cells which are connected by a path of length t−1 (see, e.g., Figures 5.4(b,e) and 5.6(a–d));

2. T 0 is compound and is not a configuration of a disconnected structure. This

means that it is isomorphic to a set of basic structures b1, . . . , bm ∈ DSk, such

that every isomorphic copy of b1, . . . , bm shares an edge with another isomorphic 0 copy of b1, . . . , bm, and these isomorphic copies cover all the edges of T (see, e.g., Figures 5.4(c,f)).

Disconnected distinguished structures (see, e.g., Figures 5.4(d) and 5.5) are generated

by checking if every collection of edge-connected structures in DSk yields a single k−1 disconnected structure labeled according to some p ∈ ∪i=1 Π(i). The time complexity of this algorithm is roughly exponential with k, since the number of free trees the algorithm iterates through is exponential with k, and the processing time for each free tree is also roughly exponential with k.

Enumeration

Let us now turn to the enumeration of occurrences (i.e., isomorphic copies) of distin- guished structures in directed trees with edge labels as explained earlier. In counting directed trees with n−1 labeled edges which have a distinguished structure as a subgraph, the following logic will be used.

62

Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 τ2

ii 0

τ1 τ3

Figure 5.8: A sequence of three rooted trees τ1, τ2, τ3 (roots are shown in black and edge labels and directions are omitted for simplicity) attached to the vertices of the structure shown in Figure 5.6(a).

Lemma 5.2.7. [BBR10, Lemma 4] The number of ordered sequences T = (τ1, . . . , τk) of k ≥ 1 rooted trees with a total of n − k edges and distinct edge labels 1, . . . , n − k is nn−k−1k.

The next lemma is a direct application of the lemma above.

Lemma 5.2.8. [BBR10, Lemma 5] The number of ordered sequences T˙ = (τ1, . . . , τk)

of k ≥ 1 trees, such that τ1 has two distinguished roots (which may coincide) and all other trees have one root, with a total of n − k edges and distinct edge labels 1, . . . , n − k, is nn−k.

The following lemma is a simple generalization of the previous one.

Lemma 5.2.9. The number of ordered sequences T¨ = (τ1, . . . , τk) of k ≥ 1 rooted trees

that contain c (additional) distinguished roots (which may coincide), such that τ1 has at least two distinguished roots, with a total of n − k edges and distinct edge labels 1, . . . , n − k, is nn−k+c−1.

Proof. Consider a sequence t˙ as in Lemma 5.2.8, and mark c − 1 arbitrary vertices as the extra roots. In this way, nn−k+c−1 sequences T¨ are obtained.

We will now use Lemma 5.2.9 in order to prove Lemma 5.2.10, which provides the

formula for the number of occurrences of any structure in DSk.

Lemma 5.2.10. Let σ ∈ DSk be a distinguished structure composed of c ≥ 1 trees

s1, . . . , sc with distinct edge labels 1,..., |σ|−c. The number of occurrences of σ in trees n−|σ|+2c−3 Qc of size n with distinct edge labels 1, . . . , n − 1 is Fn(σ) = n i=1 |si|.

Proof. • c = 1: When σ is composed of a single connected component, we obtain |σ|nn−|σ|−1 occurrences, as in Lemma 5.2.7; which equals the number of ordered sequences T of |σ| rooted trees that can be attached to the vertices of σ. See Figure 5.8 for an example.

63

Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 τ τ τ τ7 3 4 5 τ9 a r2

ii 0 j j0 h h0 `` 0

κ1 τ τ κ κ κ τ 2 1 2 τ 3 τ 4 10 r 6 8 r1

s1 s2 s3 s4

Figure 5.9: An example of a distinguished structure σ with c=4 connected components s1, . . . , s4. Each connected component si has a connector κi, shown in white. κ1 is attached to the root of τ1, and a sequence of |σ|−(c−1) = 10 rooted trees τ1, . . . , τ10 is attached to the rest of the vertices of σ. The three additional distinguished roots r, r1, r2 are shown in gray. τ1 must always have at least two distinguished roots (which might coincide). In this example, τ1 has two distinguished roots: the original root which is attached to κ1, and r. Both τ7 and τ10 have two distinguished roots as well (r2 and r1, respectively).

• c > 1: We show this case in an algorithmic manner. We begin with a sequence ˙ t˙ = (τ1, . . . τ|σ|−(c−1)) ∈ T of |σ|−(c−1) rooted trees, with one extra root r in τ1. Qc Consider Figure 5.9. The factor i=1 |si| stands for the number of options for choosing the connectors κ1, . . . , κc: The vertices through which the components of

σ are connected. The vertices of s1 are attached to τ1, . . . , τ|s1|, such that κ1 (the connector of s1) is attached to the root of τ1. The vertices of the other connected

components si, for i > 1 (except of their connectors) are attached to the roots 0 of the remaining rooted trees τ|s1|+1, . . . , τ|σ|−(c−1). Finally, let c = c, and let Si denote the union of the set of vertices of si and the set of vertices of the trees 6 attached to si. For example, in Figure 5.9, S2 = ∪i=4τi ∪ s2. For every connected component si, i = 2, . . . , c, choose an arbitrary vertex ri−1. If ri−1 ∈ T \ Si,

attach κi to ri−1. Otherwise, if ri−1 ∈ Si, attach κi to r, and update: r := ri−1, 0 0 c := c − 1. (Note that as a result, κi is never attached to a vertex in Si.) When 0 c = 2, attach κc to r. See Figure 5.10 for an example. Clearly, by Lemma 5.2.9, the number of sequences T¨ that can be obtained in this n−|σ|+2c−3 way is n . Note that at each step, the connector κi of si is attached to a vertex of a different connected component. Therefore, we never create a cycle and the number of connected components c0 decreases by 1. As a result, after c−1 steps, we obtain a tree.

Correctness In the ith step (i > 2), every connector κi can be connected to

any other vertex (that is not in Si), or r can be updated to be any vertex in Si. i As a result, at step i, the root r can potentially be any vertex in ∪i=1Si. This

64

Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 τ9

τ4 0 τ3 `` a τ5 τ7 s4 r2 j i0 s κ4 τ10 2 i r j 0 h h0 1 s1 κ1 s3 κ2 τ1 r τ2 τ κ 6 3 τ8

Figure 5.10: r1 ∈/ S2, so κ2 is attached to r1; r2 ∈ S3, so κ3 is attached to r; r is updated by r := r2. Finally, κ4 is attached to r, yielding the tree shown above.

ensures that our construction covers all the possible options for connecting the components of σ. Therefore, the number of occurrences of σ in edge-labeled trees n−|σ|+2c−3 Qc of size n, with distinct edge labels 1, . . . , n − 1 is n i=1 |si|, as claimed.

A special case of Lemma 5.2.10 is provided in Section A.3.

Let now Fn(σ) denote the number of occurrences of σ in directed edge-labeled trees of size n.

n−|σ|+c−1 Corollary 5.6. Fn(σ) = 2 Fn(σ).

0 k−1 Let σ ∈ DSk be a distinguished structure labeled according to p ∈ ∪i=1 Π(i), and let us denote by Op(σ) the number of occurrences of σ in directed trees of size n that are labeled according to p ∈ Π(k − 1).

0 Observation 5.2.11. If p  p, then Op(σ) = 0.

The computation of Op(σ) involves the following steps:

• Choose the |p| repeated labels of the tree out of the possible n−k labels.

• Choose the |p0| repeated labels of σ out of the |p| repeated labels of edges of the tree.

• Choose the unique labels of σ (e.g., label ` in Figure 5.4(b,c)), if there are any.

• Calculate the number of essentially-different structures that can be produced out 0 Q|p | 0 of the j=1(p [j]!) possible configurations of the repeated labels of σ. For example, for the structure in Figure 5.6(a), all the configurations yield the same structure, whereas for the structure in Figure 5.6(b), there are two essentially-different structures. In one structure the edge labeled i is attached to the head of the edge

65

Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 labeled `, whereas in the other structure, the edge labeled i0 is attached to the head of the edge labeled `. Lastly, for the structure in Figure 5.4(a), there are six different configurations of the labels i, i0, i00 which yield six different structures (shown in Figure 5.11). This number can be obtained by computing the number of symmetries (automorphisms) of σ.

• Finally, multiplying the numbers obtained in the previous steps by Fn(σ).

Here are two detailed examples.

We demonstrate the computation of Op(σ) with two of the structures shown in

Figure 5.4. The first structure, σ1 (shown in Figure 5.4(a)), is labeled according to (2) ∈ Π(2). Therefore, for the case k = 4, this structure may appear in trees labeled according to (1, 2), (3) ∈ Π(3), but not according to (1, 1, 1) ∈ Π(3), since (2)  (1, 1, 1). n−4 Let us detail the computation of O(1,2)(σ1). First, there are 2 options to choose the 0 0 00 two repeated labels `1, `2 in the tree. We multiply by π((1, 2)) = 2 (either `1, `1, `2, `2, `2 0 00 0 or `1, `1, `1, `2, `2). The label i, that is repeated three times in σ1, is thus determined uniquely. Assume without loss of generality that i is assigned the label `1. There are 0 00 n−4 options to choose the label `: it must be different from `1, `1, `1 (but may be equal 0 0 00 to `2 or `2). There are three options for choosing which label of `1, `1, `1 is attached to the head of `, then two options for choosing the label that is attached to the tail of `.

This number is calculated from the number of automorphisms of σ1. To complete the

computation of O(1,2)(σ1), we multiply by Fn(σ1). The second structure, σ2 (shown in Figure 5.4(e)), is labeled according to the partition (1, 1) ∈ Π(2). Hence, it may appear in trees labeled according to (1, 1, 1), (1, 2) ∈ Π(3), but not according to (3) ∈ Π(3), since (1, 1)  (3). For computing n−4 O(1,1,1)(σ2), there are 3 options for choosing the three labels repeated in the tree. 0 0 0 This uniquely yields the labels `1, `1, `2, `2, `3, `3 (note that π((1, 1, 1)) = 1). Then, there 3 are 2 options to choose the repeated labels i, j. Assume without loss of generality that the chosen labels are `1 and `2. Note the symmetry in this structure: It does not

matter if i is assigned the label `1 and j is assigned the label `2, or vice versa, since

the two options yield the same structure. Again, the number of symmetries of σ2 is calculated using the number of its automorphisms and the computation is completed by

multiplying by Fn(σ2).

5.3 Inclusion-Exclusion Graph

When counting the occurrences of a distinguished structure σ ∈ DSk, other distinguished structures which contain multiple occurrences of σ are counted multiple times. Obviously,

if a distinguished structure σ1 contains c occurrences of a smaller structure σ2, then σ1

is accounted for c times when counting the occurrences of σ2. The inclusion-exclusion principle is applied to resolve this dependency between the different structures. In order

to obtain the number of trees that contain σ as a subtree (using the quantity Op(σ)), we

66

Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 ` ` `

ii 0 i00 i i00 i0 i0 ii 00

` ` `

i0 i00 i i00 ii 0 i00 i0 i

Figure 5.11: The six different configurations of the structure shown in Figure 5.4(a).

build an inclusion-exclusion directed graph IE = (V, E). This graph contains a vertex

corresponding to each structure σ ∈ DSk. There is a directed edge e = (σ1, σ2) labeled

with c if σ1 contains c occurrences of σ2. Let `(e) denote the label of the edge e, h(σ)

denote the length of the longest path from σ to a root of IE, and I(σ2) = {σ1 ∈ V :

(σ1, σ2) ∈ E}. The set of roots R = {v ∈ V : I(v) = ∅} of the IE graph contains all the structures that are not contained in any other structure; in a sense, those are the “big” structures. Figure 5.12 shows a subgraph of the IE graph for k = 4. Let us also denote

by Tp(σ) the number of trees of size n labeled according to p ∈ Π(k−1) that contain σ but no σ0 ∈ I(σ) as a subtree.

P 0 0 Lemma 5.3.1. Tp(σ) = Op(σ) − σ0∈I(σ) `((σ , σ))Tp(σ ).

Proof. By Induction on h(σ).

• The roots of the IE graph σ ∈ R, for which h(σ) = 0, represent distinguished structures that are not contained in any other structure. Therefore, for any partition p ∈ Π(k − 1), the number of trees that contain σ as a subtree equals the number of occurrences of σ in directed trees labeled according to p. Thus,

Tp(σ) = Op(σ).

• Induction hypothesis: The claim is correct for vertices of height h < h0.

0 • Inductive step: Let σ ∈ V be at height h(σ) = h0, and let σ ∈ I(σ). The trees 0 0 0 that contain σ as a subtree are counted `((σ , σ))Tp(σ ) times in Op(σ). Therefore, 0 0 0 subtracting `((σ , σ))Tp(σ ) from Op(σ) excludes all the trees that contain σ as a P 0 0 subtree. Thus, Tp(σ) = Op(σ) − σ0∈I(σ) `((σ , σ))Tp(σ ).

A simple bottom-up procedure traverses the IE graph, computing Tp(σ) for every structure σ ∈ V.

5.4 Counting Polycubes

A proper tree polycube is a polycube P ∈ Pn for which γ(P ) is a tree. The other 0 0 polycubes P ∈ Pn are those for which γ(P ) contains cycles.

67

Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 Figure 5.12: A snapshot of the IE graph for k = 4.

5.4.1 Trees

Every tree polycube gives rise to a unique spanning tree. For every choice of repeated

labels p ∈ Π(k − 1), let DTp(n) denote the number of proper tree polycubes whose corresponding (unique) spanning trees are labeled according to p. Corollary 5.4 specifies

Tp, the total number of directed trees with n vertices that are labeled according to p.

Every such tree corresponds to a tree polycube in Pn unless it contains a distinguished structure as a subtree. (Indeed, it can neither contain a distinguished structure that has coinciding cells because the latter is illegal, nor can it contain a distinguished structure that has neighboring cells since it is a tree.) Therefore, all the trees that contain a distinguished structure as a subtree must be excluded. Hence, P X X Tp − σ∈DS Tp(σ) DT(n, n − k) = DT (n) = k (5.1) p Q|p| p∈Π(k−1) p∈Π(k−1) j=1(p[j] + 1)!

Q|pi| The division by j=1(pi[j] + 1)! is because each tree polycube is counted that many times due to the distinction between the occurrences of each repeated edge label `i.

68

Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 5.4.2 Nontrees

Let σ ∈ DSk be a distinguished structure which contains only adjacent cells and no

coinciding cells. Let σc denote the graph that is constructed by adding to σ all the

missing cycle-edges between every pair of adjacent cells. The structure σc is a cycle structure. For example, the distinguished structure shown in Figure 5.4(b) is a spanning

tree of the cycle structure shown in Figure 5.4(h). Let us denote by |σc| the number of

vertices of σc. Two cycle structures c1 and c2 are considered distinct if |c1|= 6 |c2| or

if |c1| = |c2| and c1 and c2 are non-isomorphic. Let also C denote the set of all cycle

structures of polycubes in Pn. The set C can be computed using DSk as described. Note that two different distinguished structures may be spanning trees of the same cycle

structure. For every cycle Ci ∈ C, let PCi denote the number of polycubes P ∈ Pn that contain Ci in their cell-adjacency graph γ(P ). Suppose that a distinguished structure

σ ∈ DSk has c occurrences in Ci. Then, we have that

X Tp(σ) P = . (5.2) Ci Q|p| p∈Π(k−1) c j=1(p[j] + 1)!

This follows from the definition of Tp(σ). Finally, we reach the desired formula.

|C| X DX(n, n − k) = DT(n, n − k) + PCi . (5.3) i=1

5.5 Proof of Main Theorem

We are now ready to prove Theorem 5.1.

Proof. From the discussion in Sections 5.2 and 5.3 about the terms of the inclusion- exclusion formula and equations (5.1), (5.2), and (5.3), we conclude that for any

p ∈ Π(k − 1), by Corollary 5.4, the degree of Tp is at least n−3, and that the highest n−k n−3 n−1 power of n, namely, n+k−4, is contributed by T(1,1,...,1) = k−1 n 2 : The case in which the tree contains k−1 pairs of repeated edge labels, corresponding to the partition

(1, 1,..., 1) ∈ Π(k−1). The power of n contributed by Tp0 , for all the other partitions p0 ∈ Π(k−1), is strictly smaller than n+k−4.

Now let σ ∈ DSk be a distinguished structure composed of c connected components, 0 k−1 and labeled according to some partition p ∈ ∪i=1 Π(i). Let u denote the number of unique labels in σ. We claim that the power of n in Op(σ), for any partition p ∈ Π(k −1) 0 for which p  p, is at least n−2k−1 and at most n+k−5. As a result, since Tp(σ) 0 0 consists of linear combinations of Op(σ) and Op(σ ) for other structures σ ∈ DSk (where the coefficients of the combinations are functions of k only), the power of n in

Tp(σ) is also bounded by n−2k−1 from below and by n+k−5 from above.

The power of n in Op(σ) is contributed by the following three factors:

69

Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 n−k • |p| : This factor corresponds to choosing |p| repeated labels, and it clearly contributes at most |p| powers of n to Op(σ).

•F n(σ): The power of n contributed by Fn(σ) is n−|σ|+2c−3 (Lemma 5.2.10).

• u: Naturally, the power of n contributed by the choice of these u unique labels can be at most u.

Upper bound The power of n is at most the sum of these three factors. We now prove that n−|σ|+2c−3+u+|p| ≤ n+k−5.

0 0 1. By Lemma 5.2.6, |σ|−c ≥ pr. Moreover, |σ|−c = pr +u since, clearly, the number 0 of edges in σ (|σ| − c) equals the total number of edge labels in it (pr + u).

2. Trivially, |p| ≤ k − 1.

Therefore, by claim (2) above, n − |σ| + 2c − 3 + u + |p| ≤ n − |σ| + 2c + u + k − 4. To show that n − |σ| + 2c + u + k − 4 ≤ n + k − 5, it suffices to show that |σ| − 2c − u ≥ 1. 0 0 We have, by claim (1), that |σ| − 2c − u ≥ pr + u − c − u = pr − c. We now claim 0 that indeed pr − c ≥ 1. This is because every connected component in σ must have at least one pair of coinciding or neighboring cells, and in order to have such cells, every connected component must have at least two repeated labels, implying that the 0 difference between pr (the total number of repeated labels in σ) and c (the number of connected components of σ) is at least 1.

Lower bound In order to show that the power of n in Op(σ) is at least n−2k−1, we prove that n−|σ|+2c−3 (the power of n contributed by the second factor) is at least n−2k−1 (for all structures), that is, |σ|−2c ≤ 2(k−1). (Note that we do not take the first and third factors into account since they contain elements whose power of n is zero.)

Lemma 5.5.1. Let σ ∈ DSk be a distinguished structure composed of c connected components and labeled according to some partition p0 ∈ Π(i), 1 ≤ i ≤ k−1. Then, |σ|−2c ≤ 2i.

Proof. By induction on i.

• Induction basis (i=1): The only structures labeled according to (1) are two paths of length 2 and two paths of length 4 (all shown in Figure 5.6), for which we have |σ|−2 ≤ 2.

• Induction hypothesis: The claim is correct for structures labeled according to a partition of i.

70

Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 • Inductive step: We now show that the claim holds for i + 1. Let σ ∈ DSk be labeled according to p ∈ Π(i + 1), and assume σ has u unique labels. If σ is a basic or compound structure, then, by Observation 5.2.4 and Lemma 5.2.5, we have that |σ| − 2 · 1 ≤ 2(i+1) − 2 = 2i, and the claim holds. Otherwise (σ has more

than one connected component), σ can be decomposed into two structures σ1 and

σ2 with c1 and c2 connected components, which are labeled according p1 ∈ Π(j)

and p2 ∈ Π(`), and with u1 and u2 unique labels, respectively, such that

– 1 ≤ j, ` < i + 1;

– |σ| = |σ1| + |σ2|;

– c = c1 + c2;

– u ≤ u1 + u2;

– |σ| − c = pr + u = ⊕p + |p| + u = i + 1 + |p| + u = p1r + u1 + p2r + u2 = ⊕p1 + |p1| + u1 + ⊕p2 + |p2| + u2 = j + |p1| + u1 + ` + |p2| + u2; Thus,

j + ` = i + 1 + |p| − (|p1| + |p2|) + u − (u1 + u2).

By the above and the induction hypothesis, |σ|−2c = (|σ1| + |σ2|) − 2(c1 + c2) ≤

2j +2`. When σ is decomposed into σ1 and σ2, every label which was repeated in σ

may still be repeated in exactly one of σ1 or σ2, in which case |p| − (|p1| + |p2|) = 0. However, there might be a label which was repeated in σ and is no longer repeated

in either σ1 or σ2, in which case, the quantity |p| − (|p1| + |p2|) goes up by 1 when

σ1 and σ2 are considered separately. On the other hand, the quantity u − (u1 + u2) is decreased by 1 for every such label, thereby the last term remains unchanged.

The last case is when a label which was repeated in σ is repeated in both σ1 and

σ2, in which case, the quantity |p| − (|p1| + |p2|) decreases by 1, but this only helps.

Therefore, |p| − (|p1| + |p2|) + u − (u1 + u2) ≤ 0. Hence, 2(j + `) ≤ 2(i + 1).

We return to the proof of the main theorem.

In Equation (5.1), T(1,1,...,1) (the numerator of one of the summands in the rightmost Qk−1 k−1 term) is divided by j=1 (1 + 1) = 2 . Thus, the coefficient of the highest power of n 2n−k 2n−k n+k−4 n−2k−1 is (k−1)! . Hence, we obtain a global formula of the form (k−1)! (n + ··· + cn ), where c is some constant independent of n. We can now factor out the quantity nn−2k−1 2n−k n−2k−1 to obtain a formula of the form (k−1)! n P3k−3(n). Finally, k must be a root of DX(n, n − k) since a polycube of size n = k cannot span n − k = 0 dimensions (unless n = k = 1). Factoring out n−k yields the claimed pattern.

Corollary 5.7. The limit growth rate of the number of polycubes along the kth diagonal (divided by the size of the polycubes) is 2e; that is,

DX(n+k,n) DX(n+k−1,n−1) −−−→ 2e. n + k n→∞

71

Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 k = 3, computation time: a few seconds

|DS3| 147

|C3| 13 n 6 n 7 4 3 2 DT(2,2)(n) 2 − n − (n−3)(n−4)(4n −28n +97n −200n+300) n 3 n 7 2 3 2 DT3(n) 2 − n − (n−3)(2n −21n +106n −282n+360)/3 n 3 n 7 4 3 2 DT(n, n−3) 2 − n − (n−3)(2n −21n +106n −282n + 360)/3 P13 n 6 n 7 3 2 P i 2 − n − (n−3)(n−4)(4n −17n +11n+70) i=1 C n 6 n 7 5 4 3 2 DX(n, n − 3) 2 − n − (n − 3)(12n − 104n + 360n − 679n + 1122n − 1560)/3

k = 4, Computation time: 2.5 minutes

|DS4| 8,397

|C4| 179

2n 7nn 9(n−4)(n−5)(n−6)(8n6−84n5+438n4−1543n3+4236n2−9020n+ DT (n) − − (2,2,2) 19040)/6

n 4 n 9 6 5 4 3 2 DT2,3(n) 2 − n − (n−4)(n−5)(4n −56n +383n −1654n +5106n −10920n+14112)/6

n 5 n 9 6 5 4 3 2 DT4(n) 2 − n − (n−4)(4n −84n +851n −5191n +20190n −47552n+53760)/6

2n 7nn 9(n−4)(8n8 − 140n7 + 1010n6 − 3913n5 + 9201n4 − 15662n3 + DT(n, n−4) − − 34500n2 − 120552n + 221760)/6

P179 n 7 n 9 6 5 4 3 2 P i 2 − n − (n−4)(n−5)(12n −122n +373n +68n −1521n −578n+3360)/6 i=1 C 2n 7nn 9(n−4)(8n8 − 128n7 + 828n6 − 2930n5 + 7404n4 − 17523n3 + DX(n, n−4) − − 41527n2 − 114302n + 204960)/6

Table 5.13: Results for k = 3, 4.

This limit has been already conjectured [ABBR12], and is, in fact, a simple conse- quence of the formula of DX(n, n−k) (stated in Theorem 5.1).

5.6 Results

The method outlined in the preceding sections was fully implemented in a parallel C++ program, using Wolfram Mathematica to simplify the final formulae. All the calculations were performed on a supercomputer with 132 GB of RAM and 20 processors. Our results, summarized in Table 5.13, agree completely with the formulae conjectured in the literature of statistical physics (see Table 5.1). Our program produced data files which provide a full proof of the formulae: A complete listing of all structures, all the intermediate computations, a full description of the inclusion-exclusion relations between the structures, and a detailed account of all the calculations. This completes the proof of Theorems 5.2 and 5.3.

72

Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 k = 5, computation time: about a week

|DS5| 652,060

|C5| 3,680

2n 12nn 11(n−5)(n−6)(n−7)(n−8)(16n8 − 224n7 + 1560n6 − 7544n5 + DT (n) − − (2,2,2,2) 29089n4 − 98032n3 + 319752n2 − 819200n + 2324880)/3

2n 8nn 11(n−5)(n−6)(n−7)(8n8 − 140n7 + 1206n6 − 6917n5 + 30322n4 − DT (n) − − (2,2,3) 107966n3 + 333720n2 − 816696n + 1321920)/3

2n 7nn 11(n−5)(n−6)(8n8 − 168n7 + 1730n6 − 11736n5 + 59912n4 − DT (n) − − (3,3) 238071n3 + 722025n2 − 1517688n + 1814400)/9

2n 8nn 11(n−5)(n−6)(8n8 − 196n7 + 2338n6 − 17731n5 + 95521n4 − DT (n) − − (2,4) 384154n3 + 1161728n2 − 2462976n + 2903040)/3

2n 6nn 11(n−5)(4n8 −140n7 +2375n6 −25215n5 +183076n4 −932080n3 + DT (n) − − (5) 3256940n2 − 7149000n + 7560000)/15

n 9 n 11 11 10 9 8 7 2 − n − (n−5)(240n − 6480n + 73640n − 461232n + 1778615n − DT(n, n−5) 4707195n6 + 11632070n5 − 41919528n4 + 158857920n3 − 483329520n2 + 1481660640n − 2863123200)/360

n 12 n 11 9 8 7 6 5 P3680 2 − n − (n−5)(n−6)(32n − 568n + 3592n − 8001n − 5009n + P i 4 3 2 i=1 C 20971n + 98945n + 30014n − 3298664n + 9648576)/3

n 12 n 11 11 10 9 8 7 2 − n − (n−5)(240n − 6000n + 62240n − 356232n + 1335320n − DX(n, n−5) 4062240n6 + 12397445n5 − 42322743n4 + 150403080n3 − 535510740n2 + 1923269040n − 3731495040)

Continuation of Table 5.13. Results for k = 5.

73

Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 Chapter 6

Conclusion and Open Problems

Our research combines various combinatorial, theoretical, and computational methods to study the problem of lattice animals enumeration. In this chapter, we briefly review these methods and suggest further directions and improvements that can be pursued in future work.

6.1 Polyominoes

Polyominoes on twisted cylinders have shown to be a key for understanding polyominoes in the plane. In this research, we have revealed the value of the leading decimal digit

of λ by computing λ27, the growth constant of polyominoes on a twisted cylinder of width 27. Our improvement of the lower bound to 4.0025 cuts the difference between the known lower bound and the estimated value of λ by about 25% (from 0.0825 to 0.0600). The main bottleneck of this approach is the exponential growth in its space consumption as the width of the cylinder grows. We believe that with some more

effort, it would have been feasible to compute λ28. This would have probably required

eliminating also the storage for the succ1 successors and all groups G2,...,GW , keeping

only group G1. We anticipate that this would increase the lower bound on λ to about 4.0065. Moreover, the memory consumption of the program can be reduced further

by refining the subdivision of the set G1 into subsets G1j, according to the number j of leading occupied cells. This would eliminate the duplicate storage requirement

even for G1. We made this observation only after computing λ27, and therefore this improvement was not implemented in our program. A perhaps more promising direction for future research deals with exploring the W eigenvectors y corresponding to the eigenvalues λW computed by our program. Inter- estingly, there seems to be a pattern hidden in those eigenvectors, as can be clearly seen in Figures 6.1(a–c). These patterns are repeated for all the higher values of W that we examined, and in turn raise the question of whether a good approximation of yW

can be found for every value of W , namely, can we define a function fW (i) satisfying W |fW (i) − y [i]| ≤ ε for ε → 0? The whole purpose of the program is finding a good

75

Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 0.08

0.07

0.06

0.05 y 10[i] 0.04

0.03

0.02

0.01

1000 2000 3000 4000 5000 6000 i (a) W = 10

0.06

0.05

0.04 y 11[i] 0.03

0.02

0.01

2000 4000 6000 8000 10000 12000 14000 16000 i

(b) W = 11

0.05

0.045

0.04

0.035

0.03 y 12[i] 0.025

0.02

0.015

0.01

0.005

0.5 1 1.5 2 2.5 3 3.5 4 4.5 i x 104

(c) W = 12

W  Figure 6.1: Plots of i, y [i]) (0 ≤ i ≤ MW −1) for W = 10, 11, 12.

76

Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 W approximation of y in order to derive λW from two consecutive iteration vectors, and thus starting the algorithm with a good approximation of yW would significantly speed

up its convergence. Most importantly, finding such fW would enable us to obtain a

good approximation of λW through a single iteration, without having to explicitly store the iteration vectors in memory, since

ynew[s] := ynew[succ0[s]] + yold[succ1[s]],

could then be replaced by

ynew[s] := ynew[succ0[s]] + f[succ1[s]].

The values of succ0[s], succ1[s], and f[succ1[s]] would be computed on-the-fly for every index s, and ynew[succ0[s]] would be subsequently computed similarly in a recursion of depth at most W . This would result in a dramatic reduction of the space complexity W from O(3 ) to just O(1), opening up the possibility for computing λW for higher value

of W , and improving the lower bound on λ further. A theoretical treatment of fW could shed more light on the limiting behavior of polyominoes on twisted cylinders, and so lead to a better understanding of polyominoes and to rigorous theoretical bounds on λ itself.

Before we carried this research, the upper bound λ ≤ 4.65 had remained unchanged since 1973. Using modern computers, we pushed the approach used to obtain this bound

a little further, and improved the upper bound to roughly 4.5252 by computing σ17,

where σi is the growth constant of a sequence dominating A(n), which therefore provides

an upper bound on λ. As i increases, σi decreases. The main bottleneck of this approach is the exponential runtime required to expand the set of building blocks for polyominoes. On the other hand, the algorithm we implemented has the advantage of being highly amenable to parallelization, and running it on a computer cluster with hundreds of nodes could lead to improving the upper bound further. It was conjectured [KR73]

that as i → ∞, σi → λ. However, this conjecture remains unproven. We believe that a whole new approach might be needed in order to obtain a significant improvement of the upper bound that would push it further down towards 4.06, the estimated value of λ.

Another interesting question is whether or not, and if yes, to which extent, the upper and lower bound methods can be generalized to other types of lattice animals. As mentioned in the introduction, the upper bound method was adapted to hexagonal lattice animals, but we are not aware of any other application of this method to other lattices. The method is motivated by the fact that an n-square polyomino can be viewed as a puzzle that can be uniquely composed with n puzzle pieces taken from a constant-size set of pieces. Eden first came up with a set of eight pieces (Figure 3.12), and later Klarner and Rivest came up with a set of just five pieces (Figure 3.16). Since

77

Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 we proved that λ > 4, we have established that it is impossible to come up with a smaller set of puzzle pieces for polyominoes. But what about polycubes? The generalization of Eden’s set of pieces to d ≥ 3 is the only known way of obtaining an upper bound

on λd. It is therefore interesting to see if the set L (Figure 3.16) of twigs can be also generalized to higher dimensions. This could potentially decrease the upper bound dramatically, as was the case in two dimensions. This would probably depend on whether the concept of L-context can be generalized to high-dimensional cubes. As for the lower-bound method, it might be useful for hexagonal and triangular lattices (although some technical problems arise when attempting to adapt it), but in high dimensions the method is much harder to use for the same reason the transfer-matrix counting algorithm of Jensen [Jen03] fails: the transfer matrix is too big since there are too many possible “boundaries.”

For a lattice L, let L(n) denote the number of animals on L. It is widely believed (but has never been proven) that asymptotically

−θL L(n) ∼ CLn λL, (6.1)

where CL, θL, and λL are constants which depend on L. In fact, it is widely believed (but not proven) that the constant θ is common to all lattices in the same dimen- sion. In particular, there is evidence that θ = 1 for all lattices in two dimensions. Clearly, if Equation (6.1) were true, it would guarantee the existence of the limit

λL := limn→∞ L(n + 1)/L(n), the growth constant of animals on the lattice L. As was mentioned in the introduction, the existence of this limit was proven by Madras [Mad99], without assuming this relation. Furthermore, it is widely believed that the “ratio se- quence” (L(n + 1)/L(n)) is monotone increasing. Available data (numbers of animals on various lattices) support this belief, but it was unfortunately never proven. The monotonicity of the ratio sequence would imply that the entire sequence lies below its limit. (In fact, this may be the case even without monotonicity.) Consequently, every element of the ratio sequence would be a lower bound on the growth constant of animals on L.

For the square lattice, a standard polyomino-concatenation argument yields that pn 2pn for all n we have (A(n))2 ≤ A(2n), and hence, A(n) ≤ A(2n), which implies that pn pn A(n) ≤ λ for all n, that is, A(n) approaches λ from below (but is not necessarily monotone). This results in two more unsolved problems:

pn n+1p • Proving that A(n) < A(n + 1) for all n; and

A(n+1) A(n+2) • Proving that A(n) < A(n+1) for all n.

78

Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 6.2 Polyiamonds

The triangular lattice is much less studied than the square lattice. In Chapter 4, we

narrow the gap between the lower and upper bounds on λT to roughly 0.7626. However,

the leading decimal digit of λT remains unknown rigorously. As more values of T (n) are found, our bounds can be further improved. As described in the previous section, if the ratio sequence (T (n + 1)/T (n)) were monotone increasing, it would imply the lower

bound λT ≥ T (75)/T (74) ≈ 2.9959, only 0.05 short of λT ’s estimated value. In a recent

paper [BSZ17], we suggest another plausible direction for setting a lower bound on λT based on an unproven (yet very reasonable) assumption; We prove that if the entire

sequence (T (n + 1)/T (n)) lies below some arbitrary constant c > λT (even a very large one), that is, T (n + 1)/T (n) ≤ c, for all n ∈ N, the lower bound we proved in Section 4.2 can be improved. If we set c = 4, then the lower bound on λT improves to 2.8449.

The upper bound λT ≤ 3.6050 we proved in Section 4.3 is based on the two simple

facts that two polyiamonds P1 and P2 of size n1 and n2, respectively, can be composed n1n2 in at most O( 2 ) ways, and that every polyiamond of size n can be decomposed in a balanced manner. These two claims can be easily extended to other lattices and to higher dimensions. For the square lattice, however, the trivial quadratic upper bound on the number of compositions was not sufficient to improve on Klarner and Rivest’s upper bound. A linear bound, on the other hand, would have been enough [BB15].

However, G¨unter Rote found a counter example of two comb-shaped polyominoes P1 1.5 and P2 (shown in Figure 6.2), each of size O(n), which have Ω(n ) compositions; p Refer to Figure 6.2, and let L = O( (n)). Then, each finger of length L in P2 can be 2 attached to any other finger in P1 in O(L) ways, yielding a total of O(L ) attachments 3 1.5 per finger in P2, and thus a total of O(L ) = O(n ) possible compositions of the two polyominoes. So now the question is whether an O(n2−ε) upper bound on the number of compositions can be proved, or conversely, is Ω(n2) attainable in worst case? namely, can we find a pair of polyominoes which can be composed in Θ(n2) ways? We believe that such proof or example would be independent of the lattice and the dimension.

6.3 Polycubes

We have seen in Chapter 5 a complex recipe for producing the diagonal formula DX(n, n−k) for any fixed value of k. We have applied this method for k ≤ 5 and derived rigorously, and fully automatically, the first five diagonal formulae. We have also seen in Chapter 5 that proper polycubes are the key for understanding the behavior of

high-dimensional polycubes. A very good estimate of λd was obtained using a relatively simple analysis of the diagonal formulae. As more formulae are found, the bounds can be further improved. Unfortunately, as k grows, the number of distinguished structures and the complexity of the calculations grow exponentially. The amount of work required by our procedure for k = 6, 7, say, may not be prohibitive, and DX(n, n − 6), DX(n, n − 7)

79

Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 c1L

...

L L

c2L

P1 P2

3 Figure 6.2: Two polyominoes P1 and P2 that can be composed in a non-linear (O(L )) number of ways.

might be found. However, given that already for k = 5 the number of distinguished structures surpasses half a million, we do not believe that it would be feasible to go above k = 7 without further optimizations of our program. Having now established that DX(n, n−k) is given by Theorem 5.1, finding (rigor- ously) the kth diagonal formula is now possible by determining the coefficients of the

polynomial P3k−4(n). Since P3k−4(n) has degree 3k−4, the knowledge of 3k − 3 values of DX(n, n−k) is needed in order to compute the coefficients. (Note that trivially, DX(k, 0)=0, DX(k+1, 1)=1, and DX(k+2, 2)=A(k + 2)−2.) In terms of enumeration

data, this means the knowledge of Ad(n) for n ≤ 4k−3 and d ≤ n−k. The available enumeration data suffice to interpolate the coefficients for k = 2, 3, but not for k ≥ 4. However, a “physical” argument [LM11] implies that actually as few as k values suffice

for interpolating P3k−4(n). In a nutshell, this argument is based on the unproven, yet

widely believed assumption that the “free energy” λd = (log Ad(n)/n) has a well-defined 1/d series expansion whose coefficients depend on n and are finite when n tends to infinity. Then, the powers of n in the terms of the expansion are tuned so as to avoid their explosion, thereby imposing constraints which allow only k values of DX(n, n − k) to imply the general formula. This approach has been used to compute the polynomials

for k ≤ 7 from much less enumeration data. Proving this 1/d expansion of λd and finding a generating function for the sequence of coefficients of the expansion is a long-standing open problem.

Let us close this chapter with one more direction for future research. Physicists have long studied lattice animals intensely using Markov chain Monte Carlo simulations (MCMC), a method for sampling from a probability distribution by constructing a Markov chain that has the desired distribution as its equilibrium distribution. In the simplest use of this method, a Markov chain whose state space is all n-cell polyominoes

80

Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 is defined and then run for some number k of steps until the distribution of its states is approximately the stationary (uniform) distribution. (The symbol k is called the mixing time of the chain.) The idea is that when running the chain for some number of steps m after it reaches its stationary (uniform) distribution, the proportion p of steps in which the chain falls on a certain state (polyomino) is approximately 1/A(n), and hence, 1 A(n) ≈ p . In fact, physicists have designed rather simple Markov chains for simulating lattice animals ever since the 1970s, but they have typically been unable to justify rigorously the results of their simulations by proving bounds on the mixing time of the Markov Chain. On the other hand, there is a rich line of mathematical work aiming to bound mixing times, and it is a celebrated open problem to prove a polynomial-time bound on the mixing time for some algorithm simulating lattice animals, or equivalently, to give a polynomial-time randomized algorithm for approximately counting the number of animals of size n.

81

Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 Appendix A

Appendix

A.1 Certified Computations - Chapter 3

A certifying algorithm will not only produce the result, but will also justify its correctness by supplying a certificate that makes it easy to check the result. In contrast with formally-validated computation, correctness is established for a particular instance of the problem and a concrete result. We illustrate this concept with a few examples; see the survey [MMNS11] for a thorough treatment.

The Greatest Common Divisor The greatest common divisor of two numbers can be found by the ancient Euclidean algorithm. For example, the greatest common divisor of 880215 and 244035 is 15. Checking that 15 is indeed a common divisor is rather easy, but it is not clear that 15 is the greatest. Luckily, the extended Euclidean algorithm provides a certificate: Two integers p = −7571 and q = 27308, such that 880215p + 244035q = 15. This proves that any common divisor of 880215 and 244035 must divide 15. Hence, no number greater than 15 can divide 880215 and 244035.

Systems of Linear Equations and Inequalities Consider the three equations 4x − 3y + z = 2, 3x − y + z = 3, and x − 7y + z = 4, in three unknowns x, y, z. It is straightforward to verify any proposed solution; however, these equations have no solution. Multiplying the three equations by 4, −5, −1, respectively, and adding them up leads to the contradiction 0 = −11. Thus, the three multipliers provide an easily checkable certificate for the answer. Such multipliers can always be found for an unsolvable linear system, and they can be computed as a byproduct of the usual solution algorithms. A well-known extension of this example is linear programming, the optimization of a linear objective function subject to linear equations and inequalities, where an optimality certificate is provided by the dual solution.

Testing a Graph for 3-Connectedness Certifying that a graph is not 3-connected is straightforward: The certificate consists of two vertices whose removal disconnects the

83

Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 graph into several pieces. It has been known since 1973 that a graph can be tested for 3-connectedness in linear time [HT73], but all algorithms for this task are complicated. While providing a certificate in the negative case is easy, defining an easily-checkable certificate in the positive case and finding such a certificate in linear time required graph-theoretic and algorithmic innovations [Sch13]. This example illustrates that certifiability is not primarily an issue of running time: All algorithms, for constructing as well as checking the certificate, run in linear time just like the classical non-certifying algorithms. The crucial distinction is that the short certificate-checking program is by far simpler than the construction algorithm.

Comparison with the class NP There is some analogy between a certifying algo- rithm and the complexity class NP. For membership in NP, it is only necessary to have a certificate by which correctness of a solution can be checked in polynomial time. It does not matter how difficult it is to come up with the solution and to find the certificate. In contrast with a certifying algorithm, the criterion for the checker is not simplicity, but more clear-cut: running time. Another difference it that only “positive” answers to the problem need to be certified.

A.2 The Functions Wi(x, y) - Chapter 3

Below are W1(x, y),...,W21(x, y):

2 W1(x, y) = 2x y + 2xy + y

4 2 3 2 2 2 2 W2(x, y) = 4x y + 8x y + 6x y + 2xy + y

6 3 5 3 4 3 3 3 2 3 2 W3(x, y) = 8x y + 24x y + 32x y + 20x y + 6x y + 2xy + y

8 4 7 4 6 4 5 4 4 4 3 4 2 3 W4(x, y) = 14x y + 58x y + 113x y − 124x y + 71x y + 20x y + 6x y + 2xy2 + y

10 5 9 5 8 5 7 5 6 5 5 5 W5(x, y) = 24x y + 124x y + 317x y + 494x y + 483x y + 261x y + 71x4y5 + 20x3y4 + 6x2y3 + 2xy2 + y

12 6 11 6 10 6 9 6 8 6 7 6 W6(x, y) = 36x y +240x y +772x y +1550x y +2099x y +1895x y + 984x6y6 + 261x5y6 + 71x4y5 + 20x3y4 + 6x2y3 + 2xy2 + y

14 7 13 7 12 7 11 7 10 7 W7(x, y) = 64x y + 468x y + 1750x y + 4221x y + 7177x y + 8795x9y7 + 7489x8y7 + 3775x7y7 + 984x6y7 + 261x5y6 + 71x4y5 + 20x3y4 + 6x2y3 + 2xy2 + y

84

Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 16 8 15 8 14 8 13 8 12 8 W8(x, y) = 88x y + 780x y + 3487x y + 10135x y + 20921x y + 32015x11y8 + 36517x10y8 + 29738x9y8 + 14657x8y8 + 3775x7y8 + 984x6y7 + 261x5y6 + 71x4y5 + 20x3y4 + 6x2y3 + 2xy2 + y

18 9 17 9 16 9 15 9 14 9 W9(x, y) = 96x y + 1092x ∗ y + 6138x y + 21679x y + 53840x y + 99208x13y9 + 139805x12y9 + 150644x11y9 + 118455x10 ∗ y9 + 57394x9y9 + 14657x8y9 +3775x7y8 +984x6y7 +261x5y6 +71x4y5 +20x3y4 +6x2y3 +2xy2 +y

20 10 19 10 18 10 17 10 W10(x, y) = 64x y + 1288x y + 9620x y + 41940x y + 124236x16y10 +271585x15y10 +455916x14y10 +600672x13y10 +618318x12y10 + 472966x11y10 +226165x10y10 +57394x9y10 +14657x8y9 +3775x7y8 +984x6y7 + 261x5y6 + 71x4y5 + 20x3y4 + 6x2y3 + 2xy2 + y

22 11 21 11 20 11 19 11 W11(x, y) = 32x y + 1560x y + 15116x y + 77222x y + 265528x18y11 + 671900x17y11 + 1315757x16y11 + 2043184x15y11 + 2547938x14y11 + 2528282x13y11 + 1892135x12y11 + 895513x11y11 + 226165x10y11 + 57394x9y10 + 14657x8y9 + 3775x7y8 + 984x6y7 + 261x5y6 + 71x4y5 + 20x3y4 + 6x2y3 + 2xy2 + y

24 12 23 12 22 12 21 12 W12(x, y) = 32x y + 2448x y + 24984x y + 140612x y + 537148x20y12 + 1535243x19y12 + 3428784x18y12 + 6148920x17y12 + 8968766x16y12 + 10700784x15y12 + 10309921x14y12 + 7582080x13y12 + 3559132x12y12 + 895513x11y12 + 226165x10y11 + 57394x9y10 + 14657x8y9 + 3775x7y8 + 984x6y7 + 261x5y6 + 71x4y5 + 20x3y4 + 6x2y3 + 2xy2 + y

26 13 25 13 24 13 23 13 W13(x, y) = 64x y + 3376x y + 39052x y + 242230x y + 1029746x22y13 + 3276965x21y13 + 8225862x20y13 + 16714930x19y13 + 27959240x18y13 + 38764654x17y13 + 44612842x16y13 + 41963681x15y13 + 30425691x14y13 + 14187563x13y13 + 3559132x12y13 + 895513x11y12 + 226165x10y11 + 57394x9y10 + 14657x8y9 + 3775x7y8 + 984x6y7 + 261x5y6 + 71x4y5 + 20x3y4 + 6x2y3 + 2xy2 + y

27 14 26 14 25 14 2 14 W14(x, y) = 3872x y + 53860x y + 388828x y + 1856137x 4y + 6593524x23y14 + 18410515x22y14 + 41847658x21y14 + 78846479x20y14 + 124566489x19y14 + 165600553x18y14 + 184977014x17y14 + 170581831x16y14 + 122243680x15y14 + 56691193x14y14 + 14187563x13y14 + 3559132x12y13 + 895513x11y12 +226165x10y11 +57394x9y10 +14657x8y9 +3775x7y8 +984x6y7 + 261x5y6 + 71x4y5 + 20x3y4 + 6x2y3 + 2xy2 + y

85

Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 29 15 28 15 27 15 2 15 W15(x, y) = 4400x y + 74688x y + 598128x y + 3182157x 6y + 12522050x25y15 + 38772694x24y15 + 97650143x23y15 + 204840498x22y15 + 362613604x21y15 + 546205155x20y15 + 701024617x19y15 + 763765263x18y15 + 692808602x17y15 + 491675078x16y15 + 226975964x15y15 + 56691193x14y15 + 14187563x13y14+3559132x12y13+895513x11y12+226165x10y11+57394x9y10+ 14657x8y9 +3775x7y8 +984x6y7 +261x5y6 +71x4y5 +20x3y4 +6x2y3 +2xy2 +y

31 16 30 16 29 16 28 16 W16(x, y) = 6912x y + 106640x y + 902716x y + 5194974x y + 22502316x27y16 + 76836395x26y16 + 213862804x25y16 + 495599251x24y16 + 972881530x23y16+1634495588x22y16+2365001740x21y16+2946546711x20y16+ 3143569000x19y16+2812205702x18y16+1979423214x17y16+910239465x16y16+ 226975964x15y16 + 56691193x14y15 + 14187563x13y14 + 3559132x12y13 + 895513x11y12 +226165x10y11 +57394x9y10 +14657x8y9 +3775x7y8 +984x6y7 + 261x5y6 + 71x4y5 + 20x3y4 + 6x2y3 + 2xy2 + y

33 17 32 17 31 17 30 17 W17(x, y) = 7488x y + 136064x y + 1260248x y + 8008422x y + 38155640x29y17 + 143730425x28y17 + 440598289x27y17 + 1124991218x26y17 + 2431711692x25y17 + 4512423641x24y17 + 7250819239x23y17 + 10138105194x22y17 + 12316094597x21y17+12907416312x20y17+11411126315x19y17+7975518589x18y17+ 3655351652x17y17 + 910239465x16y17 + 226975964x15y16 + 56691193x14y15 + 14187563x13y14 + 3559132x12y13 + 895513x11y12 + 226165x10y11 + 57394x9y10 + 14657x8y9 + 3775x7y8 + 984x6y7 + 261x5y6 + 71x4y5 + 20x3y4 + 6x2y3 + 2xy2 + y

35 18 34 18 33 18 32 18 W18(x, y) = 6656x y + 144624x y + 1596016x y + 11499558x y + 61231243x31y18 + 254612673x30y18 + 859000063x29y18 + 2406743605x28y18 + 5707780042x27y18+11616872329x26y18+20533746813x25y18+31753025591x24y18+ 43111962291x23y18 + 51254247441x22y18 + 52900498537x21y18 + 46293847405x20y18+32158564611x19y18+14696358415x18y18+3655351652x17y18+ 910239465x16y17 + 226975964x15y16 + 56691193x14y15 + 14187563x13y14 + 3559132x12y13 + 895513x11y12 + 226165x10y11 + 57394x9y10 + 14657x8y9 + 3775x7y8 + 984x6y7 + 261x5y6 + 71x4y5 + 20x3y4 + 6x2y3 + 2xy2 + y

37 19 36 19 35 19 34 19 W19(x, y) = 4160x y + 132864x y + 1806784x y + 15379120x y + 92764008x33y19 + 429323463x32y19 + 1592168897x31y19 + 4883567215x30y19 + 12646494275x29y19 + 28110031644x28y19 + 54277687090x27y19 + 91972916089x26y19 + 137593335616x25y19 + 182153289931x24y19 + 212563199986x23y19 + 216507646418x22y19 + 187791339852x21y19 + 129752205674x20y19 + 59145846645x19y19 + 14696358415x18y19 + 3655351652x17y18 + 910239465x16y17 + 226975964x15y16 + 56691193x14y15 + 14187563x13y14 + 3559132x12y13 + 895513x11y12 + 226165x10y11 + 57394x9y10 + 14657x8y9 + 3775x7y8 + 984x6y7 + 261x5y6 + 71x4y5 + 20x3y4 + 6x2y3 + 2xy2 + y

86

Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 39 20 38 20 37 20 36 20 W20(x, y) = 2176x y + 105984x y + 1912912x y + 19332440x y + 133729026x35y20 + 690201840x34y20 + 2818499583x33y20 + 9436504653x32y20 + 26597729598x31y20 + 64253320144x30y20 + 134933108961x29y20 + 248868733815x28y20 + 406568926658x27y20 + 591104290770x26y20 + 765646007641x25y20 + 879150587033x24y20 + 885155570880x23y20 + 761751496919x22y20 + 523818188901x21y20 + 238239106019x20y20 + 59145846645x19y20 + 14696358415x18y19 + 3655351652x17y18 + 910239465x16y17 + 226975964x15y16 + 56691193x14y15 + 14187563x13y14 + 3559132x12y13 + 895513x11y12 + 226165x10y11 + 57394x9y10 + 14657x8y9 + 3775x7y8 + 984x6y7 + 261x5y6 + 71x4y5 + 20x3y4 + 6x2y3 + 2xy2 + y

41 21 40 21 39 21 38 21 W21(x, y) = 1152x y + 96256x y + 2056288x y + 24172920x y + 187337816x37y21 + 1070722580x36y21 + 4785628001x35y21 + 17443616434x34y21 + 53301072439x33y21 + 139441849789x32y21 + 316994896043x31y21 + 633630643451x30y21 + 1123186767205x29y21 + 1777867306642x28y21 + 2521701005541x27y21 + 3204911295924x26y21 + 3628247213386x25y21 + 3615763450791x24y21 + 3089960078272x23y21 + 2115755445262x22y21 + 960344267887x21y21 + 238239106019x20y21 + 59145846645x19y20 + 14696358415x18y19 + 3655351652x17y18 + 910239465x16y17 + 226975964x15y16 + 56691193x14y15 +14187563x13y14 +3559132x12y13 +895513x11y12 +226165x10y11 + 57394x9y10 + 14657x8y9 + 3775x7y8 + 984x6y7 + 261x5y6 + 71x4y5 + 20x3y4 + 6x2y3 + 2xy2 + y

A.3 Disconnected Structures - Chapter 5

The following theorem considers a given structure σ ∈ DSk to be fixed, in the sense that if σ is disconnected (see, e.g., Figure 5.5(a)), then the theorem does not take into account the different ways in which the connected components of σ may share a vertex (as illustrated in Figure 5.5(b–d)). Conversely, it considers σ to be a fixed configuration and computes the number of occurrences of this configuration while not allowing the components of σ to be connected directly by sharing a vertex in the tree. Therefore, the following theorem is a special case of Lemma 5.2.10. In our program, we generate all possible non-isomorphic configurations in which the connected components of a disconnected structure may be connected, considering every such configuration as a different distinguished structure. This is because there are configurations of the disconnected structure which contain another distinguished structure as a subtree, while other configurations do not. See Figure A.1 for an example. In theory, this has no effect (with respect to Theorem 5.1), but we found it simpler to implement this way. In fact, the numbers of distinguished structures and cycles reported in Table 5.13 include all the non-isomorphic configurations for every disconnected structure.

87

Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 i000

00 i 0 i 00 i i0 i00 i000 i i000 i i i0

(a) (b) (c)

Figure A.1: (a) A disconnected structure σ; (b) A configuration of σ which contains an occurrence of the structure given in Figure 5.6(a) (shown in gray); (c) Another configuration of σ which does not contain such an occurrence.

Finally, note that for every disconnected structure σ, summing up the expressions for the numbers of occurrences of every configuration of σ (provided by the following lemma) yields the exact expression for σ given by Lemma 5.2.10.

Theorem A.1. Let σ be a distinguished structure composed of c ≥ 1 trees s1, . . . , sc with distinct edge labels 1,..., |σ| − c. The number of occurrences of σ in trees of size n with distinct edge labels 1, . . . , n − 1 is

(n−|σ|+c−1)! n−|σ|+c−2 Qc Fn(σ) = (n−|σ|)! n i=1 |si|.

Proof. We proceed by double counting, enumerating in two ways the different sequences of directed edges that can be added to a graph composed of the union of n−|σ| vertices and the distinguished structure σ, so as to form a rooted tree with n vertices. One way to count these sequences is to add the edges one by one, and to count Qc the number of options available at each step. There are N = i=1 |si| ways to choose a root for each component si of σ. At the beginning, we have a forest with n−|σ|+c rooted trees. After adding a collection of edges, forming a rooted forest with i trees, there are n(i − 1) options for the next edge to add: Its origin can be any one of the n vertices of the graph, and its terminus can be any one of the i−1 roots other than the root of the tree containing the origin. Therefore, the total number of options is

n−|σ|+c Y N n(i − 1) = N nn−|σ|+c−1(n − |σ| + c − 1)!. (A.1) i=2

An alternative way to count these edge sequences is to start with one of the Fn(S) possible unrooted edge-labeled trees which contains σ, nominate one of its n vertices as the root, and choose one of the (n−|σ|)! possible sequences, say, η, then label the (n−|σ|) vertices of the tree according to η (the vertices that do not belong to σ), and “shift” each vertex label to the incident edge towards the root, producing an edge-labeled tree. The total number of sequences that can be formed this way is

nFn(σ)(n − |σ|)!. (A.2)

Finally, we conclude from Equations (A.1) and (A.2) that the number of occurrences of

88

Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 σ in unrooted trees with edge labels 1, . . . , n − 1 is

(n − |σ| + c − 1)! n−|σ|+c−2 Fn(σ) = n N . (n − |σ|)!

89

Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 Bibliography

[AABB14] G. Aleksandrowicz, A. Asinowski, G. Barequet, and R. Barequet. Formulae for polyominoes on twisted cylinders. In Proc. of the 8th Int. Conf. on Language and Automata Theory and Applications, volume 8370, pages 76–87. Springer-Verlag, March 2014.

[AB09] G. Aleksandrowicz and G. Barequet. Counting polycubes without the dimensionality curse. Discrete Mathematics, 309:576–583, 2009.

[AB11] G. Aleksandrowicz and G. Barequet. The growth rate of high- dimensional tree polycubes. In Proc. of the 6th European Conf. on Combinatorics, Graph Theory, and Applications, volume 38, pages 25–30, August–September 2011.

[ABBR12] A. Asinowski, G. Barequet, R. Barequet, and G. Rote. Proper n-cell polycubes in n−3 dimensions. J. of Integer Sequences, 15, 2012.

[AH77] K. Appel and W. Haken. Every planar map is four colorable. Illinois J. of Mathematics, 21:429–490 (part I) and 491–567 (part II), 1977.

[AH14] J. Avigad and J. Harrison. Formally verified mathematics. Comm. of the ACM, 57:66–75, 2014.

[BB15] G. Barequet and R. Barequet. An improved upper bound on the growth constant of polyominoes. In Proc. of the 8th European Conf. on Combinatorics, Graph Theory, and Applications, volume 49, pages 167–172, August-September 2015.

[BBR10] R. Barequet, G. Barequet, and G. Rote. Formulae and growth rates of high-dimensional polycubes. Combinatorica, 30:257–275, 2010.

[BH57] S. Broadbent and J. Hammersley. Percolation processes: I. crystals and mazes. In Proc. of the Cambridge Philosophical Society, volume 53, pages 629–641, 1957.

[BM07] G. Barequet and M. Moffie. On the complexity of jensen’s algorithm for counting fixed polyominoes. J. of Discrete Algorithms, 5:348–355, 2007.

91

Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 [BMRR06] G. Barequet, M. Moffie, A. Rib´o,and G. Rote. Counting polyominoes on twisted cylinders. INTEGERS: Electronic J. of Combinatorial Number Theory, 6, 2006.

[BRS16] G. Barequet, G. Rote, and M. Shalah. λ > 4 : An improved lower bound on the growth constant of polyominoes. Comm. of the ACM, 59:88–95, July 2016.

[BS13] G. Barequet and M. Shalah. Polyominoes on twisted cylinders. In Video Review at the 29th Ann. Symp. on Computational Geometry. ACM Press, June 2013.

[BSZ17] G. Barequet, M. Shalah, and Y. Zheng. An improved lower bound on the growth constant of polyiamonds. In Proc. of The 22nd Int. Computing and Combinatorics Conference, pages 50–61, July 2017.

[Con95] A. Conway. Enumerating 2d percolation series by the finite-lattice method: Theory. J. of Physics, A: Mathematical and General, 28:335– 349, 1995.

[DH83] B. Derrida and H.J. Herrmann. Collapse of branched polymers. Le Journal De Physique, 44:1365–1376, 1983.

[Ede61] M. Eden. A two-dimensional growth process. In Proc. of the 4th Berke- ley Symposium on Mathematical Statistics and Probability, volume 4, pages 223–239, Berkeley, CA, 1961.

[FGSW94] S. Flesia, D.S. Gaunt, C.E. Soteros, and S.G. Whittington. Statistics of collapsing lattice animals. J. of Physics, A: Mathematical and General, 27:5831–5846, 1994.

[Gau80] D.S. Gaunt. The critical dimension for lattice animals. J. of Physics, A: Mathematical and General, 13:L97–L101, 1980.

[Gol94] S.W. Golomb. Polyominoes. Princeton University Press, Princeton, NJ, 2nd edition, 1994.

[Gon08] G. Gonthier. Formal proof–the four color theorem. Notices of the American Mathematical Society, 55:1382–1393, 2008.

[GSR76] D.S. Gaunt, M.F. Sykes, and H. Ruskin. Percolation processes in d- dimensions. J. of Physics A: Mathematical and General, 9:1899–1911, 1976.

[Gut09] A.J. Guttmann, editor. Polygons, Polyominoes and Polycubes, volume 775. Springer Netherlands, 2009.

92

Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 [Hal05] T.C. Hales. A proof of the kepler conjecture. Annals of Mathematics, 162:1065–1185, 2005.

[Har60] F. Harary. Unsolved problems in the enumeration of graphs. Publi- cations of the Mathematical Institute of the Hungarian Academy of Sciences, 5:1–20, 1960.

[Har67] F. Harary. Graph Theory and Theoretical Physics. Academic Press, London, UK, 1967.

[HST] T. Hales, A. Solovyev, and H.Le Truong. The flyspeck project: An- nouncement of completion. https://code.google.com/p/flyspeck/ wiki/AnnouncingCompletion.

[HT73] J.E. Hopcroft and R.E. Tarjan. Dividing a graph into triconnected components. SIAM J. of Computing, 2:135–158, 1973.

[Jen03] I. Jensen. Counting polyominoes: A parallel implementation for cluster computing. In Proc. of the Int. Conf. on Computational Science, part III, volume 2659, pages 203–212. Springer, June 2003.

[JG00] I. Jensen and A.J. Guttmann. Statistics of lattice animals (polyomi- noes) and polygons. 33:L257–L263, 2000.

[Kla65] D.A. Klarner. Some results concerning polyominoes. Fibonacci Quar- terly, 3:9–20, 1965.

[Kla67] D.A. Klarner. Cell growth problems. Canadian J. of Mathematics, 19:851–863, 1967.

[KR73] D.A. Klarner and R.L. Rivest. A procedure for improving the upper bound for the number of n-ominoes. Canadian J. of Mathematics, 25:585–602, 1973.

[LI79] T.C. Lubensky and J. Isaacson. Statistics of lattice animals and dilute branched polymers. Physical Review A, 20:2130–2146, 1979.

[LM11] S. Luther and S. Mertens. Counting lattice animals in high dimensions. J. of Statistical Mechanics: Theory and Experiment, 9:546–565, 2011.

[Lun72a] W.F. Lunnon. Counting hexagonal and triangular polyominoes. in: Graph Theory and Computing, pages 87–100, 1972.

[Lun72b] W.F. Lunnon. Symmetry of cubical and general polyominoes. Graph Theory and Computing, pages 101–108, 1972.

[Lun75] W.F. Lunnon. Counting multidimensional polyominoes. The Computer Journal, 18:366–367, 1975.

93

Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 [Mad99] N. Madras. A pattern theorem for lattice clusters. Annals of Combi- natorics, 3:357–384, 1999.

[Mar90] J.L. Martin. The impact of large-scale computing on lattice statistics. J. of Statistical Physics, 58:749–774, 1990.

[ML92] S. Mertens and M.E. Lautenbacher. Counting lattice animals: A parallel attack. J. of Statistical Physics, 66:669–678, 1992.

[MMNS11] R.M. McConnell, K. Mehlhorn, S. N¨aher,and P. Schweitzer. Certifying algorithms. Computer Science Review, 5:119–161, 2011.

[MSW+90] N. Madras, C.E. Soteros, S.G. Whittington, J.L. Martin, M.F. Sykes, S. Flesia, and D.S. Gaunt. The free energy of a collapsing branched polymer. J. of Physics, A: Mathematical and General, 23:5327–5350, 1990.

[oei] The on-line encyclopedia of integer sequences. http://oeis.org.

[opp] The open problems project. http://cs.smith.edu/~orourke/TOPP/.

[PG95] P.J. Peard and D.S. Gaunt. 1/d-expansions for the free energy of lattice animal models of a self-interacting branched polymer. J. of Physics, A: Mathematical and General, 28:6109–6124, 1995.

[Rea62] R.C. Read. Contributions to the cell growth problem. Canadian J. of Mathematics, 14:1–20, 1962.

[Red81] D.H. Redelmeier. Counting polyominoes: Yet another attack. Discrete Mathematics, 36:191–203, 1981.

[RW81] B.M.I. Rands and D.J.A. Welsh. Animals, trees and renewal sequences. IMA J. of Applied Mathemathics, 27:1–17, 1981.

[Sch13] J.M. Schmidt. Contractions, removals and certifying 3-connectivity in linear time. SIAM J. on Computing, 42:494–535, 2013.

[SE05] M. Schwartz and T. Etzion. Two-dimensional cluster-correcting codes. In IEEE Trans. on Information Theory, volume 51, pages 2121–2132, 2005.

[SG76] M.F. Sykes and M. Glen. Percolation processes in two dimensions: I. low-density series expansions. J. of Physics, A: Mathematical and General, 9:87–95, 1976.

[Tem56] H.N.V. Temperley. Combinatorial problems suggested by the statistical mechanics of domains and of rubber-like molecules. Physical Review 2, 103:1–16, 1956.

94

Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 [Tuc02] W. Tucker. A rigorous ode solver and smale’s 14th problem. Founda- tions of Computational Mathematics, 2:53–117, 2002.

[VG03] M. V¨ogeand A.J. Guttmann. On the number of hexagonal polyomi- noes. Theoretical Computer Science, 307:433–453, 2003.

95

Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 דרש כשנתיים של עבודה ידנית מאומצת.) במחקר זה אנו בונים סכימה כללית לאנליזה הדרושה עבור k כלשהו, המשתמשת בכלים שונים מתורת הגרפים, קומבינטוריקה, תורת המספרים, ועוד, אותה מימשנו בתוכנה הפולטת הוכחה (ארוכה, אמנם) הניתנת לוידוא ידני. התוכנה מאשרת באופן אוטומטי לחלוטין את הנוסחאות עבור k = 2, 3, ומספקת לראשונה הוכחות עבור k = 4 ו־ k = 5. התרומה העיקרית של סכימה זו היא הוכחה לתבנית הכללית של הנוסחה עבור k כללי.

לבסוף, אנו משפרים את החסמים התחתון והעליון על λT, ומביאים לצמצום הפער ביניהם. את החסם התחתון אנו מעלים ל־ 2.842 ע״י שימוש בארגומנט ״שרשור״ של חיות סריג, אותו אנו מתאימים לסריג המשולשי. שרשור היא פעולה שלוקחת זוג של חיות סריג מגודל n ומצמידה אותם אחד לשני ומייצרת חיית סריג יחידה מגודל 2n. ניתן לשרשר כל זוג של חיות שריג, ולקבל תת־קבוצה של כל חיות הסריג pn מגודל 2n. במקרה של polyiamonds, הדבר מניב תת־סדרה עולה של הסדרה (T (n , כך שכל

איבר בתת־סדרה זו מהווה חסם תחתון על קצב הגידול λT. את החסם העליון אנו מורידים ל־ 3.6050 ע״י שימוש בטכניקה חדשה שמסתמכת על שתי העובדות הבאות: 1. כל polyiamond מגודל n ניתן לשבירה לשני polyiamonds, כך שכל אחד מגודל n/3 לפחות; 2. יש לכל היותר n2 אפשרויות להצמיד שני polyiamonds, כשכל אחד מגודל n. כתוצאה מכך, (T (n ניתנת לקירוב מלמעלה ע״י 0 סדרה (T (n עבורה ניתן לחשב את קצב הגידול, המהווה חסם עליון על λT.

iii

Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 אנו מוכיחים לראשונה כי λ > 4, ובזאת אנו מגלים את ערך הספרה העשרונית המובילה של λ, והיא אכן 4. ההוכחה ניתנת על ידי תוכנת מחשב המחשבת את קצב הגידול של polyominoes על ״גליל ספירלי״ מרוחב W: מלבן מרוחב W בו כל משבצת בקצה הימני של שורה מחוברת למשבצת השמאלית ביותר בשורה שמעליה. עבור כל ערך של W, מספר ה־ polyominoes מגודל n על הגליל מרוחב W חסום מלמעלה על ידי (A(n, ולכן מספר ה־ polyominoes מסוג זה מהווה קירוב מלמטה למספר ה־ polyominoes במישור. הרעיון המרכזי הוא שניתן לזהות polyominoes על הגליל באמצעות אוטומט סופי דטרמיניסטי. הדבר מאפשר לנו לממש אלגוריתם פשוט, שמחשב את הקשתות היוצאות מכל מצב באוטומט, ואז מריץ תהליך איטרטיבי, כך שבכל צעד מחליטים האם הריבוע הבא של הגליל שייך ל־ polyomino או לא. כלים אלגבריים ידועים מאפשרים לנו לחשב את קצב הגידול של polyominoes על הגליל, אשר מהווה חסם תחתון על λ. סיבוכיות הזמן והמקום של האלגוריתם תלויים רק ברוחב הגליל. גלילים מרוחב גדול יותר מניבים חסמים תחתונים טובים

יותר על λ. מספר המצבים של האוטומט שווה ל־ MW: מספר מוצקין מסדר W. לכן MW גדל בערך פי 3 כאשר W גדל ב־ 1. במחקר זה אנו משתמשים במספר שיטות אלגוריתמיות וחישוביות שמטרתן העיקרית היא להביא להורדת צריכת הזיכרון של התוכנית, על מנת להגיע לערכים גבוהים ככל האפשר של W. בגרסתה האופטימלית ביותר, תוכנית המחשב שמימשנו אפשרה לנו להגיע עד לרוחב W = 27, וכתוצאה מכך להעלות את החסם התחתון מעל ל־ 4.

לראשונה מאז 1972, אנו מביאים לשיפור החסם העליון על λ, ומוכיחים כי λ ≤ 4.5252. אנו מסתמכים על השיטה של קלארנר וריבסט שבעזרתה הם השיגו את החסם λ ≤ 4.65. הרעיון מאחורי שיטה זו הוא שניתן למפות כל polyomino לעץ על הגרף הדואלי באופן חד־חד־ערכי; ניתן אז לבנות עץ זה ע״י סדרה של פקודות, הלקוחות מאוסף פקודות מגודל קבוע. להבדיל מ־ polyominoes, את קצב הגידול של סדרות אלו כן ניתן לחשב, ולכן גם לקבל חסם עליון על λ. ניתן לממש אלגוריתם שבונה באופן עקבי הרחבות של אוסף הפקודות הבסיסי, שמביאות לשיפור החסם. סיבוכיות הזמן של האלגוריתם גדלה באופן אקספוננציאלי, ולכן השיפור שניתן לקבל מוגבל מבחינה מעשית.

מן ההיבט הקומבינטורי, יש חשיבות מרובה לספירת חיות סריג ״נאותות״ ב־d ממדים: חיות שלא ניתן לשכן ב־ d−1 ממדים. ניתן להראות כי מספר חיות הסריג הכולל מגודל מסוים ב־ d ממדים ניתן לכתיבה כצירוף לינארי של מספר חיות הסריג מאותו גודל הנאותות בממדים d , . . . ,1, כך שבעיית הספירה הכללית ניתנת לצמצום לבעיית הספירה של חיות נאותות. בטבלה ששורותיה מתאימות לגדלים n של חיות נאותות, ועמודותיה למימד d, הכניסות באלכסון הראשי והחצי הימני העליון של הטבלה מכילות רק אפסים, היות וחיה מגודל n יכולה להיות נאותה ב n−1 ממדים לכל היותר. לכן, נוצר עניין באלכסונים שמתחת לאלכסון הראשי ובנוסחאות ״אלכסוניות״ הסופרות polycubes מגודל n שפורשים בדיוק n−k מימדים, עבור קבוע k > 0 קטן כלשהו. ככל שיהיו בידינו נוסחאות עבור ערכים גדלים של k, ניתן יהיה לחשב לסדר גבוה יותר פיתוח אסימפטוטי של קצב הגידול של polycubes ב־ d מימדים כאשר פרמטר הפיתוח הוא d/1. בספרות הפיסיקלית ניתנו מספר נוסחאות כאלו (ללא הוכחה), אשר נמצאו ע״י אינטרפולציה של ערכים ידועים. הנוסחה עבור k=1 פשוטה, וידועה כבר שנים רבות. הנוסחאות עבור k=2 ו־k=3 מסובכות הרבה יותר, והוכחו באופן ידני רק בשנים האחרונות ע״י אנליזה קשה ומפורטת של כל העצים, היערות, המעגלים, וצירופים של כל אלה עם חפיפות מלאות או חלקיות, היכולים להופיע בגרף הקשירות של הקוביות ב־ polycube. הוכחה ידנית איננה מעשית עבור k > 3 עקב מספרם העצום של הצירופים. (המקרה k = 3

ii

Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 תקציר

״חיות סריג״ הן תתי־גרפים קשירים של הגרף הדואלי של סריג נתון. חיית הסריג הנפוצה ביותר נקראת polyomino, אשר מהווה אוסף קשיר של ריבועי יחידה במישור המחוברים לאורך צלעותיהם. הצורות המופיעות במשחק ״טטריס״ הן polyominoes מגודל 4, כלומר, הן מורכבות מארבעה ריבועים. הכללות של polyominoes למספר ממדים כלשהו d > 3 נקראות polycube .polycubes הוא גוף קשיר הבנוי מקוביות d־ממדיות.

חיות סריג צצות הן בהקשרים של שעשועים מתמטיים, והן בתחומים מדעיים דוגמת גאומטריה קומבינטורית ופיסיקה סטטיסטית. ספירת חיות סריג או הערכת קצב הגידול שלהן הן בעיות העוסקות בחישוב או הערכת מספר חיות הסריג הקיימות עבור גודל מסוים על סריג נתון. אלו בעיות קומבינטוריות קשות. שורשיהן נמצאים כבר בשנות השישים של המאה העשרים, אך אפילו עבור המקרה הפשוט יחסית, של הסריג הריבועי המישורי, לא ידועה נוסחה סגורה עבור (A(n: מספר ה־ polyominoes מגודל n. בעיות אלו הינן בעלות השלכות חשובות בפיסיקה סטטיסטית על המודלים המתימטיים המתארים תהליכי פעפוע, דוגמת זרימת נוזל דרך תווך אקראי, או קריסה של פולימרים מסועפים בתמיסה מהולה בטמפרטורה גבוהה. חישוב (או אפילו הערכת) הפונקציה (A(n נחשבת לאחת הבעיות הפתוחות החשובות בגאומטריה קומבינטורית.

pn בשנת 1968, הוכיח קלארנר כי הגבול (λ := limn→∞ A(n קיים. רק כעבור שלושים שנה, הוכיח

מאדראס שגבול המנה (limn→∞ A(n+1)/A(n (קצב הגידול ״האמיתי״) גם קיים, ולכן הוא שווה ל־ λ. מכאן נובע שמספר ה־ polyominoes מגודל n הוא בערך אקספוננציאלי ב־ n עם בסיס λ. ערכו המדויק של הקבוע λ, המכונה קבוע קלארנר, אינו ידוע, וכל מה שהיה ידוע לפני מחקר זה היו החסמים λ ≤ 4.65 ≥ 3.98. דהיינו, שום ספרה עשרונית של λ לא הייתה ידועה בוודאות. מציאת חסמים טובים יותר עודנה נחשבת לאחת הבעיות המרכזיות בתחום.

בהשוואה לסריג הריבועי, הסריג המשולשי נחקר הרבה פחות. חיות סריג על הסריג המשולשי המישורי נקראות polyiamonds. ובאופן דומה, מספר ה־ polyiamonds מגודל n מסומן ב־ (T (n. גם pn עבור (T (n לא ידועה נוסחה, אך גם מתקיים (λT := limn→∞ T (n)= limn→∞ T (n+1)/T (n.

החסמים הטובים ביותר שניתנו עבור λT, קצב הגידול האסימפטוטי של polyiamonds, הם

2.3011 מלמטה ו־ 4.00 מלמעלה, כך שגם במקרה זה שום ספרה של λT איננה ידועה בוודאות.

במחקר זה אנו נוקטים במספר גישות להערכת קצב הגידול של חיות סריג על הסריגים הריבועי והמשולשי המישוריים, ולמציאת נוסחאות סגורות עבור מחלקה חשובה של polycubes; הבנה של מחלקה זו הינה מפתח להבנת polycubes כלליים.

i

Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 המחקר נעשה בהנחיית פרופ׳ גיל ברקת בפקולטה למדעי המחשב.

חלק מן התוצאות בחיבור זה פורסמו כמאמרים של המחבר ושותפיו למחקר בכנסים ובכתבי־עת במהלך תקופת מחקר הדוקטורט של המחבר, אשר גרסאותיהם העדכניות ביותר הינן:

• Gill Barequet and Mira Shalah. Polyominoes on Twisted Cylinders. Video Review at the 29th Symposium on Computational Geometry, 339–340, 2013. https://youtu.be/MZcd1Uy4iv8.

• Gill Barequet and Mira Shalah. Automatic Proofs for Formulae Enu- merating Proper Polycubes. In Proceedings of the 8th European Conference on Combinatorics, Graph Theory and Applications, 145–151, 2015. Also in Video Review at the 31st Symposium on Computational Geometry, 19–22, 2015. https://youtu.be/ojNDm8qKr9A. Full version: Gill Barequet and Mira Shalah. Counting n-cell Polycubes Proper in n − k Dimensions. European Journal of Combinatorics, 63 (2017), 146–163.

• Gill Barequet, Gunter¨ Rote and Mira Shalah. λ > 4. In Proceedings of the 23rd European Symposium on Algorithms, 83–94, 2015. Full version: Gill Barequet, Gunter¨ Rote and Mira Shalah. λ > 4 : An improved lower bound on the growth constant of polyominoes, Communications of the ACM, 59 (2016), 88–95.

• Gill Barequet, Mira Shalah and Yufei Zheng. An Improved Lower Bound on the Growth Constant of Polyiamonds. In Proceedings of The 22nd International Computing and Combinatorics Conference, 50–61, 2017.

אני מודה לטכניון על התמיכה הכספית הנדיבה בהשתלמותי. כמו כן ברצוני להודות לועדה לתכנון ולתקצוב, לקרן הלאומית למדע, לתוכנית המלגות על שם אניטה בורג מטעם גוגל, ולקרנות על שם נבאי, זליג, ולוי על המלגות הנדיבות שהעניקו לי במהלך הלימודים.

Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 נוסחאות וקבועי גידול חיות סריג על סריגים ריבועיים ומשולשיים

חיבור על מחקר

לשם מילוי חלקי של הדרישות לקבלת התואר דוקטור לפילוסופיה

מירא שלח

הוגש לסנט הטכניון — מכון טכנולוגי לישראל אלול תשע״ז חיפה ספטמבר 2017

Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017 נוסחאות וקבועי גידול חיות סריג על סריגים ריבועיים ומשולשיים

מירא שלח

Technion - Computer Science Department - Ph.D. Thesis PHD-2017-18 - 2017