Hard and Easy Instances of L-Tromino Tilings

10/12/2017 ∙ by Javier T. Akagi, et al. ∙ 0

In this work we study tilings of regions in the square lattice with L-shaped trominoes. Deciding the existence of a tiling with L-trominoes for an arbitrary region in general is NP-complete, nonetheless, we indentify restrictions to the problem where either it remains NP-complete or it has a polynomial time algorithm. First we show that an aztec diamond of order n always has an L-tromino tiling if and only if n(n+1)≡ 0 3; if an aztec diamond has at least two defects or holes, however, the problem of deciding a tiling is NP-complete. Then we study tilings of arbitrary regions where only 180^∘ rotations of L-trominoes are available. For this particular case we show that deciding the existence of a tiling remains NP-complete, yet, if a region contains certain so-called "forbidden polyominoes" as subregions, then there exists a polynomial time algorithm for deciding a tiling.

READ FULL TEXT VIEW PDF
POST COMMENT

Comments

There are no comments yet.

Authors

page 1

page 2

page 3

page 4

This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.

1 Introduction

1.1 Background

A packing puzzle is a solitary game where a player tries to find a way to cover a given shape using polyominoes, where a polyomino is a set of squares joined together by their edges. The computational complexity of packing puzzles was studied by Demaine and Demaine [3] who showed that tiling a shape or region using polyominoes is NP-complete.

In this work we study tilings of regions in the square lattice with L-shaped trominoes (a polyomino of three cells) called an L-Tromino or simply tromino in this work. A cell in is a subset and a region is any finite union of connected cells. At our disposal we have an infinite amount of trominoes and would like to know if a given region can be covered or tiled with trominoes.

The problem of tiling with trominoes was first studied by Conway and Lagarias [2] who presented an algebraic necessary condition for a region in order to have a tiling. Moore and Robson [8] showed that deciding if a region can be covered with trominoes is NP-complete. Later Horiyama et al. [5] presented another proof of NP-completeness by constructing an one-one reduction which implies that counting the number of tilings with trominoes is #P-complete. Counting the number of tilings with L-trominoes was also studied by Chin et al. [1] using generating functions.

1.2 Contributions

In this work we aim at identifying instances of the tiling problem with trominoes that either have efficient algorithms or it remains NP-complete. As a further generalization of the problem, we also consider regions with “defects” or holes, that is, we want to know if there is a tiling with trominoes without covering the defects. First we study the Aztec rectangle (and hence, also an Aztec diamond) [4, 10] and show that any Aztec rectangle of side lengths can be covered with trominoes if and only if (Theorem 3.1), which implies the existence of an optimal polynomial time algorithm for finding a tiling in an Aztec rectangle, and hence, an Aztec diamond. Then we showed that for the cases when does not hold, if an Aztec Rectangle has exactly one defect, then it can be covered with trominoes (Theorem 4). In general, however, deciding the tiling of an Aztec diamond with an unknown number of defects is NP-complete (Theorem 3.3).

In the second part of this paper we study a restricted case of the tiling problem where we only have rotations of the trominoes available. Here we show that the problem remains NP-complete (Theorem 4.1) by slightly modifying the one-one reduction from the 1-in-3 Graph Orientation Problem of Horiyama et al. [5], whereas any Aztec rectangle has no tiling at all (Theorem 4.2). Nevertheless, we show that if any region contains at least one of the so-called “forbidden polyominoes” identified in this work, then that region has an efficient algorithm for deciding a tiling (Theorem 4.3). This latter result is proved by constructing a graph representation of the region, called an intersection graph, and identifying independent sets of certain size. If the intersection graph has a claw, then that claw will correspond to a forbidden polyomino; if the graph is claw-free, however, we can use well-known efficient algorithms for finding independent sets, and hence, a tiling for the region.

2 Preliminaries

In this work we will use to denote the set of integers and to denote the discrete interval .

A region is a finite union of connected cells, where connected means that any two cells in share at least one common point in . If a cell is the set of points , we label such cell by which we refer to as the cell’s coordinate. Two cells are adjacent if the Manhattan distance, i.e., the -norm, of their coordinates is 1; thus, two cells in diagonal to each other are not adjacent.

A tromino is a polyomino of 3 cells. In general there are two types of trominoes, the L-tromino and the I-tromino. An L-tromino is a polyomino of 3 cells with an L shape. An I-tromino is a polyomino of 3 straight cells with the form of an I. In this work we will mostly be dealing with L-Trominos and we will refer to them simply as trominoes; I-trominoes will appear later but we will make sure to clarify to which type of tromino we are referring to.

A cover or tiling of a region is a set of trominoes covering all cells of without overlapping and each tromino is packed inside . The size of a cover is the number of tiles in it. A defect is a cell that is “marked” in the sense that in any cover any tromino cannot be placed on top of that cell. Thus, a cover of with defects is a set of trominoes covering all cells of that are not defects.

Definition 1

is the following problem:

INPUT : a region with defects.
OUTPUT : “yes” if has a cover and “no” otherwise.

Moore and Robson [8] proved that is NP-complete and Horiyama et al. [5] proved that , the counting version of , is #P-complete.

In this work we will also consider tilings where only trominoes with rotations are used. More precisely, given a region we want to find a cover where all trominoes are right-oriented as in Fig.3(a) or left-oriented as in Figure 3(b). We will refer to trominoes where only their rotations are considered as 180-trominoes. A 180-cover of is a cover with 180-trominoes.

(a) Right-oriented
(b) Left-oriented oriented
Figure 3: The problem either takes trominoes from the left figure or the right figure.
Definition 2

is the following problem:

INPUT : a region with defects.
OUTPUT : “yes” if has a 180-cover and “no” otherwise.

3 Tiling of the Aztec Rectangle

The Aztec Diamond of order , denoted , is the union of lattice squares , with , that lie completely inside the square [4]. Figure 8 shows the first four Aztec diamonds. Tilings of the Aztec diamond with dominos was initially studied by Elkies et al. [4] and later by several other people.

The concept of an Aztec diamond can be very easily extended to that of an Aztec rectangle. We denote by the Aztec rectangle which has unit squares on the southwestern side and unit squares on the northwestern side (here, ); in the case when we get an Aztec diamond of order . As an example Fig.9 shows . Domino tilings of Aztec rectangles have been studied by various mathematicians starting with Mills et. al. [6].

In the following subsections we study tilings of the Aztec rectangle using trominoes with and without defects, and then specialize them to Aztec diamonds.

(a)
(b)
(c)
(d)
Figure 8: Aztec diamonds of order 1, 2, 3 and 4.
Figure 9: Aztec rectangle .

3.1 Tilings with No Defects

For any Aztec rectangle with no defects, we can completely understand when there is a tiling. The following theorem gives a characterization.

Theorem 3.1

has a cover if and only if .

As a corollary, we get the following for the Aztec diamond.

Corollary 1

has a cover if and only if .

(a) 1-stair
(b) 2-stair
(c) -stair
Figure 13: A stair also includes all rotations.

To prove Theorem 3.1, first we present tilings of particular cases of the Aztec rectangle in Lemmas 2 and 3. The following Lemma is trivial.

Lemma 1

An Aztec rectangle, contains unit squares. Further, specializing we get that an Aztec diamond of order contains unit squares.

Define a stair as a a polyomino made-up only of trominoes with their rotations connected as in Fig.13(a). The same stair can be rotated to obtain another stair. A -stair is a co-joined set of stairs, where a stair is joined to another stair by matching their extremes; for example, in Fig.13(b) we can see two stairs where the lowest extreme of the upper stair is matched with the upper extreme of the lower stair. This idea is easily extended to a set of stairs thus giving a -stair as in Fig.13(c). A -stair can also be rotated to obtain another -stair. The height of a -stair is the number of steps in it. It is easy to see that the height of a -stair is . In addition, a single tromino would be a -stair.

(a) Tiling with a single stair.
(b) Tiling with a double stair.
Figure 16: Tilings of Lemmas 2 and 3.
Lemma 2

If and has a cover, then has a cover.

Proof

If are multiples of 3, then an -stair and an -stair can be used to tile around along the shorter and longer sides respectively, using the pattern of Fig.16(a). This tiling increments the order of the Aztec rectangle by 2, thus obtaining a tiling for .∎

Lemma 3

If and has a cover, then has a cover.

Proof

To find a tiling for we use four copies of added to the four corners of . Then, to complete the tiling, we use two and -stairs one on top of each other along the shorter and longer sides respectively, to complete the border. The entire construction follows the pattern of Fig.16(b). This tiling increments the order of the Aztec rectangle by 4, thus obtaining a tiling for .∎

The above two Lemmas gives as easy corollaries the following.

Corollary 2

If has a cover and is a multiple of 3, then has a cover.

Corollary 3

If has a cover and is a multiple of 3, then has a cover.

Now, let us prove Theorem 3.1.

Proof of Theorem 3.1.   The values for which holds are and for some .

Thus, the statement is equivalent to saying that for all positive integers there is a tiling of where or and that there are no tilings for when .

We show the second part now, which is easy since if we have with of the form , then the number of lattice squares inside is not divisible by and hence we cannot tile this region with trominoes.

We come to the first cases now. Using Lemmas 2 and 3, this part is clear if we can show the base induction case to be true.

The base case of Lemma 2 is shown in Fig.20(a), which is . Once we have a tiling of , we can use Lemma 2 to create a tiling of an Aztec rectangle whose sides are increased by . We can also increase by using the additional pieces shown in Fig.20(b,c) using them in combinations with any case of Aztec rectangle satisfying the properties of Lemma 2 to increase either the longer or the shorter sides, and if all three additional pieces are used then we can increase both the sides of .

(a) Base induction case.
(b) Length additional pieces.
(c) Breadth additional piece.
Figure 20: Base case of Lemma 2.

Similarly, the base case of Lemma 3 is shown in Fig.25(a), which is . Once we have a tiling of , we can use Lemma 3 to create a tiling of an Aztec rectangle whose sides are increased by . We can also increase by using the additional pieces shown in Fig.25(b,c,d) using them in combinations with any case of Aztec rectangle satisfying the properties of Lemma 3 to increase either the longer or the shorter sides, and if all three additional pieces are used then we can increase both the sides of .

(a) Base induction case.
(b) Length additional piece.
(c) Length additional piece.
(d) Breadth additional piece.
Figure 25: Base case of Lemma 3.

An time algorithm is immediately obtained from the proof of Theorem 3.1, and also for the Aztec Diamond (see App. 0.B). This bound is tight considering that the size of a cover of is .

3.2 Tiling with Defects

From Theorem 3.1 we know that for any positive integers , the Aztec rectangles with no defects such that divides or divides have a cover but if divides , then does not have a tiling. We show that if such an Aztec rectangle has exactly one defect, then it can be covered with trominoes.

Theorem 3.2

with of the form with one defect has a cover.

Proof

To tile with one defect we use a construct which we call a fringe appearing in Fig.28(a). It is easy to check that if a fringe has exactly one defect, then it can be covered with trominoes.

To construct a tiling for with one defect we place a fringe in a way that includes the defect and the left and right ends of the fringe touches the boundaries of the Aztec rectangle as in Fig.28(b). Then we use the tiling pattern of Fig.28(b) where we put stairs above and below the fringe.∎

(a) Fringe
(b) Tiling pattern
Figure 28: Tiling of with one defect. A fringe can be composed of any number of order 1 Aztec diamonds joined by their upper right and lower left cells. An reversed fringe is obtained by joining order 1 Aztec diamonds by their upper left and lower right cells.

As an easy corollary, we obtain the corresponding result for Aztec diamonds.

Corollary 4

For any positive integer , the Aztec Diamond with one defect has a cover.

We can consider many diffrent classes of defects, and it is observed that some of these classes have easy tilings, as an example, we have in Fig.31(a) an Aztec rectangle with four defects on its corners. A tiling of this region is shown in Fig.31(b). In the combinatorics literature, tilings of regions with defects of several kinds for Aztec rectangle have been studied (see [10] for the most general class of boundary defects).

(a) with four defects
(b) Tiling pattern
Figure 31: Tiling of with four defects.
Remark 1

Similar defects can be studied for Aztec Diamonds as well. In fact, we can delete all cells in a fringe and obtain a tiling.

The proof of Theorem 3.2 gives an optimal time algorithm for finding a cover for with one defect. In general, however, it is computationally hard to determine if with an unknown number of defects has a cover.

Theorem 3.3

It is NP-complete to decide if with an unknown number of defects has a cover.

Proof (sketch)

The reduction is from tiling an arbitrary region with defects. The idea is to embed into for some sufficiently large and insert defects in in a way that surrounds .∎

4 Tiling with 180-Trominos

In this section we study tilings of arbitrary regions using only 180-trominoes. With no loss of generality, in this section we will only consider right-oriented 180-trominoes.

4.1 Hardness

It is easy to see that even when restricted to 180-trominoes, deciding the existence of a tiling of an arbitrary region is still hard.

Theorem 4.1

is NP-complete.

Proof (sketch)

The proof uses the same gadgets for the reduction for I-Trominoes from the 1-in-3 Graph Orientation Problem of Horiyama et al. [5]. Take any gadget of Horiyama et al. [5] and partition each cell into 4 new cells. Thus, each I-tromino is transformed in a new or region (depending on the orientation of the I-tromino) which can be covered with four 180-trominoes as in Fig 32. If a gadget is covered with I-trominoes, then the same gadget, after partitioning each cell into four new cells, can also be covered with 180-trominoes. To see the other direction of this implication, we exhaustively examined all possible ways to cover each 4-cell-divided gadget with L-trominoes, and observed that each gadget with its original cells can also be covered with I-trominoes (see App.0.C).∎

Figure 32: I-Tromino to L-Tromino transformation using 180-Trominoes.

Theorem 4.1 also implies that the Triangular Trihex Tiling Problem of Conway and Lagarias [2] is NP-complete.

It is natural to think along these lines about tiling the Aztec rectangle (and hence, Aztec diamond) with 180-trominoes. However, we show that it is impossible.

Theorem 4.2

does not have a 180-cover.

Proof (sketch)

Consider the southwestern side of any Aztec rectangle as in Fig.33 and pick anyone of the marked cells, say the cell at coordinate . There are only two ways to cover that cell with a right-oriented tromino. With one tromino we can cover the cells with coordinates and , whereas with the other tromino we can cover the cells and . In either case the cells at and are always covered, and depending on which tromino is chosen either the cell at or is covered. Therefore, if we cover the entire bottom-left side of an Aztec rectangle, there will always be a cell at or that cannot be covered. Note that any reversed fringe that is on top of the bottom-left side of any Aztec rectangle can be covered with 180-trominoes if it has one defect.∎

Corollary 5

does not have a 180-cover.

Figure 33: Covering of an Aztec rectangle with right-oriented trominoes.

4.2 Efficient Tilings

In this section we identify a sufficient condition for a region to have an efficient algorithm that decides the existence of a 180-cover.

Figure 34: Forbidden polyominoes. All rotations, reflections and shear transformations are also forbidden polyominoes.
Theorem 4.3

If a region does not contain any of the forbidden polyominoes of Fig.34 as a subregion, then there exists a polynomial-time algorithm that decides if has a 180-cover.

For the remaining of this section we present a proof of Theorem 4.3. Remember that, with no loss of generality, we only consider right-oriented trominoes. Given a region we construct a graph , which we call the region graph of , as follows. For each cell that is not a defect there is a vertex . There is an edge for each pair of adjacent vertices and for each pair and . Note that this reduction is one-to-one. We present an example in Fig.37.

(a) Region
(b) Region graph
Figure 37: Example of a region graph construction.

From the region graph we construct a new graph which we call an intersection graph and is constructed as follows. For each triangle in there is a vertex and there is an edge between vertices and if the corresponding triangles share a vertex in ; for example, the intersection graph for Fig.37 is a triangle, because all triangles in the region graph share at least one vertex.

Lemma 4

For any region with a fixed number of defects, the maximum number of 180-trominoes that fit in equals the size of a maximum independent set in .

Proof

Let be the maximum number of tiles that fit in and let be a maximum independent set in the intersection graph . We claim that .

Each triangle in the region graph corresponds to a position where a 180-tile can fit. If is the maximum number tiles that can fit in , then there exists triangles in , denoted , that do not share any common vertex. Each triangle in corresponds to a vertex in and since none of the triangles in share a common vertex, defines an independent set in and .

To prove that suppose by contradiction that is not a maximum independent set of , that is, . Since is an independent set in , there are triangles in that do not share a common vertex. Thus, we can fit 180-trominos in , which is a contradiction because .∎

The idea for a proof of Theorem 4.3 is to construct a polynomial time algorithm that decides the existence of a 180-cover by deciding if a maximum independent set in equals the number of cells of divided by 3, which agrees with the number of trominoes covering . Deciding the existence of a maximum independent set of a given size is a well-known NP-complete problem, nevertheless, it is known from the works of Minty [7], Sbihi [11] and Nakamura and Tamura [9] that for claw-free graphs111A graph is claw-free if it does not have (a claw) as an induced subgraph. finding independent sets can be done in polynomial time. Hence, if is claw-free, then we can use a polynomial time algorithm for finding independent sets to decide the existence of a 180-cover. If has a claw, however, each claw will give one of the forbidden polyominoes.

In Lemma 5 below we show that is polynomial time reducible to deciding independent sets, which allow us to construct algorithms for using known algorithms for deciding independent sets. Then in Lemma 6 we show that if has a claw, then that claw corresponds to a forbidden polyomino in the region .

Lemma 5

There is a many-one polynomial-time reduction from to the problem of deciding existence of an independent set of a given size.

Proof

First the reduction constructs the region graph and the intersection graph . If the size of the largest independent set equals the number of cells of divided by 3, then output “yes” because has a 180-cover; otherwise output “no” because does not have a 180-cover.

Suppose has a 180-cover. If is the number of cells in , then the number of tiles in the 180-cover is . By Lemma 4, the largest independent set in equals .

Now suppose does not have a 180-cover. If is the number of cells in , then is not equal the maximum number of tiles that can fit in . Thus, by Lemma 4, it holds that is not equal the size of the largest independent set in .∎

Lemma 6

If has a claw, then has at least one forbidden polyomino.

Proof (sketch)

For any claw in there is a vertex of degree 3 and three vertices of degree 1, and each vertex in corresponds to a triangle in the region graph . We refer to the triangle that corresponds to the degree 3 vertex as the central triangle and each degree 1 triangles is called an adjacent triangle. Thus, to obtain all forbidden polyominoes, we look at all posible ways to connect (by the vertices) each adjacent triangle to the central triangle in such a way that each adjacent triangle only connects to the central triangle in a single vertex and it is not connected to any other adjacent triangle; otherwise, if an adjacent triangle connects with two vertices of the central triangle or any two adjacent vertices connects with one another, then the induced graph does not corresponds to a claw. By exhaustively enumerating all possibilities, we can extract all polyominoes that correspond to claws in . Then we partition this set of polyominoes in five equivalent classes, where two polyominoes are in the same class if and only if one can be obtained from the other by a rotation, a reflection or shear transformation (App.0.A).∎

Lemmas 5 and 6 complete the proof of Theorem 4.3.

5 Concluding Remarks and Open Problems

In this work we studied the computational hardness of tiling arbitrary regions with L-trominoes. We showed restrictions to the problem that keeps it computationally intractable and identified concrete instances where an efficient tiling exists. In particular we showed that tiling an Aztec rectangle (and hence, Aztec diamond) with defects is still a hard problem, but in the presence of 0 or 1 defects, a tiling is decidable in polynomial time. Furthermore, even if we restrict the problem of tiling an arbitrary region with rotations of L-trominoes it remains intractable. We showed, however, that if the region contains a so-called “forbidden polyomino” as a subregion, then the tiling problem is decidable in polynomial time.

We conclude this paper with some open problems that we consider challenging and that we believe will fuel future research in the subject.

  1. Hardness of tiling the Aztec rectangle with a given number of defects. In Section 3 we saw that an Aztec rectangle with 0 or 1 defects can be covered with L-trominoes in polynomial time, whereas in general the problem is NP-complete when the Aztec rectangle has an unknown number of defects; with , for every , an Aztec rectangle cannot be covered because the number of cells is not divisible by 3. It is open if there exists a polynomial time algorithm for deciding a tiling for an Aztec rectangle with a given number of defects.

  2. Characterization of tilings with I-trominoes and L-trominoes. In Fig.32 of Section 4 we saw that any gadget of Horiyama et al. [5] can be covered with I-trominoes if and only if the same gadget, after partitioning each cell into four new cells, can be covered with L-trominoes. In general, if is any region and is where each cell is partitioned into four cells, we have that if can be covered with I-trominoes, then can be covered with L-trominoes. We do not know, however, if the other way of this implication holds.

  3. Tiling of orthogonally-convex regions. In this work we showed several instances where a tiling can be found in polynomial time. In general, it is open if an orthogonally-convex region with no defects can be covered in polynomial time or if it is NP-complete to decide if a tiling exists.

References

  • [1] Chin, P., Grimaldi, R., Heubach, S.: Tiling with L’s and squares. Journal of Integer Sequences 10(07.2.8) (2007)
  • [2] Conway, J.H., Lagarias, J.C.: Tiling with polyominoes and combinatorial group theory. Journal of Combinatorial Theory, Series A 53(2), 183–208 (1990)
  • [3] Demaine, E.D., Demaine, M.L.: Jigsaw puzzles, edge matching, and polyomino packing: Connections and complexity. Graphs and Combinatorics 23(1), 195–208 (2007)
  • [4] Elkies, N., Kuperberg, G., Larsen, M., Propp, J.: Alternating-sign matrices and domino tilings. I. Journal of Algebraic Combinatorics 1(2), 111–132 (1992)
  • [5] Horiyama, T., Ito, T., Nakatsuka, K., Suzuki, A., Uehara, R.: Complexity of tiling a polygon with trominoes or bars. Discrete & Computational Geometry 58(3), 686–704 (2017)
  • [6] Mills, W.H., Robbins, D.P., Rumsey, H.: Alternating sign matrices and descending plane partitions. Journal of Combinatorial Theory. Series A 34(3), 340–359 (1983)
  • [7] Minty, G.J.: On maximal independent sets of vertices in claw-free graphs. Journal of Combinatorial Theory. Series B 28(3), 284–304 (1980)
  • [8] Moore, C., Robson, J.M.: Hard tiling problems with simple tiles. Discrete & Computational Geometry 26(4), 573–590 (2001)
  • [9] Nakamura, D., Tamura, A.: A revision of Minty’s algorithm for finding a maximum weighted stable set of a claw-free graph. Journal of the Operations Research Society of Japan 44(2), 194–204 (2001)
  • [10] Saikia, M.P.: Enumeration of domino tilings of an aztec rectangle with boundary defects. Advances in Applied Mathematics 89, 41–66 (2017)
  • [11] Sbihi, N.: Algorithme de recherche d’un stable de cardinalité maximum dans un graphe sans étoile. Discrete Mathematics 29(1), 53–76 (1980)

Appendix

Appendix 0.A Forbidden Polyominoes

(a)
(b)
(c)
(d)
(e)
Figure 43: All possible subregions that generate a claw in with their corresponding forbidden polyomino.

Appendix 0.B Efficient Tiling of the Aztec Rectangle

Theorem 0.B.1

A tromino cover for can be found in time .

Proof

Given , the following procedure called finds a tiling for .

  1. If or , return the tiling of Fig.25(a) or Fig.20(b), respectively.

  2. If , then return “there is no tiling”.

  3. If are multiples of 3, then

    1. ;

    2. fill the borders of using the pattern of Fig.20.

  4. If is a multiple of 3, then

    1. ;

    2. fill the borders of using the pattern of Fig.25.

  5. Return .

Steps 2 and 3 are done in time and steps 3b and 4b can be done in time , thus, giving a total time complexity of . The correctness follows from Lemmas 2 and 3.∎

Appendix 0.C Tiling with L-Trominoes of Horiyama et al.’s [5] Gadgets

In this section, figures 46, 51, 55 show all possible ways to cover the three gadgets of Horiyama et al. [5] for the 1-in-3 graph orientation problem.

(a)
(b)
Figure 46: Tiling of the duplicator gadget.
(a)
(b)
(c)
(d)
Figure 51: Tiling of the cross gadget.
(a)
(b)
(c)
Figure 55: Tiling of the clause gadget.