1 Introduction

Since Golomb [5] introduced the notion of polyominoes, many puzzles with polyominoes have been considered and solved from the viewpoint of theoretical computer science. In this paper, we focus on the tiling puzzle which is one of the most famous and classical puzzles with polyominoes.

Fig. 1
figure 1

A Yes-instance \((P , S)\) of the tiling problem consisting of (a) a right-angled polygon P and (b) a set \(S\) of polyominoes. (c) Tiling P with polyominoes in \(S\)

A polyomino is a right-angled polygon (i.e., a polygon made by connecting unit squares along their edges). Then, we study the problem of tiling a right-angled polygon with polyominoes, defined as follows: Given a right-angled polygon P and a set \(S\) of polyominoes, determine whether P can be covered without any overlap using translated copies of polyominoes in \(S\) (see Figs. 1, 2 as examples). To avoid the confusion, while both P and polyominoes in \(S\) are right-angled polygons, P is called a polygon and each right-angled polygon in \(S\) is called a polyomino. In the rest of this paper, we denote by \((P , S)\) an instance of the tiling problem.

1.1 Known Results

The tiling problem has been studied for several decades, and there are many known results for the problem. We here summarize some of them classified by whether a given polygon P can have a hole or not. In the following, we simply denote by \(x \times y\) the polyomino of a rectangle with x rows and y columns.

1.1.1 Polygons Without Any Hole

For the case where a given polygon P contains no hole, the tiling problem is solvable in polynomial time if \(S= \{ 1 \times 2,\, 2 \times 1,\, 1 \times 3,\, 3 \times 1 \}\) [11] or \(S= \{ k \times k',\, m \times m' \}\) for any fixed positive integers \(k, k', m, m'\) [8, 13].

It is a natural question to ask whether the tiling problem (without any hole in P) is solvable in polynomial time or not, if \(S\) contains only a constant number of polyominoes. Pak and Yang [10] negatively answered the question: there exists a set \(S\) consisting of \(10^6\) polyominoes such that the tiling problem is NP-complete and its counting variant is # P-complete.

Fig. 2
figure 2

A No-instance \((P, S)\) of the tiling problem consisting of (a) a right-angled polygon P and (b) a set \(S\) of a polyomino

Fig. 3
figure 3

(a) L-trominoes and (b) I-trominoes

1.1.2 Polygons with Holes

For the case where a given polygon P may contain holes, the complexity has been analyzed more precisely.

First, consider the case where \(S\) contains only bars (i.e., \(1 \times m\) or \(m \times 1\) rectangles for a positive integer m.) If \(S\) consists of dominoes, that is, \(S= \{1 \times 2,\, 2 \times 1\}\), then the tiling problem can be solved in polynomial time by reducing it to the matching problem on bipartite graphs. Rémila [12] gave a linear-time algorithm for \(S= \{ 1 \times 2,\, 2 \times 1,\, 1 \times 3,\, 3 \times 1 \}\). On the other hand, Beauquier et al. [1] showed that the tiling problem is NP-complete even if \(S= \{ 1 \times m,\, k \times 1 \}\), for any fixed integers \(m \ge 2\) and \(k \ge 3\).

Second, consider the case where \(S\) contains polyominoes which are not necessarily bars. Such a polyomino with the smallest size is a tromino, that is, a polyomino consisting of three unit squares (see Fig. 3). Trominoes have only two shapes essentially; four polyominoes in Fig. 3 (a) are called L-trominoes, and two polyominoes in Fig. 3 (b) are called I-trominoes. Let \(L\) and \(I\) be the sets of all L-trominoes and I-trominoes, respectively. The result by Beauquier et al. [1], mentioned above, implies that the tiling problem is NP-complete if \(S=I\). Moore and Robson [9] showed that the tiling problem is NP-complete if \(S= L\). They also showed that if \(S= L\cup \{ 2 \times 2 \}\), the tiling problem is NP-complete and its counting variant is # P-complete. However, the complexity status was open for \(S= L\cup I\).

1.2 Our Contribution

In this paper, we precisely analyze the computational hardness of the tiling problem and its variants for polygons P with holes when the polyominoes in \(S\) are restricted to trominoes or only two bars. We denote by L-tiling, I-tiling and LI-tiling the tiling problem when restricted to \(S= L\), \(S= I\) and \(S= L\cup I\), respectively; we also denote by 2BAR-tiling the tiling problem when restricted to \(S= \{ 1 \times m,\, k \times 1 \}\) for any fixed integers \(m \ge 2\) and \(k \ge 3\).

In this paper, we prove the NP-completeness of L-tiling, I-tiling, LI-tiling and 2BAR-tiling. As we mentioned in Sect. 1.1.2, the NP-completeness of L-tiling, I-tiling and 2BAR-tiling are already known. However, our proofs are different from the known ones; we will construct a polynomial-time reduction from one-in-three 3SAT (which will be defined later) to each of the four problems. We emphasize that our reductions are carefully designed so that (valid) tilings of the corresponding instance have the one-to-one correspondence with (valid) solutions of a given instance of one-in-three 3SAT. Therefore, our reductions also prove that the counting variants and the another-solution-problem variants of the four problems are # P-complete and ASP-complete, respectively. Note that the another-solution-problem variant of a problem is defined as follows [15]: Given an instance of the problem and its (valid) solution s, find a solution \(s'\) of the instance other than s if exists.

We note that, while many complexity results are known for the tiling problem, there are only a few results about # P-completeness. Indeed, showing the # P-completeness of L-tiling was an open problem proposed by Moore and Robson [9]. In addition, Pak and Yang [10] conjectured that the counting variant of the tiling problem is # P-complete even if \(S\) consists of only a small number of rectangles. Our results answer both of them.

An early version of this paper has been presented in [7].

2 Reductions

To prove our results, we introduce a graph orientation problem, called the one-in-three graph orientation problem (1-in-3 GO for short), and give reductions from one-in-three 3SAT to our problems via 1-in-3 GO.

We first define the one-in-three 3SAT problem, which is known to be NP-complete [14], # P-complete [2] and ASP-complete [15].

Definition 2.1

One-in-three 3SAT.

We are given a conjunctive normal form (CNF) formula \(\varphi \) consisting of m clauses with n variables such that each clause \(C_j\) contains three literals (i.e., variables or their negations). Then, one-in-three 3SAT is to determine whether there exists a satisfying truth assignment to the variables such that each clause in \(\varphi \) has exactly one true literal.

For example, \(\varphi = ( x \vee y \vee {\overline{z}} ) \wedge ( x \vee z \vee w )\) is a yes-instance, because there is a satisfying truth assignment \(( x, y, z, w ) = ( \text {False},\, \text {False},\, \text {False},\, \text {True} )\). On the other hand, \(\varphi ^\prime = ( x \vee y \vee z ) \wedge ( {\overline{x}} \vee {\overline{y}} \vee {\overline{z}} )\) is a no-instance, even though there is a truth assignment which satisfies all clauses in \(\varphi ^\prime \).

2.1 Reduction to 1-in-3 GO

We now introduce the one-in-three graph orientation problem, as follows:

Definition 2.2

1-in-3 GO (one-in-three graph orientation).

We are given an undirected 3-regular graph \(G = (V, E)\) such that V is partitioned into three (disjoint) node-subsets \(V_{\ell }\), \(V_{C}\) and \(V_{{\overline{C}}}\); the nodes in \(V_{\ell }\), \(V_{C}\), and \(V_{{\overline{C}}}\) are called literal nodes, clause nodes, and negated-clause nodes, respectively. Then, 1-in-3 GO is to determine whether there exists an orientation of G (i.e., an assignment of directions to all edges in G) such that

  1. (1)

    every literal node in \(V_{\ell }\) has in-degree either zero or three;

  2. (2)

    every clause node in \(V_{C}\) has exactly one inbound edge, i.e., in-degree one; and

  3. (3)

    every negated-clause node in \(V_{{\overline{C}}}\) has exactly one outbound edge, i.e., out-degree one.

For example, the undirected 3-regular graph in Fig. 4 (a) is a yes-instance, because it has a valid orientation as illustrated in Fig. 4 (b), where each literal node in \(V_{\ell }\) is depicted by a black circle, each clause node in \(V_{C}\) by a gray circle, and each negated-clause node in \(V_{{\overline{C}}}\) by a gray square.

Fig. 4
figure 4

(a) Instance \(G_{\varphi }\) of 1-in-3 GO corresponding to an instance \(\varphi = ( x \vee y \vee {\overline{z}} ) \wedge ( x \vee z \vee w )\) of one-in-three 3SAT, and (b) a valid orientation of \(G_{\varphi }\) corresponding to a satisfying truth assignment \(( x, y, z, w ) = ( \text {False},\, \text {False},\, \text {False},\, \text {True} )\)

In this subsection, we prove the following theorem.

Theorem 2.3

1-in-3 GO and its counting and another-solution-problem variants are NP-complete, \(\#\) P-complete and ASP-complete, respectively.

Observe that 1-in-3 GO is in NP, in # P and in ASP. Therefore, as a proof of Theorem 2.3, we construct a polynomial-time reduction from one-in-three 3SAT to 1-in-3 GO. We note that, to prove the # P-hardness and ASP-hardness, our reduction satisfies that valid orientations to our corresponding instance of 1-in-3 GO have the one-to-one correspondence with satisfying truth assignments to a given instance of one-in-three 3SAT. In addition, although the corresponding graph of 1-in-3 GO is not required to be planar, we will embed it (with edge-crossings but without any edge-overlap) on a grid whose size is bounded by a polynomial size (see Fig. 4 as an intuitive illustration); this embedding will be useful for the reductions from 1-in-3 GO to the tiling problem.

2.1.1 Construction

Let \(\varphi \) be a given 3-CNF formula consisting of m clauses with n variables. Then, we construct an undirected 3-regular graph \(G_{\varphi }\) (with an embedding on a grid) as the corresponding instance of 1-in-3 GO (see Fig. 4 (a) for \(\varphi = ( x \vee y \vee {\overline{z}} ) \wedge ( x \vee z \vee w )\) as an example of the construction).

First, for each variable x in \(\varphi \), we add a cycle to \(G_{\varphi }\) (see the upper half of \(G_{\varphi }\) in Fig. 4 (a)). The cycle consists of some pairs of literal nodes labeled x and \({\overline{x}}\), and the number of such pairs in the cycle equals to the number of occurrences of the variable in \(\varphi \). In addition, the labels x and \({\overline{x}}\) of the literal nodes appear alternatively when we traverse the cycle in the clockwise direction. Each pair \((x, {\overline{x}})\) will correspond to one occurrence of the literals of the variable x in \(\varphi \). As an embedding of the cycle on a grid, we place a pair \((x, {\overline{x}})\) on the upper side if it corresponds to an occurrence of the positive literal x so that the left literal node is labeled with x; otherwise we place the pair on the lower side so that the left literal node is labeled with \({\overline{x}}\).

Fig. 5
figure 5

A pair of a clause node \(C_j\) and a negated-clause node \(\overline{C_j}\) which corresponds to a clause \(C_j = \ell _1 \vee \ell _2 \vee \ell _3\) with three literals \(\ell _1\), \(\ell _2\) and \(\ell _3\) in \(\varphi \)

Second, for each clause \(C_j = \ell _1 \vee \ell _2 \vee \ell _3\) with three literals \(\ell _1\), \(\ell _2\) and \(\ell _3\) in \(\varphi \), we add two nodes to \(G_{\varphi }\); one is a clause node labeled with \(C_j\) and the other is a negated-clause node labeled with \(\overline{C_j}\) (see the bottom of \(G_{\varphi }\) in Fig. 4 (a)). In the embedding, we place the clause node \(C_j\) on the left side and the negated-clause node \(\overline{C_j}\) on the right side. Recall that each of the three literals \(\ell _1\), \(\ell _2\) and \(\ell _3\) has its corresponding pair of literal nodes in the upper half of \(G_{\varphi }\). Then, as illustrated in Fig. 5, we can connect the clause node \(C_j\) with three literal nodes labeled with \(\ell _1\), \(\ell _2\) and \(\ell _3\); and connect the negated-clause node \(\overline{C_j}\) with three literal nodes labeled with \(\overline{\ell _1}\), \(\overline{\ell _2}\) and \(\overline{\ell _3}\).

This completes the construction of the corresponding instance \(G_{\varphi }\) of 1-in-3 GO. By the construction, \(G_{\varphi }\) is 3-regular and contains 8m nodes and 12m edges in total. Thus, \(G_{\varphi }\) can be embedded on the grid of width O(m) and height O(n). Therefore, we can obtain \(G_{\varphi }\) together with its embedding in O(mn) time.

2.1.2 Correctness of the Reduction

We now prove that the reduction in Sect. 2.1.1 is correct, and indeed satisfies the one-to-one correspondence between valid orientations of \(G_{\varphi }\) and satisfying truth assignments of \(\varphi \). As an example, a valid orientation in Fig. 4 (b) of the graph \(G_{\varphi }\) corresponds to exactly one satisfying truth assignment \(( x, y, z, w ) = ( \text {False},\, \text {False},\, \text {False},\, \text {True})\), and vice versa.

Consider a satisfying truth assignment of \(\varphi \). Then, we assign the outward direction to all edges incident to the literal nodes which corresponds to True, while assign the inward direction to all edges incident to the literal nodes which corresponds to False; thus, Condition (1) of Definition 2.2 is satisfied. Note that, since the literal nodes x and \({\overline{x}}\) appear alternatively in the cycle for a variable x, these assignments do not conflict with each other. Since each edge in \(G_{\varphi }\) is incident to at least one literal node, we have already assigned directions to all edges in \(G_{\varphi }\); this implies that a satisfying truth assignment of \(\varphi \) corresponds to exactly one orientation of \(G_{\varphi }\). Since each clause in \(\varphi \) has exactly one true literal by this truth assignment, Conditions (2) and (3) of Definition 2.2 are satisfied and hence this orientation of \(G_{\varphi }\) is valid.

Conversely, consider a valid orientation of \(G_{\varphi }\). Then, each literal node has in-degree either zero or three. Since the literal nodes x and \({\overline{x}}\) appear alternatively in the cycle for each variable x, all literal nodes with the same label x (or \({\overline{x}}\)) have the same in-degree. Thus, we set \(x = \text {True}\) if the literal nodes with label x have in-degree zero; otherwise set \(x = \text {False}\). Since Condition (2) of Definition 2.2 ensures that each clause node \(C_j\) has in-degree one, the corresponding clause \(C_j\) in \(\varphi \) has exactly one true literal. Thus, the obtained truth assignment is satisfiable for \(\varphi \). Furthermore, this truth assignment is uniquely decided from the orientation of \(G_{\varphi }\).

This completes the proof of Theorem 2.3.

2.2 Reduction to L-tiling

In this subsection, we consider the tiling problem with only L-trominoes and prove the following theorem.

Theorem 2.4

L-tiling and its counting and another-solution-problem variants are NP-complete, \(\#\) P-complete and ASP-complete, respectively.

Observe that L-tiling is in NP, in # P and in ASP. Therefore, as a proof of Theorem 2.4, we construct a polynomial-time reduction from 1-in-3 GO to L-tiling with preserving the one-to-one correspondence between valid solutions.

2.2.1 Idea of the Reduction

Since the problem is restricted to the case where \(S= L\) (see Fig. 3 (a)), we can construct only a polygon P so that it corresponds to a given instance of 1-in-3 GO. Recall that, in the previous subsection, we have constructed the graph \(G_{\varphi }\) of 1-in-3 GO with an embedding on a grid of polynomial size. Thus, we indeed construct the polygon P by replacing \(G_{\varphi }\) on a grid embedding with our gadgets so that a valid way of tiling the polygon P with L-trominoes corresponds to a valid orientation of \(G_{\varphi }\), and vice versa.

More specifically, we explain our idea of the reduction using our simplest gadget, called a line gadget for L-tiling, which is illustrated in Fig. 6 (a); this gadget corresponds to (a part of) an edge in \(G_{\varphi }\). The line gadget for L-tiling consists of both the solid and dotted unit squares in Fig. 6 (a), although each dotted unit square will be used as a “connector” and will be shared by another gadget to propagate the way of tiling. If we want to cover all solid unit squares of this gadget by L-trominoes, there are only two ways of tilings as illustrated in Fig. 6 (b, c). We regard the ways of tilings (b) and (c) as two corresponding directions of (the part of) the edge in \(G_{\varphi }\): The tiling (b) corresponds to assigning the direction from left to right to the edge, while the tiling (c) corresponds to assigning the direction from right to left to the edge. Covering (resp., not covering) the dotted unit square by an L-tromino represents that the direction of the edge is outbound (resp., inbound.)

Fig. 6
figure 6

A line gadget for L-tiling and LI-tiling, and its two ways of tiling

Fig. 7
figure 7

(a) A corner gadget for L-tiling and LI-tiling, and (b) a combination of line and corner gadgets

If we need to bend an edge in \(G_{\varphi }\), we use a corner gadget for L-tiling illustrated in Fig. 7 (a). Similar to the line gadget above, if we want to cover all solid unit squares of the corner gadget by L-trominoes, there are only two ways of tilings; the dotted unit square covered (resp., not covered) by an L-tromino represents that the direction of the corresponding part of the edge is outbound (resp., inbound.) Therefore, these dotted unit squares work as connectors; by combining link and corner gadgets as in Fig. 7 (b), we can correctly propagate the direction of the edge.

We respectively replace the edge-crossing points, pairs of literal nodes, clause nodes, and negated-clause nodes in \(G_{\varphi }\) by cross, duplicator, clause, negated-clause gadgets for L-tiling that will be defined in Sect. 2.2.2. All but the duplicator gadget are of the same size. The size of the duplicator gadget equals to that of a combination of two other gadgets, since we replace two literal nodes by one duplicator gadget. As a result of these replacements, we can obtain a “patchwork” of the gadgets as the polygon P of L-tiling which corresponds to a given instance \(G_{\varphi }\) of 1-in-3 GO.

Recall that the graph \(G_{\varphi }\) is embedded on a grid of size O(mn), where m is the number of clauses in \(\varphi \) and n is the number of variables in \(\varphi \). Therefore, we use O(mn) gadgets for replacing the elements in \(G_{\varphi }\). Furthermore, each of our gadgets consists of a constant number of unit squares, and hence the corresponding polygon P is of size O(mn) and can be constructed in polynomial time.

Therefore, to complete the proof of Theorem 2.4, it suffices to give the other gadgets (i.e., cross, duplicator, clause, and negated-clause gadgets) with noting that they preserve the one-to-one correspondence between valid tilings and valid orientations.

2.2.2 Other Gadgets for L-tiling

For each edge-crossing in the embedding of \(G_{\varphi }\), we replace it with a cross gadget for L-tiling given in Fig. 8 (a). There are only four ways, as illustrated in Fig. 8 (b–e), to cover all solid unit squares of this gadget by L-trominoes. Note that the left and right connectors (dotted unit squares) always preserve the direction of the horizontal edge in \(G_{\varphi }\), that is, if the left connector is covered, then the right connector is not covered, and vice versa. The same property holds for the upper and bottom connectors, and hence the direction of the vertical edge in \(G_{\varphi }\) is also preserved. Note that, however, we can independently choose the directions of the vertical and horizontal edges.

Fig. 8
figure 8

A cross gadget for L-tiling and its four ways of tilings

Each pair of literal nodes in \(G_{\varphi }\) is replaced with a duplicator gadget for L-tiling given in Fig. 9 (a). As mentioned before, the width of the duplicator gadget equals to that of a combination of two other gadgets. There are only two ways to cover all solid unit squares of the duplicator gadget by L-trominoes, as shown in Fig. 9 (b, c). The upper-left and bottom-left (resp., the upper-right and bottom-right) connectors always have the same direction (inbound or outbound), while the upper-left and upper-right connectors always take the opposite directions. This property preserves Condition (1) of Definition 2.2.

Fig. 9
figure 9

A duplicator gadget for L-tiling and LI-tiling, and its two ways of tilings

Each clause node in \(G_{\varphi }\) is replaced with a clause gadget for L-tiling given in Fig. 10 (a). There are only three ways to cover all solid unit squares of this gadget, as shown in Fig. 10 (b–d), each of which has exactly one uncovered connector (i.e., the inbound direction). This property preserves Condition (2) of Definition 2.2.

Each negated-clause node in \(G_{\varphi }\) is replaced with a negated-clause gadget for L-tiling given in Fig. 11. Similar to the clause gadget above, there are only three ways to cover all solid unit squares of this gadget; however, each of them has exactly one covered connector (i.e., the outbound direction.) This property preserves Condition (3) of Definition 2.2.

This completes the proof of Theorem 2.4.

Fig. 10
figure 10

A clause gadget for L-tiling and LI-tiling, and its three ways of tilings

Fig. 11
figure 11

A negated-clause gadget for L-tiling and LI-tiling, and its three ways of tilings

2.3 Reductions to I-tiling, LI-tiling and 2BAR-tiling

In this subsection, we consider the tiling problem with only I-trominoes, both L-trominoes and I-trominoes, or only two bars. By the same arguments as in Sect. 2.2.1, it suffices to construct six gadgets for each variant, that is, line, corner, cross, duplicator, clause and negated-clause gadgets. Thus, we only give those gadgets for each variant such that

  1. (a)

    the size of each gadget equals to that of a combination of a constant number of the smallest-size gadget in the variant;

  2. (b)

    covering a connector (i.e., a dotted unite square) represents the outward direction, and not covering it represents the inward direction; and

  3. (c)

    the gadgets preserve the one-to-one correspondence between valid orientations and valid tilings.

In the following, we give such gadgets for each variant, and prove the following theorem.

Theorem 2.5

I-tiling, LI-tiling and 2BAR-tiling and their counting and another-solution-problem variants are NP-complete, \(\#\) P-complete and ASP-complete, respectively.

Fig. 12
figure 12

Gadgets for I-tiling: (a) line, (b) corner, (c) cross, (d) duplicator, (e) clause and (f) negated-clause gadgets

2.3.1 Gadgets for I-tiling

The line, corner, cross, duplicator, clause and negated-clause gadgets for I-tiling are given in Fig. 12 (a–f), respectively. For line, corner and clause gadgets in Fig. 12 (a), (b) and (e), respectively, we can straightforwardly find the ways to cover all solid unit squares, and can check their correctness. We note that a crank in the line gadget in Fig. 12 (a) guarantees that there are exactly two ways of tilings, which correspond to two directions of (a part of) a corresponding edge in \(G_{\varphi }\). The other non-trivial gadgets work as follows.

Cross gadget In general, constructing a gadget for an edge-crossing is the most difficult part to design in these kinds of reductions, as mentioned in [6]. This difficulty also occurs in I-tiling (see Figs. 12 (c), 13).

Observe that there are only two ways to cover each of the left and right connectors, because of the crank structure; recall the similar structure in the line gadget in Fig. 12 (a). Since there are 127 solid unit squares in the gadget, we need 43 I-trominoes to cover all of them and hence two unit squares of I-trominoes remain. These two remaining unit squares can cover two of the four connectors. Carefully tracing all possible ways of tilings, we can check that both of the top and bottom connectors cannot be covered at the same time, and both of the right and left connectors cannot be covered at the same time. Therefore, we only have four ways of tilings as shown in Fig. 13.

Fig. 13
figure 13

Four ways to cover the cross gadget for I-tiling

Fig. 14
figure 14

Two ways to cover the duplicator gadget for I-tiling

Fig. 15
figure 15

Three ways to cover the negated-clause gadget for I-tiling

Duplicator gadget In the middle part of the duplicator gadget in Fig. 12 (d), notice that there are three “bridges” of length four which join the right and left halves. Then, there are only two ways to cover each bridge; putting an I-tromino on either the left side or the right side. Since there are 106 solid unit squares in the gadget, we need 36 I-trominoes to cover all of them and hence two unit squares of I-trominoes remain. These two remaining unit squares can cover two of the four connectors. The crank structure near each connector controls the possible ways of tilings, and indeed there are only two ways to cover all solid unit squares of the gadget as shown in Fig. 14.

Negated-clause gadget In the negated-clause gadget given in Fig. 12 (f), the rectangle of size \(4 \times 2\) placed on the center plays an important role. Consider the ways to put two I-trominoes on the rectangle. Note that, since the width of the rectangle is two, both the I-trominoes must be of size \(3 \times 1\). If the two I-trominoes are put on different heights, then we cannot cover all solid unit squares of the rectangle. Therefore, there are only two ways to put the I-trominoes on the rectangle. This gives us only three valid tilings of the gadget, as illustrated in Fig. 15.

2.3.2 Gadgets for LI-tiling

Notice that, if we use even one I-tromino, there is no way to cover all solid unit squares of the gadgets for L-tiling except for the cross gadget. Therefore, we can use the gadgets for L-tiling in Figs. 67910 and 11 as line, corner, duplicator, clause and negated-clause gadgets for LI-tiling, respectively. The cross gadget for LI-tiling is given in Fig. 16. There are only four ways to cover all solid unit squares of the gadget, as shown in Fig. 17.

Fig. 16
figure 16

A cross gadget for LI-tiling

Fig. 17
figure 17

Four ways to cover the cross gadget for LI-tiling

Fig. 18
figure 18

Gadgets for 2BAR-tiling with \(S= \{ 1 \times 2,\, 3 \times 1 \}\): (a) line, (b) corner, (c) cross, (d) duplicator, (e) clause and (f) negated-clause gadgets

Fig. 19
figure 19

A cross gadget for 2BAR-tiling with \(S= \{ 1 \times 5,\, 4 \times 1 \}\)

Fig. 20
figure 20

A duplicator gadget for 2BAR-tiling with \(S= \{ 1 \times 5,\, 4 \times 1 \}\)

2.3.3 Gadgets for 2BAR-tiling

Notice that I-tiling is a special case of 2BAR-tiling. Indeed, all gadgets for I-tiling can be extended straightforwardly to those for 2BAR-tiling with \(S= \{1 \times m,\, k \times 1\}\), for any fixed integers \(m \ge 2\) and \(k \ge 3\). As examples, we give the gadgets for \(S= \{ 1 \times 2,\, 3 \times 1 \}\) in Fig. 18, and give the cross and duplicator gadgets for \(S= \{ 1 \times 5,\, 4 \times 1 \}\) in Figs. 19 and 20, respectively.

Recall that, in the negated-clause gadget for I-tiling in Figs. 12 (f) and 15, the rectangle of size \(4 \times 2\) at the center played an important role. For 2BAR-tiling with \(S= \{1 \times m,\, k \times 1\}\), we define the size of such a rectangle as \((k+1) \times (m-1)\). Then, to cover all unit squares in the rectangle, we have to place \((m-1)\) bars of size \(k \times 1\) with the same height.

3 Concluding Remarks

We have studied the computational hardness of L-tiling, I-tiling, LI-tiling and 2BAR-tiling, and clarified that the tiling problem remains computationally intractable even for a few (at most six) polyominoes. We emphasize that our results gave answers to two open questions proposed by [9, 10].

In this paper, we focused on the tiling problem for a polygon P with holes. It remains open to clarify whether the tiling problem and its variants remain NP-complete, # P-complete and ASP-complete even if a given polygon P has no hole and a given set \(S\) consists of only a few polyominoes.

Finally, we note that many of our reductions can be extended to the following related problems.

  1. (1)

    Packing Problem

    Given a polygon P, a set \(S\) of polyominoes and an integer k, determine whether k copies of polyominoes in \(S\) can be placed on P without any overlap. Note that, in the packing problem, we can rotate the copy of a polyomino in \(S\). It is known that this problem is solvable in polynomial time if \(S= \{1 \times 2 \}\), while it is NP-complete if \(S= \{2 \times 2 \}\) [3, 4].

  2. (2)

    Covering Problem

    Given a set P of points in the plane, a set \(S\) of polyominoes and an integer k, determine whether k translated copies of polyominoes in \(S\) can cover all points in P. In this problem, the copies of polyominoes are allowed to mutually overlap each other.

  3. (3)

    Unique Covering Problem

    Given a set P of points in the plane, a set \(S\) of polyominoes and an integer k, determine whether k translated copies of polyominoes in \(S\) can uniquely cover all points in P, that is, no overlap of the copies of polyominoes is allowed.

Similar to L-tiling, I-tiling, LI-tiling and 2BAR-tiling, consider the three problems above when restricted to only L-trominoes, only I-trominoes, both L-trominoes and I-trominoes, and only two bars.

Notice that each of L-tiling, I-tiling and LI-tiling takes all possible rotated copies of trominoes as the set \(S\) of polyominoes; the same holds for 2BAR-tiling with \(S= \{1 \times k,\, k \times 1\}\) for any fixed integer \(k \ge 3\). Therefore, we can see the correspondence between the tiling and the packing problems for such cases, and hence the packing problem and its variants are NP-complete, # P-complete and ASP-complete for such cases.

By converting the gadgets in this paper to the positions of points (and regarding the set of points as the set P), we can also see the correspondence between the tiling and the (unique) covering problems. Therefore, the (unique) covering problem and its variants are NP-complete, # P-complete and ASP-complete.