The Complexity of Tiling Problems
Fran\c{c}ois Schwarzentruber

TL;DR
This paper reviews key complexity results in tiling problems, introduces a new deterministic tile set concept, and identifies tiling problems complete for LOGSPACE and NLOGSPACE complexity classes.
Contribution
It proposes a new definition for deterministic tile sets and characterizes tiling problems complete for specific computational complexity classes.
Findings
Identifies tiling problems complete for LOGSPACE and NLOGSPACE.
Proposes a formal definition of deterministic tile sets.
Summarizes major complexity results in tiling problems.
Abstract
In this document, we collected the most important complexity results of tilings. We also propose a definition of a so-called deterministic set of tile types, in order to capture deterministic classes without the notion of games. We also pinpoint tiling problems complete for respectively LOGSPACE and NLOGSPACE.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsComputability, Logic, AI Algorithms · semigroups and automata theory · Cellular Automata and Applications
The Complexity of Tiling Problems
François Schwarzentruber
Univ Rennes, CNRS, IRISA, France
Abstract
In this document, we collected the most important complexity results of tilings. We also propose a definition of a so-called deterministic set of tile types, in order to capture deterministic classes without the notion of games. We also pinpoint tiling problems complete for respectively LOGSPACE and NLOGSPACE.
1 Introduction
As advocated by van der Boas [15], tilings are convenient to prove lower complexity bounds. In this document, we show that tilings of finite rectangles with Wang tiles [16] enable to capture many standard complexity classes:
FO (the class of decision problems defined by a first-order formula, see [9]), LOGSPACE , NLOGSPACE , P , NP , Pspace , Exptime , NExptime , -Exptime and -Expspace , for .
This document brings together many results of the literature. We recall some results from [15]. The setting is close to Tetravex [13], but the difference is that we allow a tile to be used several times. That is why we will the terminology tile types. We also recall the results by Chlebus [6] on tiling games, but we simplify the framework since we suppose that players alternate at each row (and not at each time they put a tile).
The first contribution consists in capturing deterministic time classes with an existence of a tiling, and without any game notions. We identify a syntactic class of set of tiles, called deterministic set of tiles. For this, we have slightly adapted the definition of the encoding of executions of Turing machines given in [15].
The second contribution is the connection between one-dimensional tilings and the classes LOGSPACE and NLOGSPACE . In particular, we rely on the fact that the reachability problem in directed graphs is NLOGSPACE -complete [10], and the reachability problem in undirected graphs is in LOGSPACE [12]. There are small differences compared to the literature. Note that Grädel (see [8], p. 800 before Th. 7.1) also introduced one-dimensional tilings, more precisely domino games. According to Grädel [8] (Remark p. 802), they were also introduced by J. Toràn in his PhD thesis. Note that we generalize some result of Etzion-Petruschka et al. who also considered one-dimensional tilings (see Th. 2.7 in [7]).
*Outline. * First we recall basic definitions about tilings in Section 2. Then, we recall results about existence of tilings and classes above P in 3. We then continue with tiling games in Section 4. We then show how to get rid off games in order to capture deterministic classes in Section 5. We finish with existence of tilings and classes below P in Section 6.
2 Basic Definitions
A tile type specifies the four colors of a tile in the left, up, right, down directions.
Formally, let be a countable set of colors; a special color being white. A tile type is an element of , written .
Let be a finite set of tile types. A -tiling of the finite rectangle is a function such that:
for all ; 2. 2.
for all ; 3. 3.
for all , ; 4. 4.
for all , .
Constraint 1 means that the left of the left-most tiles and the right of the right-most tiles should be white111As you will see, this constraint is important to identify the beginning of the tape of a Turing machine and to avoid the head to disappear when its head is the left-most cell by triggering a transition moving the head to the left. This constraint will also help to deterministic set of tiles.. Constraint 2 says that the top of the top-most tiles and the bottom of the bottom-most tiles should be white222This constraint will also help to deterministic set of tiles.. Constraint 3 corresponds to the horizontal constraint and constraint 4 to the vertical constraint.
Let and . We aim to tile the finite rectangle, as shown in Figure 1. The top-left tile plays the role of a seed and is given.
Definition 1
Let and . is the following decision problem:
- •
input: an integer given in unary, a finite set of tiling types, a tile ;
- •
output: yes, if there is a -tiling of the rectangle such that ; no, otherwise.
We write directly the expression instead of the function . For instance, we write instead of . Same for . We also consider the variant in which the height is arbitrary.
Definition 2
Let . is the following decision problem:
- •
input: an integer given in unary, a finite set of tiling types, a tile ;
- •
output: yes, if there are an integer and a -tiling of the rectangle such that ; no, otherwise.
3 Existence of Tilings and Classes above P
3.1 Encoding Executions of Turing Machines
In this section, we explain how to encode an execution of a Turing machine as a tiling. We slightly adapt the normalization of Turing machines given in [15], especially for being able to capture deterministic tilings (see Section 5). As advocated in [15], normalization does not impact on the complexity classes. Without loss of generality, we suppose that the machine is normalized.
Definition 3
A Turing machine is normalized if its set of states is partitioned in two disjoint subsets and (see Figure 2)such that:
the initial state is in ; 2. 2.
transitions going out from go in and makes the cursor move right or makes the cursor stay at its current position; 3. 3.
transitions going out from go in and makes the cursor move left or makes the cursor stay at its current position; 4. 4.
the final (accepting) state is in ; 5. 5.
if the machine reaches the final accepting state , then the tape has already been erased (all cells contain the blank symbol ␣). 6. 6.
the final (accepting) state is in and has a copy in in , there are transitions between them, that do not move the cursor, do not change the tape.
We encode an execution almost as in [15]. Let us consider a Turing machine and an input word . Figure 3 shows the set of tiles . These tiles enable to represent any execution of length of on input , that uses at most cells, with a tiling of the -rectangle. The idea is that we always alternate between and . Being in a state in (resp. in ) is tagged at any tile in a row with the absence (pres. presence) of the symbol ’ (prime)333This difference will help to define deterministic set of tiles, see Section 5. States in are noted etc. States in are noted , etc. The color is copy of the symbol , it is used to keep track on the full row whether the current state is in or . Figure 4 shows an example of such an encoding of an execution of a machine on the input word .
The machine being normalized prevents to have two adjacent tiles that would create two cursor positions
a^{\prime}$$q$$q,a$$q$$b$$q,b
because we would have allowed to enter a state both with a transition moving the cursor to the left and with another transition moving the cursor to the right.
When the machines reaches it runs forever, and the tiling finishes with a line of white at the bottom. If not, either it runs forever or it gets stuck; there is no line of white at the bottom in the tiling corresponding to the execution. We could have simply assumed that we loop in but the notion of deterministic set of tile types would have been more difficult to define (see Section 5).
3.2 Existence of Tilings in Squares
First we tackle . Some readers may be surprised by the relevance of that problem, in which is given in unary. That assumption is quite natural: any tiling requires memory cells to be stored; memory cells you need to allocate anyway to store that tiling. This is close to the assumption made in bounded planning (called polynomial-length planning problem), for which the bound is also written in unary (see [14]).
Theorem 1
* is NP -complete.*
Proof.
A non-deterministic algorithm deciding in polynomial-time consists in guessing a function and checking that is indeed a tiling of the -rectangle, and that .
Let be a problem in NP. There exists a non-deterministic Turing machine that decides in polynomial-time. W.l.o.g. we suppose that the machine is normalized (see Definition 3, and that there is a polynomial such that any execution on an input of size , either stops in strictly less than steps, or reaches in strictly less than steps and keeps running forever.
reduces to in polynomial-time, even in log-space: the reduction is where , and are shown in Figure 3.
We have iff . If , then there is an accepting execution. Thus, we can tile the -rectangle using that execution as shown in Figure 4. If there is a tiling of the -rectangle, then the seed enforces the first row to contain the input word. The other tiles enforce the tiling to represent an execution. As the bottoms of the bottom-most tiles are white, it means that the execution reaches . So the execution is accepting and .
Note that we could define the variant of in which no seed is given in the input. The problem is to tile the -rectangle without the seed constraint. This problem is called to be the seed-free variant.
Theorem 2
The seed-free variant is NP -complete.
Proof.
For the NP -hardness of the seed-free variant, it suffices to add ”numbers” in colors in order to count.
In Theorem 1, the size of the square is . If the size becomes exponential in , double-exponential in , etc., we capture the class NExptime, , etc. That is why we define inductively on :
- •
;
- •
for all .
In other words, is
[TABLE]
Theorem 3
* is kNExptime -complete.*
3.3 Existence of Tilings in Rectangles of Arbitrary Height
Theorem 4
* and are Pspace -complete.*
Proof.
A non-deterministic algorithm deciding that runs in polynomial-space consists in guessing the tiling on row by row. We store the previous row, the current row and the -bit index of the current row. For , we just do not care about the index of the current row.
Let be a problem in Pspace. There exists a machine that decides . W.l.o.g. we suppose that the machine is normalized (see Definition 3, and that there is a polynomial such that any execution on an input of size uses at most cells and that, either stops in strictly less than steps, or reaches in strictly less than steps and keeps running forever.
The reduction is the same than in the proof of Theorem 1.
In the same way, we obtain:
Theorem 5
Let . and are kExpspace -complete.
4 Two-player Games
In order to capture alternating classes [4], we introduce two players: and . Each row is owned by some player. Each move consists in adding a row below the current one, by choosing tiles among a given finite set of tile types , so the colors match. Figure 5 shows a finished tiling game: player chose the first row, then player chose the second row and player chose the third row.
4.1 Definition
The ownership of rows is described by an abstract sequence . For instance, if is , it means that all rows belong to player . If is , it means that the first, third… rows belong to player while the second, fourth… rows belong to player . We will not develop a full theory of abstract sequences, since we will only use simple patterns. Player wins if the rectangle is fully tiled.
Definition 4
Given and , and an abstract sequence , we define to be the following decision problem:
- •
input: an integer given in unary, a finite set of tiling types, a tile ;
- •
Yes, if there is a winning strategy for player to the game described below, in the rectangle, using as a seed, and respecting the abstract sequence of players; no otherwise.
Remark that is .
4.2 Complexity Results
Proofs are fastidious but, if players alternate, we capture alternating classes [4], and thus deterministic classes via Aptime = Pspace and AEXPTIME = Expspace .
Theorem 6
* is Pspace -complete.*
Theorem 7
* is Expspace -complete.*
In the same way, as and \mbox{\sck-AExpspace}=\mbox{\sck-Exptime}.
Theorem 8
* and are Exptime -complete.*
Theorem 9
Let . and are Exptime -complete.
The polynomial hierarchy is captured as follows.
Theorem 10
Let .
- •
* is -complete;*
- •
* is -complete.*
Interestingly, we can capture the exotic class ApolEXPTIME(see [3] for instance), the class of problems decided by an alternating Turing machine in exponential time but with a polynomial number of alternations. Our reformulation is very closed from the problem called multi-tiling problem introduced in [2] that consists in tiling several -squares. That tiling problem is used in [1].
Theorem 11
* is ApolEXPTIME-complete.*
Proof.
Let be a problem in ApolEXPTIME. There is a alternating Turing machine deciding in exponential time, with at most a polynomial number of alternation. As mentioned in [5], we can suppose that player plays first, that each portion of the execution played by the player and each portion of the execution played by the player are of the same length where is a polynomial and is the input word. We suppose that there are such portions. W.l.o.g, we suppose that . We furthermore suppose that the machine is normalized.
The reduction is where are given in Figure 4 and .
5 Deterministic Tilings
In order to capture deterministic classes without games (no alternation between player and ), we introduce the notion of a deterministic set of tiles.
5.1 Deterministic Set of Tiles
The idea is that a set of tiles is said to be deterministic if there is at most one tile to complete a tiling, as shown in Figure 6 – the direction depends on the top color. More precisely:
Definition 5
A set of tiles is deterministic if there is a partition such that and:
- •
for all tiles , iff ;
- •
for all colors , for all colors , there is at most one element such that and ;
- •
for all colors , for all color , there is at most one element such that and .
In other words, when the set of tiles is deterministic, it means that we can deterministically complete a tiling – if it exists – in the Boustrophedon order, as shown in Figure 7. Note that the fact that is deterministic can be tested in log-space in the size of . We define the restriction of to inputs in which is deterministic.
5.2 Complexity Results
Theorem 12
* is P -complete.*
Proof.
We design a deterministic algorithm that decides in polynomial-time as follows: it tries to construct the tiling of the -rectangle without backtrack, in the Boustrophedon order, since is deterministic.
Let be a problem in P. Let be a Turing machine that decides in polynomial-time. The reduction is as in the proof of Theorem 1, since is deterministic.
Theorem 13
* and is Pspace -complete.*
Theorem 14
* is Exptime -complete.*
Theorem 15
Let . and is -Expspace-complete.
6 Existence of Tilings for Classes below P
6.1 FO
FO is the class of decision problems such that the set of positive instances is described by a logical formula of first-order logic (see the book on descriptive complexity by Immerman, [9]).
Theorem 16
Let be two constants. is in FO.
Proof.
For instance, corresponds to the first-order formula
[TABLE]
where predicates and encode respectively the horizontal and vertical constraints.
6.2 NLOGSPACE
In this section, the width of rectangles is 1, so left- and right- colors are irrelevant.
Theorem 17
* and are NLOGSPACE -complete.*
Proof.
The following non-deterministic algorithm decides in log-space.
**procedure **algo()
Let
for := 1 to **do
**
choose such that t$$t^{\prime}
accept
We reduce in log-space the reachability problem (-connectivity problem) to as follows. Let be an instance of the -connectivity problem. We construct in log-space the following instance of :
- •
is 2 + the number of nodes in ;
- •
contains exactly the tiles
,
s$$s
,
,
u$$v
whenever there is an edge in ;
- •
the seed is
.
There is a path from to in iff we can tile the -rectangle.
In the same way (it refines Th. 2.7 in [7]):
Theorem 18
For all constants (not part of the input), the variant of without seed is NLOGSPACE -complete.
6.3 Rotating tiles and LOGSPACE
In order to capture LOGSPACE , we introduce tile types that can be rotated by 180 degrees. We define the restriction of to inputs in which is such that:
- •
if then .
Theorem 19
* and are LOGSPACE -complete, w.r.t. FO -reductions444Note that LOGSPACE is a too small class for log-space reductions to be meaningful..*
Proof.
We reduce in log-space to the reachability problem in undirected graphs, which is in LOGSPACE [12]:
- •
the nodes of the undirected graph are a source, copies of , a target;
- •
We add edges from the source to all tiles in the first copy of if its top is white; we add edges between of the copy of and of the copy of whenever t$$t^{\prime} ; we add edges between any tile in the copy of whose bottom is white and the target.
The reduction given in the proof of Theorem 17 is also a reduction from the reachability problem in undirected graphs to . This reduction is a FO -reduction (you can define the set of tiles via first-order formulas).
7 Conclusion
Table 1 sums up the main complexity results for tiling. There are many research avenues, to name a few:
- •
how to define tiling problems with imperfect information in the spirit of [11]?
- •
how to define parameterized tiling problems in the spirit of parameterized complexity?
- •
how to get rid off the seed in some of tiling problems and/or border constraints?
- •
what are the connections between tilings and other classes such as AC (alternating circuits), NC (Nick’s class), the Boolean hierarchy?
- •
is FO -complete in some sense?
- •
could we have a more natural definition of deterministic tilings?
Acknowledgments.
I would like to thank Sophie Pinchinat for pointing out the class ApolEXPTIME. Thanks to Stephane Demri for the discussions about the class ApolEXPTIME. Thanks to Sasha Rubin and Tristan Charrier for having given me the motivation to write this note. Especially thanks to Sasha Rubin for his comments on a previous version of that document. Thanks to Florian Beau for the discussion about Tetravex.
The reference list from the paper itself. Each links out to its DOI / PubMed record.
- 1[1] Bartosz Bednarczyk and Stéphane Demri. Why propositional quantification makes modallogics on trees robustly hard. In LICS 2019 .
- 2[2] Laura Bozzelli, Alberto Molinari, Angelo Montanari, and Adriano Peron. On the complexity of model checking for syntactically maximal fragments of the interval temporal logic HS with regular expressions. In Proceedings Eighth International Symposium on Games, Automata, Logics and Formal Verification, Gand ALF 2017, Roma, Italy, 20-22 September 2017. , pages 31–45, 2017.
- 3[3] Laura Bozzelli, Hans van Ditmarsch, and Sophie Pinchinat. The complexity of one-agent refinement modal logic. In Logics in Artificial Intelligence - 13th European Conference, JELIA 2012, Toulouse, France, September 26-28, 2012. Proceedings , pages 120–133, 2012.
- 4[4] A.K. Chandra and L.J. Stockmeyer. Alternation. In 17th annual symposium on Foundations of Computer Science , pages 98–108. IEEE, 1976.
- 5[5] Tristan Charrier and François Schwarzentruber. Arbitrary public announcement logic with mental programs. In Proceedings of the 2015 International Conference on Autonomous Agents and Multiagent Systems, AAMAS 2015, Istanbul, Turkey, May 4-8, 2015 , pages 1471–1479, 2015.
- 6[6] Bogdan S. Chlebus. Domino-tiling games. J. Comput. Syst. Sci. , 32(3):374–392, 1986.
- 7[7] Yael Etzion-Petruschka, David Harel, and Dale Myers. On the solvability of domino snake problems. Theor. Comput. Sci. , 131(2):243–269, 1994.
- 8[8] Erich Grädel. Domino games and complexity. SIAM J. Comput. , 19(5):787–804, 1990.
