{'fraction_non_alphanumeric': 0.03249129303883966, 'fraction_numerical': 0.0071859983247365864, 'mean_word_length': 3.8038966539601864, 'pattern_counts': {'":': 0, '<': 2, '<?xml version=': 0, '>': 2, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Tiling with Small Tiles

We look at sets of tiles that can tile any region of size greater than 1 on the square grid. This is not the typical tiling question, but relates closely to it and therefore can help solve other tiling problems -- we give an example of this. We also present a result to a more classic tiling question with dominoes and L-shape tiles.


Introduction
Consider a set of tiles T and a connected region R in the lattice Z 2 . Deciding if R is tileable with copies of the tiles in T is a classical tileability problem, occupying a major role in Combinatorics and Discrete Geometry. For a generic set of tiles, the answer to the tileability problem is hard to provide, and even the easier problem of deciding the tileability of simply connected regions has been shown to be NP-complete for numerous models (see amongst others [6], [7] and [8]).
As a consequence, most research related to tileability problems focuses on small sets of small tiles. That is, sets of tiles containing no more than two tiles of small size, including or not rotations of those tiles. However, even in this setting, the complexity of the answers to the tileability problem are very diverse. Some sets of tiles exemplifying different behaviours include: the set of dominoes, for which the tileability can be decided in polynomial time for general regions (see amongst many others [4], [3], [10]), the set of two rectangles, for which the tileability is decidable in polynomial time for simply connected regions but is NP-complete in the general case (see [1], [5]), and also the set of L-shape tiles and their rotations, for which the tileability is NP-complete even for simply connected regions (see [6]). Our paper is inscribed in this context of tiling with small tiles.
We focus on two problems which we believe are specifically interesting among sets of small tiles. This first one concerns tiling with domino and L-shape tiles as represented in Figure 1. This set of tiles has a strategical role amongst small tiles problems because it is the minimal set for which the Conway group of the tiling is trivial. In other words, this is the simplest set of tiles T such that any region of Z 2 is connected to the empty set by a sequence of adding and removing tiles in T . In particular, the height functions method developed by Conway and Lagarias in [2] and which has proved to be very useful for numerous models (dominos [3], bars [5] [1], and ribbon tilings [9]) cannot work in this context. However, suprisingly, we show that the complexity of the tileability problem for general polyominoes is quasi-linear in this setting and we obtain the following theorem: and Figure 1. Set T , consisting of the domino (left) and L-tile (right) The second problem we study in this paper considers, in a sense, the opposite approach. Which sets of tiles can tile any region? We show how to find these sets in any dimension. More precisely and among other things, we prove the following result: There exists a set of d(d+3) 2 tiles that can tile any polyomino in dimension d ≥ 2, excluding the unit cube. There exists a linear-time algorithm to find a tiling of the polyomino with these tiles.
The rest of the paper is structured as follows. In Section 2 we prove Theorem 1.1 by describing an algorithm which decides the tileability of a polyomino by the two different tiles represented in Figure 1. We also show that the complexity of this algorithm is O(n log n). In Section 3 we prove Theorem 1.2 and study a few questions related to sets that can tile any polyomino. Lastly, we conclude with a Future Research section.
Before diving into the results, we define the setting. A polyomino is a connected region with vertices in Z d , and edges of length 1. A polyomino is not necessarily simply connected and might contain holes. The size of a polyomino is the number of unit d-dimensional cubes it contains. A tile is a simply connected polyomino with a fixed orientation. A polyomino is tileable with a given set of tiles if it can be entirely covered with any number of copies of the tiles in the set, without overlap. We say that set S tiles polyomino R if R is tileable by S. A tiling of R by S is an instantiation of a solution to the tiling problem: a presentation of copies of tiles from S in their locations in R such that they cover R. Giving a valid tiling is one way to prove that R is tileable by S.

Tiling with the Domino and L-Shape
We will now prove Theorem 1.1, resolving the tiling question for set T . The algorithm, which we call ALG, is a greedy constructive algorithm that takes as input the polyomino R and outputs a specific tiling of R if the region R is tileable, and an error otherwise. We begin by introducing a few more definitions and clarifications that will be used for the proof.
Recall that both the polyomino R and the tiles in T are oriented and cannot be rotated. Every square in R on Z 2 has an integral x and y coordinate. Two squares are adjacent if they share a side. Without loss of generality let the lowest square in R have y-coordinate 1. The height of a square is its y-coordinate.
A row in R is a set of adjacent squares that all have the same y-coordinate, and has no square in R adjacent to the left or right of it. The length of a row is the number of squares it contains. A top row in R is a row with no squares in R adjacent above it. The leftmost top row is the top row with the leftmost right end square (with the smallest maximum x-coordinate). If there are multiple such top rows, define the highest one to be the leftmost top row (the one with the largest y-coordinate). Lastly, the definition of a top left corner in R includes two cases: firstly, a top left corner can be a region of at least 2 squares adjacent horizontally that have no squares in R adjacent above them, and the left square has no square in R adjacent below or to the left of it. Secondly, a top left corner can be of vertical and horizontal width two, with no square of R adjacent to the left or above it. It may help in understanding the definition to realize that top left corners require at least one domino to be tileable. Depicted here: Description of the Algorithm. ALG greedily places tiles in R until the polyomino is fully covered, in which case it returns the tiling, or until the tiles cannot fit, in which case it returns an error. The exact process is described below in Algorithm 1. In this implementation, ALG updates the region each time it places a tile, removing the area covered by that tile from the region. The variable R c refers to the current subregion of R that remains to be tiled.
Essentially, ALG fills all top rows of even length and top left corners with dominoes, and then, once there are no more even length top rows or top left corners, ALG finds the leftmost top row and attempts to place an L-tile in the leftmost position on that row. If the L-tile does not fit there, ALG returns that the polyomino R is not tileable. Correctness of the algorithm. We want to prove that ALG returns a valid tiling when one exists, and returns an error if and only if no valid tiling exists.
To this end, we first define in Figures 3 and 4 two local moves on a tiling. For both local moves, the same subregion is tiled by a different configuration of tiles. These two moves will be used in essence to prove that if a valid tiling exists, then it can be manipulated to transform it into a tiling that ALG would have found.
Lemma 2.1. Let R be a polyomino tileable by T . Let r be a leftmost top row of odd length with height greater than 1 in R. There exists a tiling of R such that exactly one L-tile is used in the tiling of r.   Proof. Since r is of odd length, there must be an odd number of L-tiles placed on r. If there exists a valid tiling of R that places more than one L-tile on r, then using local move 1 repeatedly, there also exists a valid tiling of R that replaces the L-tiles in pairs until only one remains.
Lemma 2.2. Let R be a polyomino tileable by T . Let r be the first leftmost top row of odd length in R processed by ALG (in step C of Algorithm 1). If r is at height greater than 1, then there exists a tiling of R such that r is tiled with a unique L-tile at its left end and dominoes everywhere else.
Proof. We show that if a valid tiling of R exists, then it is always possible to use local moves 1 and 2 so that r is tiled with a unique L-tile at its left end. The proof works by induction on the height of the leftmost top row r.
If r is at height h ≥ 3 (general case). Lemma 2.1 limits the cases necessary to consider to ones with exactly one L-tile, as represented by the following schematic: Subregions a and c are of even length. Also, b is at least as large as a, or else it would have been a top left corner and tiled by step B in Algorithm 1. We now need to show that since this tiling exists, there must exist another valid tiling with the L-tile all the way to the left end of the top row.
Local moves 1 and 2 can be used to slide the L-tile to the left end. Since this does not affect regions c and d, they remain validly tiled. There are now two cases to consider: • If b is of even length, then local move 2 can be applied a number of times equal to the number of dominoes in a. This slides the L-tile to the left end of r, and all other regions remain validly tiled. • If b is of odd length, notice that if the L-tile and region a are removed to form a new polyomino R ′ , then b becomes the new leftmost top row. Thus, using the induction hypothesis, b is tiled with a unique L-tile at its left end. And therefore, like in the even case, local move 2 can be applied a number of times equal to the number of dominoes in a, and the L-tile can be slid to the left end of r.
If r is at height 2 (base case). The same schematic applies as for the height h ≥ 3 case, except that region R does not extend below regions b and d.
In this scenario, using local moves 1 and 2 does not change the parity of regions b and d. We again have two cases to consider: • If both b and d are of even length, local move 2 can be applied to slide the L-tile to the left end of r, and then b and d can be tiled entirely with dominoes, thereby yielding a solution tiling with an L-tile in the leftmost position on r. • If either b or d is of odd length, then R cannot be tiled. A row of odd length in R must contain an L-tile for R to be tileable, but a row of odd length can only contain an L-tile if it is at height > 1.
Proof of Theorem 1.1. First note that the algorithm ALG terminates, because step A tiles all top rows of even length, and step C tiles all top rows of odd length. For any non-empty R c , there will be a top row according to our definitions. Therefore, ALG always makes progress and reduces R c to a smaller R ′ c by performing steps A and C, and thus will eventually reach a size zero R c , unless the region is found to be not tileable.
We now prove that each step in ALG leads to a valid tiling if and only if R is tileable.
• In step A, tiling an even row with dominoes is at least as good as tiling with L-tiles. If there exists a valid tiling with L-tiles, local move 1 can replace them all with dominoes. • In step B, the domino is the only tile that can fill the top left square of a top left corner, therefore a solution tiling must have a domino in that position. • Step C is proven valid by Lemma 2.2 for cases where the odd-length leftmost top row r is at height > 1 in the region R c . If r is at height 1, then there is no possible tiling and the algorithm correctly returns not tileable.
Thus, we have proven that this algorithm indeed determines whether a polyomino R can be tiled with S. The following Corollary is a direct consequence our proof: Corollary 2.3. Any two tilings of the region R can be transformed from one to the other by a sequence of local moves 1 and 2.

Fountain Sets: Sets of Tiles that Tile Any Polyomino
Which sets of tiles can tile any region? One set is obvious: the set consisting of simply the d-dimensional unit cube. Any set that contains the unit cube can also tile any polyomino. But what about others sets, ones that do not contain the unit cube? First of all, a set that does not contain the unit cube cannot tile a polyomino which is of size one. Therefore, if the unit cube is excluded from the tile set, it must also be excluded from the possibilities for the polyomino to be tiled.
In this section, we present sets that can tile any region, excluding some small regions like the unit cube. We call these sets fountain sets. We will begin by defining fountain sets and then study some of their properties, and then give an example of how they can be used to solve other tiling problems. Note that in this section, all tiles can now be rotated. Definition 3.1. A tile set S is a fountain set if it has the following property: A polyomino P composed of a single tile in S plus any adjacent unit cube is tileable by S.
Furthermore, we define a fountain set S to be minimal if no tile can be removed from S without breaking the fountain property. Consider the set of tiles S 2 represented in Figure 5. This is an example of a fountain set in 2-dimensions (and in fact is a minimal fountain set).     The set S can tile any polyomino R ∈ R. Furthermore, there exists a simple algorithm to generate a tiling of R with S when one exists.
For example, for the set S 2 for which the domino is the single generating tile, the set of connected polyominoes that can fit at least one copy of the domino is all polyominoes of size at least 2. Thus according to Theorem 3.4, set S 2 can tile any polyomino of size at least 2.
Proof of Theorem 3.4. The proof works by induction on the size of the polyomino R which can fit generating tile b ∈ S. Let R k be a connected subregion of R such that |R k | = k.
If k = |b| (base case). Since R |b| must be able to fit one copy of a tile b ∈ T , then it is exactly tiled by b, which is a tile in S.
If |b| < k ≤ |R| (general case). Assume the induction hypothesis, that R k−1 is tileable with S.
Since R k−1 is a subregion of R and R is connected, there exists a unit cube u such that u ∈ R, but u / ∈ R k−1 , and u is adjacent to another unit cube v ∈ R k−1 . Since R k−1 is tileable, there exists a valid tiling of R k−1 , and in this tiling, unit cube v is tiled by a certain tile s ∈ S. Since S is a fountain set, we can retile the polyomino made up of s and x with S. This gives us a valid tiling for of R k .
This proof also yields a constructive algorithm to find a tiling of R if one exists, by starting with a single b tile placed in R, and then adding one unit cube at a time, retiling locally at each step. Call this algorithm ALG2.
Corollary 3.5. The set S 2 can tile any polyomino of size at least 2.

Properties of Fountain Sets.
Generating Fountain Sets. To generate a fountain set, we can choose one or multiple generating tiles to form the set B S . Aside from the requirement that they cannot fit inside of each other, the generating tiles can be any polyomino. The following simple procedure completes the fountain set S: let tile t be b with the unit cube u.

5:
S ← S ∪ t. 6: end while Notice that FSGEN works not only for square grids in any dimension, but also on triangular or hexagonal grids. Lemma 3.6. Any set S generated by FSGEN is a minimal fountain set.
Proof. We first prove that any S generated by FSGEN is a fountain set. FSGEN proceeds until for every tile s in S, any tile composed of s plus any adjacent unit cube is tileable by S. Thus by definition, once FSGEN terminates, S is a fountain set.
We now prove that S is a minimal fountain set. In the algorithm FSGEN, every tile t is added because it is a combination of a tile in S and an adjacent unit cube that cannot be tiled by S (see lines 6 and 7 of Algorithm 2). Thus if t was never added to S, the fountain property would be broken. Therefore, the final S generated by FSGEN is minimal.
Size of Fountain Sets. Another way to look at set S 2 from Figure 5 is to see that it is composed of all possible connected subsets of the plus-tile up to rotation (call these subtiles), excluding the unit square. The 2-dimensional plus-tile has one "central" square and four "spokes". Extending this idea, a generalized plus-tile in d dimensions has one "central" cube, and 2d "spokes." Each of its subtiles will have this central cube, and some subset of the spokes.
Lemma 3.7. The set composed of all subtiles of the d-dimensional plus-tile excluding the unit cube is the set S d generated by FSGEN using the d-dimensional domino as its generating tile.
Where the d-dimensional domino is the tile composed of two adjacent d-dimensional unit cubes.
Proof. Let A be the set composed of all the subtiles of the d-dimensional plus-tile, excluding the unit cube. Let B be the set generated by FSGEN using the d-dimensional domino as its generating tile.
Since the plus-tile cannot fit two copies of the domino tile, neither can any of its subtiles. Therefore, no tile in A can fit two copies of the domino tile. Furthermore, adding any single adjacent cube to the plus-tile allows it to fit 2 copies of the domino. Therefore, A is the set of all tiles excluding the unit cube that cannot fit two copies of the domino tile.
On the other hand, any polyomino that cannot fit two dominoes also cannot fit two supertiles of the domino. Therefore, since B is a fountain set and therefore can tile any polyomino of size at least 2, it includes all tiles that cannot fit two copies of the domino tile. Furthermore, B will not include any other tiles, because they are tileable by two dominoes, so in line 6 of Algorithm 2 they will not pass the if statement.
Therefore, sets A and B are the same set.
Corollary 3.8. The set S d composed of the generalized d-dimensional plus-tile and all of its subtiles excluding the unit cube is a fountain set.
To calculate the size of S d , we will determine how many subtiles of the d-dimensional plus-tile there are. First we will count how many different subtiles with exactly k spokes there are, and then sum over the number of spokes possible. Lemma 3.9. There are ⌊ k 2 ⌋ + 1 different subtiles of the plus-tile with exactly k spokes in dimension d ≥ k.
Proof. The k spokes can be either: all along different axes, or along k − 1 axes (with two spokes along the same one), or along k−2 axes, etc, or along ⌈ k 2 ⌉ axes. This gives us k−⌈ k 2 ⌉+1 = ⌊ k 2 ⌋+1 distinct configurations for a tile with k spokes in dimension d ≥ k.
In dimension d, there are subtiles of the plus-tile with 1 or 2 or 3 or ... or 2d spokes. For tiles with 1, 2, ..., d spokes, Lemma 3.9 gives the number of possible configurations. For tiles with d + 1, d + 2, ..., 2d spokes, by symmetry of the empty spoke locations, a tile with 2d − x spokes will have the same number of possible configurations as a tile with x spokes, for x < d. Also, there is exactly one configuration for the tile with 2d spokes.
Summing over all the possibilities to get the total number of subtiles of the plus-tile, to get the size of S d : completing the proof of Theorem 1.2. 3.
2. An Application of Fountain Sets. We consider one further classical tiling problem, tiling with the set S a , composed of the domino, L-tile, 3-bar, and T-tile. The algorithm to tile with S a begins by tiling with S 2 using ALG2, then retiling the subregions containing plus-tiles.
Theorem 3.10. Let R be a connected polyomino in the plane Z 2 , and let n = |R| be the size of R. There exists an algorithm that decides in polynomial time whether R can be tiled with the set S a composed of the domino, L-tile, 3-bar, and T-tile.
Proof. We will prove that the only regions not tileable by S a are crenellated type regions such as the examples shown in Figure 7, call the set of these regions C. Any R ∈ C is simply connected (no holes) and composed of only overlapped plus shapes. First we show that any R ∈ C cannot be tiled by S a . Since R is simply connected, it contains at least one plus-shaped subregion that is only connected to one side. Given the options of tiles in S a , this subregion must be tiled with a T-tile, or else at least one square would be left isolated. Once this T-tile is placed, the remaining region is another R ′ ∈ C. Thus, repeating the same logic, another T-tile has to be placed. This continues until the region is almost empty, at which point the only remaining untiled area is a single plus shape, which cannot be tiled by S a . Now we show that any region Q / ∈ C of size greater than 1 can be tiled by S a . Using ALG2, the region Q can be tiled with S 2 . Now consider every occurrence of the plus-tile in this tiling of Q. Since Q is connected, each plus-tile has at least one adjacent square which is tiled by another tile, and thus can be retiled using the rules from Figure 6. In this step, since the goal is to remove all plus-tiles if possible, if a plus-tile is adjacent to multiple other tiles, the retiling should be chosen such as not to add a new plus-tile if possible. If not possible, then there is a plus-tile that is only connected to a T-tile at its central tile, and thus the retiling necessarily introduces a new plus-tile.
However, since Q / ∈ C, this new plus-tile must be connected to another tile. If this other tile is again only a T-tile connected at its central tile, again the retiling introduces another plus-tile. Again, because Q / ∈ C, eventually a newly retiled plus-tile will be adjacent to a tile other than a T-tile at its central tile, and then that shape can be retiled without a plus-tile.
Thus, for any given polyomino R, it suffices to check whether R ∈ C to determine whether it is tileable by S a , and checking whether R ∈ C is an O(n) process.

Discussion
It is probably possible to use the fountain set S 2 to solve the classic tiling question for the tile set composed of the domino, 3-bar, and L-tile, similarly to how we solved it for set S a in Section 3.2. Furthermore, it might then be possible to find how to remove the 3-bars as well, thus answering the classic tiling question for the tile set composed of only the domino and L-tile. If these questions are indeed answerable using this method, it may motivate further study of fountain sets and how they might systematically be used to answer tiling questions.
In this paper we briefly studied the size and characterization of small fountain sets; it might be interesting in the future to consider more complicated fountain sets and attempt to generalize results. In particular, it might be interesting to search for more algebraic interpretations of fountain sets, perhaps relating them to other algebraic approaches to tiling problems.