Tiling Problems. This document supersedes the earlier notes posted about the tiling problem. 1 An Undecidable Problem about Tilings of the Plane

Similar documents
CSCI3390-Lecture 8: Undecidability of a special case of the tiling problem

Computability. What can be computed?

2359 (i.e. 11:59:00 pm) on 4/16/18 via Blackboard

CITS2211 Discrete Structures Turing Machines

of the hypothesis, but it would not lead to a proof. P 1

Lecture 20 November 13, 2014

Turing Machines (TM)

The Tiling Problem. Nikhil Gopalkrishnan. December 08, 2008

Undecidability and Nonperiodicity for Tilings of the Plane

Oracle Turing Machine. Kaixiang Wang

CSCI 1590 Intro to Computational Complexity

arxiv: v1 [cs.cc] 21 Jun 2017

Graphs of Tilings. Patrick Callahan, University of California Office of the President, Oakland, CA

Scrabble is PSPACE-Complete

EXPLAINING THE SHAPE OF RSK

Technical framework of Operating System using Turing Machines

Fast Sorting and Pattern-Avoiding Permutations

Static Mastermind. Wayne Goddard Department of Computer Science University of Natal, Durban. Abstract

Game Theory and Randomized Algorithms

Tile Complexity of Assembly of Length N Arrays and N x N Squares. by John Reif and Harish Chandran

Notes for Recitation 3

Lecture 2. 1 Nondeterministic Communication Complexity

UNDECIDABILITY AND APERIODICITY OF TILINGS OF THE PLANE

Spring 06 Assignment 2: Constraint Satisfaction Problems

The number of mates of latin squares of sizes 7 and 8

2048 IS (PSPACE) HARD, BUT SOMETIMES EASY

Tiling the Plane with a Fixed Number of Polyominoes

CDT314 FABER Formal Languages, Automata and Models of Computation MARK BURGIN INDUCTIVE TURING MACHINES

Tile Number and Space-Efficient Knot Mosaics

Once you get a solution draw it below, showing which three pennies you moved and where you moved them to. My Solution:

Spring 06 Assignment 2: Constraint Satisfaction Problems

DHANALAKSHMI COLLEGE OF ENGINEERING, CHENNAI

Lecture 18 - Counting

PUZZLES ON GRAPHS: THE TOWERS OF HANOI, THE SPIN-OUT PUZZLE, AND THE COMBINATION PUZZLE

CSE 573 Problem Set 1. Answers on 10/17/08

Deterministic Symmetric Rendezvous with Tokens in a Synchronous Torus

An Intuitive Approach to Groups

arxiv: v1 [cs.cc] 2 Dec 2014

STRATEGY AND COMPLEXITY OF THE GAME OF SQUARES

Activity Sheet #1 Presentation #617, Annin/Aguayo,

Game Theory and Algorithms Lecture 19: Nim & Impartial Combinatorial Games

arxiv: v1 [math.gt] 21 Mar 2018

Optimal Results in Staged Self-Assembly of Wang Tiles

How hard are computer games? Graham Cormode, DIMACS

Formulas for Primes. Eric Rowland Hofstra University. Eric Rowland Formulas for Primes / 27

Introduction to Algorithms / Algorithms I Lecturer: Michael Dinitz Topic: Algorithms and Game Theory Date: 12/4/14

arxiv: v2 [math.gt] 21 Mar 2018

Senior Math Circles February 10, 2010 Game Theory II

A Real-Time Algorithm for the (n 2 1)-Puzzle


CSCI 2570 Introduction to Nanocomputing

Automata and Formal Languages - CM0081 Turing Machines

What is counting? (how many ways of doing things) how many possible ways to choose 4 people from 10?

Lecture 7: The Principle of Deferred Decisions

Hanabi is NP-complete, Even for Cheaters who Look at Their Cards,,

Week 1. 1 What Is Combinatorics?

Computational aspects of two-player zero-sum games Course notes for Computational Game Theory Section 3 Fall 2010

Primitive Roots. Chapter Orders and Primitive Roots

Chapter 3 PRINCIPLE OF INCLUSION AND EXCLUSION

Sets. Gazihan Alankuş (Based on original slides by Brahim Hnich et al.) August 6, Outline Sets Equality Subset Empty Set Cardinality Power Set

Permutation Tableaux and the Dashed Permutation Pattern 32 1

DVA325 Formal Languages, Automata and Models of Computation (FABER)

Extending the Sierpinski Property to all Cases in the Cups and Stones Counting Problem by Numbering the Stones

Tetsuo JAIST EikD Erik D. Martin L. MIT

COMP Online Algorithms. Paging and k-server Problem. Shahin Kamali. Lecture 11 - Oct. 11, 2018 University of Manitoba

Narrow misère Dots-and-Boxes

An interesting class of problems of a computational nature ask for the standard residue of a power of a number, e.g.,

/633 Introduction to Algorithms Lecturer: Michael Dinitz Topic: Algorithmic Game Theory Date: 12/6/18

Yale University Department of Computer Science

Universiteit Leiden Opleiding Informatica

Stupid Columnsort Tricks Dartmouth College Department of Computer Science, Technical Report TR

Tilings with T and Skew Tetrominoes

An Enhanced Fast Multi-Radio Rendezvous Algorithm in Heterogeneous Cognitive Radio Networks

Pattern Avoidance in Unimodal and V-unimodal Permutations

Halting Problem. Implement HALT? Today. Halt does not exist. Halt and Turing. Another view of proof: diagonalization. P - program I - input.

Greedy Flipping of Pancakes and Burnt Pancakes

Implementation of Recursively Enumerable Languages in Universal Turing Machine

Solving the Rubik s Cube Optimally is NP-complete

An Aperiodic Tiling from a Dynamical System: An Exposition of An Example of Culik and Kari. S. Eigen J. Navarro V. Prasad

Counting and Probability Math 2320

Even 1 n Edge-Matching and Jigsaw Puzzles are Really Hard

arxiv: v2 [cs.cc] 20 Nov 2018

MITOCW 23. Computational Complexity

Constructing Simple Nonograms of Varying Difficulty

arxiv: v3 [cs.ds] 9 Jun 2011

3 Game Theory II: Sequential-Move and Repeated Games

Conway s Soldiers. Jasper Taylor

Facilitator Guide. Unit 2

Counting. Chapter 6. With Question/Answer Animations

Evacuation and a Geometric Construction for Fibonacci Tableaux

arxiv: v1 [math.co] 8 Oct 2012

COUNTING AND PROBABILITY

TROMPING GAMES: TILING WITH TROMINOES. Saúl A. Blanco 1 Department of Mathematics, Cornell University, Ithaca, NY 14853, USA

Advanced Automata Theory 4 Games

Combinatorics. Chapter Permutations. Counting Problems

Symmetric Permutations Avoiding Two Patterns

Permutation Groups. Every permutation can be written as a product of disjoint cycles. This factorization is unique up to the order of the factors.

Binary Continued! November 27, 2013

2004 Denison Spring Programming Contest 1

Permutation Groups. Definition and Notation

Transcription:

Tiling Problems This document supersedes the earlier notes posted about the tiling problem. 1 An Undecidable Problem about Tilings of the Plane The undecidable problems we saw at the start of our unit on undecidability were all questions about the behavior of computer programs. But in fact there are many decision problems which, on the surface, have nothing to do with computer programs yet can still be proved to have no algorithmic solution. One of these is a tiling problem. Imagine square tiles divided into colored triangular quadrants. The problem is to determine whether we can cover a quandrant of the infinite plane with these tiles in such a manner that the colors on adjacent tiles match up. Even if we have just one type of tile, but are allowed to rotate it it 180 degrees, then we can cover the entire plane. 1

Let us make a rule that we are not allowed to turn tiles in this fashion. In that case, our single tile does not suffice to cover the plane, but the set of two tiles 2

does. If we wanted to, we could enforce this restriction on turning by designing the tiles with little slits and notches so that the would only fit together in one orientation. Here is our general statement of the tiling problem: An instance of the problem is a finite set T of tile types, together with a specification of a distinguished corner tile c T. Each tile is a sequence t = (n, e, s, w) of four symbols, which serve to identify the colors at the top, right, bottom and left edges of the tile. A tiling is a function f : N N T that tells which tile is associated to each square on the infinite quarter-plane. The requirement of consistency of colors can be written as a pair of conditions f(i, j) 1 = f(i, j + 1) 3, f(i, j) = f(i, j + 1) 4 for all i, j 0. (In other words, the first (= top) color of the tile in position (i, j) is the same as the third(= bottom) color of the tile in position (i, j + 1), etc.) The requirement that the corner tile be placed in the corner is expressed formally as f(0, 0) = c A problem instance < T, c > can thus be encoded as a finite string of symbols, representing the set of tiles along with the special corner tile. We will prove: Theorem 1 The language is undecidable. {< T, c >: there is a tiling f : N N T with f(0, 0) = c} We have formulated this decision problem as a language. Informally what this says is that there is no computer program that takes as input a specification of the set T of tile types and the corner tile, and answers correctly whether the infinite quarter-plane can be tiled. As usual, the proof of undecidability will be done by a reduction from a problem we already know to be undecidable. Strange as it seems, we can reduce a version of the halting problem for Turing machines to this tiling question, and the proof is pretty easy. 3

Let M be a Turing machine with initial sate q 0. We ll denote the blank symbol by B. We ll describe a finite set T of tiles associated with M. The colors on these tiles will be drawn from the set {+,, } Γ Γ 0 Q Γ Q Γ 0 Q L, R, where Q is the state set and G is the tape alphabet. Our set includes the tile: For every tape symbol g Γ, our set includes the two tiles The left-hand tile should be considered a variant of the one on the right; tiles with a 0 component in the top and bottom colors and two stars as the left color are meant to tile the left-hand wall of the quadrant. For each right-moving transition (p, a) (q, b, R) (in state p, reading symbol a, change a to b, change to state q and move right), and for each tape symbol c, our set includes the three tiles 4

For each left-moving transition (p, a) (q, b, L) and each tape symbol c, our set includes the three tiles 5

Finally, our corner tile is 6

The first important thing to observe is that given the specification of a Turing machine, we can produce the finite set of tiles associated with it: That is, there is an algorithm that takes input < M > and produces the assoicated < T, c >. We have just described this algorithm. Now let us see what it takes to tile a quadrant of the plane with this set of tiles. The placement of the corner tile is forced, and once that is done we have no choice about how to tile the first row: To continue the tiling, there is at most only one possible tile we can put at the start of the second row, and this necessitates a transition of the form (q 0, B) (p, a, R). This in turn forces the tiling for the remainder of the second row: Notice that the labels of the top edges of the first row spell out the initial configuration of the machine when started on a blank tape (you need to ignore the 0 in the leftmost column). The top edges of the second 7

row spell out the configuration that follows from this one. The only way to continue the tiling into a third row, is to match the color (p, B) in the second column, and the only way to do this is to have a transition (p, B) (p, c, R) or (p, B) (p, c, L). This will force the tiling of the entire third row, and the labels at the tops of these tiles will again spell out the subsequent configuration. Thus we can tile the complete infinite quadrant if and only if M runs forever when started on a blank tape. So if we had an algorithm for deciding the tiling problem, we would have one for deciding if a Turing machine halts or runs forever when started on a blank tape. To see that this latter problem (a simple variant of the halting problem) is undecidable, we will reduce our original version of the halting problem to it. Suppose we had an algorithm to decide whether a given machine halts when started on a blank tape. We could then determine for arbitrary M and w whether M ever halts when started on w. Given M, w, construct a Turing machine M which when started on a blank tape, writes the string w and then simulates M. Then M halts on a blank tape if and only if M halts on w. The theorem we have just proved illustrates the utility of the Turing machine model of computation. Because it is so simple, and because the syntactic restrictions are so few, it is relatively easy to simulate the behavior of Turing machines in a variety of combinatorial problems. 2 An NP-Complete Problem about Tilings of the Plane An instance of the bounded tiling problem is a finite set T of tile types, as above, and a sequence (t 1,..., t s ) where each t i T, and where the left edge of t i+1 has the same color as the right edge of t i (so that this sequence is the start of a consistent tiling of the first row). If there are k different tiles then there are no more than 4k different colors, so each color can be encoded in O(log k) symbols. Thus the set T can be encoded by O(k log k) symbols, and the sequence by O(s log k) symbols. So the length of the input is N = O((s + k) log k). An input is accepted if there is a tiling of the s s square {0,..., s 1} {0,..., s 1} with the given tiles such that the first row of the tiling is the one given in the problem instance. Note that this problem is decidable by the brute force algorithm of trying out every possible tiling of the remaining s 2 s cells with tiles from T, and checking whether the tiling is consistent. Let us first see that this problem is in NP: A prospective tiling is given by guessing a sequence of s 2 tiles. The sequence is encoded by a string of length O((s log k) 2 ) = O(N 2 ), so the time required to produce the guess is bounded above by a polynomial in the size of the input. To verify that the guess is a correct tiling, we have to examine each edge of 8

the s2 tiles, so roughly 2s 2 pairs of edges must be inspected, which is still polynomial in the original input size. Note that if we had not given the first row and just encoded s in binary, then the size of the guessed tiling could have been exponential in the size of the input. This is the reason for insisting that the whole first row be given to ensure that the size of a tiling be polynomial in the size of the input. Now let us suppose this tiling problem is actually in P. We want to show that every problem in NP must then be in P. Let L be in NP. Then L is recognized by a nondeterministic Turing machine M such that for some c, r > 0, every computation of M on an input of length n terminates (in acceptance or rejection) after no more than cn r steps. Let us tweak M a little bit to make a new machine N: N behaves exactly like M, except whereveve M has a transition into the accept state: (q, a) q accept, N instead runs forever. That is, we add a new state called q forever and replace each transition of the above form by the transitions (q, a) (q forever, a, R) (q forever, b) (q forever, a, R), for all tape symbols b. Note the critical property of N: For every input string w, every computation of M on w ends after at most c w r steps, and M accepts w if and only if some computation of M on w ends in the accept state. Thus M accepts w if and only if some computation of N on w lasts for at least c w r + 1 steps. So, given M and w, we construct N as just described. We use the transition function of N to construct a set of tile types T as described in the preceding section (note that nothing in that construction requires the Turing machine to be deterministic). Let w = a 1 a n. We add a different corner tile with at left, + at bottom, (q 0, a 1, 0) at top, and B at right, and n 1 additional tiles with + at bottom, B at left and right, and a 2,..., a n at top. Set s = c w r + 1 and specify the first row of the tiling: The first n tiles in the row are the corner tile just specified, followed by the n 1 tiles with labels a 2,..., a n at the top; the remaining s n tiles in the first row are the ones with B at top, right, and bottom. Note that it takes time polynomial in the length of w to extract this description of the set of tile types and the first row. Once again, tiling of the subsequent rows is possible if and only if there is a computation of N whose successive configurations match the top colors in each row. In particular, tiling the first s = c w r + 1 rows is possible if and only if M accepts w. Thus if we had an algorithm for deciding the bounded tiling problem in polynomial time, then for every language L in NP, we would have a polynomial-time algorithm to decide whether w is in L, and thus P would be equal to NP. We say that the bounded 9

tiling problem is NP-complete. This means that, first, it is in NP, and second, that every probably in NP can be reduced to it in polynomial time. Proving that a problem is NPcomplete is often taken as evidence that there is no efficient algorithm for solving it, since the existence of such an algorithm would imply the result (considered unlikely) that every problem in NP has an efficient decision algorithm. 10