{"paper_meta":{"paper_id":"arxiv:0711.1827","title":"0711.1827","authors":[],"year":null,"published":null,"updated":null,"venue_or_source":"arxiv-papers-shard","primary_category":"cs","secondary_categories":[],"doi":null,"license":"unknown","source_type":"pdf+shard","source_url":null,"pdf_url":null},"abstract":{"raw":"","cleaned":"","offsets":[]},"full_paper_text":{"raw_ordered_text":"arXiv:0711.1827v3 [cs.CC] 9 Jun 2008\nThe Three-Color and Two-Color TantrixTM Rotation Puzzle\nProblems are NP-Complete via Parsimonious Reductions∗\nDorothea Baumeister\nand\nJ ̈org Rothe\nInstitut f ̈ur Informatik\nHeinrich-Heine-Universit ̈at D ̈usseldorf\n40225 D ̈usseldorf, Germany\nJune 9, 2008\nAbstract\nHolzer and Holzer [HH04] proved that the TantrixTM rotation puzzle problem with\nfour colors is NP-complete, and they showed that the infinite variant of this problem\nis undecidable. In this paper, we study the three-color and two-color TantrixTM rota-\ntion puzzle problems (3-TRP and 2-TRP) and their variants. Restricting the number\nof allowed colors to three (respectively, to two) reduces the set of available TantrixTM\ntiles from 56 to 14 (respectively, to 8).\nWe prove that 3-TRP and 2-TRP are NP-\ncomplete, which answers a question raised by Holzer and Holzer [HH04] in the affirma-\ntive. Since our reductions are parsimonious, it follows that the problems Unique-3-TRP\nand Unique-2-TRP are DP-complete under randomized reductions. We also show that\nthe another-solution problems associated with 4-TRP, 3-TRP, and 2-TRP are NP-\ncomplete. Finally, we prove that the infinite variants of 3-TRP and 2-TRP are unde-\ncidable.\n1\nIntroduction\nThe puzzle game TantrixTM, invented by Mike McManaway in 1991, is a domino-like strat-\negy game played with hexagonal tiles in the plane. Each tile contains three colored lines\nin different patterns (see Figure 1). We are here interested in the variant of the TantrixTM\nrotation puzzle game whose aim it is to match the line colors of the joint edges for each pair\nof adjacent tiles, just by rotating the tiles around their axes while their locations remain\nfixed. This paper continues the complexity-theoretic study of such problems that was initi-\nated by Holzer and Holzer [HH04]. Other results on the complexity of domino-like strategy\ngames can be found, e.g., in Gr ̈adel’s work [Gr ̈a90]. Ueda and Nagao [UN96] and Yato and\nSeta [YS02] provided a framework for studying the problem of finding another solution of\nany given NP problem when some solutions to this NP problem are already known—an ap-\nproach particularly appropriate for puzzle games. TantrixTM puzzles have also been studied\nwith regard to “evolutionary computation,” see Downing [Dow05].\n∗Supported in part by DFG grants RO 1202/9-3 and RO 1202/11-1, the European Science Foundation’s\nEUROCORES program LogICCC, and the Alexander von Humboldt Foundation’s TransCoop program.\nURL: http://ccc.cs.uni-duesseldorf.de/∼rothe (J. Rothe).\n1\n\nHolzer and Holzer [HH04] defined two decision problems associated with four-color\nTantrixTM rotation puzzles. The first problem’s instances are restricted to a finite num-\nber of tiles, and the second problem’s instances are allowed to have infinitely many tiles.\nThey proved that the finite variant of this problem is NP-complete and that the infinite\nproblem variant is undecidable. The constructions in [HH04] use tiles with four colors, just\nas the original TantrixTM tile set. Holzer and Holzer posed the question of whether the\nTantrixTM rotation puzzle problem remains NP-complete if restricted to only three colors,\nor if restricted to otherwise reduced tile sets. In this paper, we answer this question in the\naffirmative for the three-color and the two-color version of this problem.\nFor each k, 1 ≤k ≤4, Table 1 summarizes the previously known and our new results\nfor k-TRP, the k-color TantrixTM rotation puzzle problem, and its variants. (All problems\nare formally defined in Section 2.)\nk\nk-TRP is\nParsimonious?\nUnique-k-TRP is\nAS-k-TRP is\nInf-k-TRP is\n1\nin P\nin P\nin P\ndecidable\n(trivial)\n(trivial)\n(trivial)\n(trivial)\n2\nNP-complete\nyes\nDP-≤p\nran-complete NP-complete\nundecidable\n(see Cor. 3.6) (see Thm. 3.5) (see Cor. 3.7)\n(see Cor. 3.8) (see Thm. 3.9)\n3\nNP-complete\nyes\nDP-≤p\nran-complete NP-complete\nundecidable\n(see Cor. 3.3) (see Thm. 3.2) (see Cor. 3.7)\n(see Cor. 3.8) (see Thm. 3.9)\n4\nNP-complete\nyes\nDP-≤p\nran-complete NP-complete\nundecidable\n(see [HH04])\n(see [BR07])\n(see [BR07])\n(see Cor. 3.8) (see [HH04])\nTable 1: Overview of complexity and decidability results for k-TRP and its variants\nSince the four-color TantrixTM tile set contains the three-color TantrixTM tile set, our\nnew complexity results for 3-TRP imply the previous results for 4-TRP (both its NP-\ncompleteness [HH04] and that satisfiability parsimoniously reduces to 4-TRP [BR07]). In\ncontrast, the three-color TantrixTM tile set does not contain the two-color TantrixTM tile\nset (see Figure 2 in Section 2). Thus, 3-TRP does not straightforwardly inherit its hardness\nresults from those of 2-TRP, which is why both reductions, the one to 3-TRP and the one\nto 2-TRP, have to be presented. Note that they each substantially differ—both regarding\nthe subpuzzles constructed and regarding the arguments showing that the constructions\nare correct—from the previously known reductions presented in [HH04, BR07], and we will\nexplicitly illustrate the differences between our new and the original subpuzzles.\nOur reductions will be from a boolean circuit problem, and we construct a TantrixTM\nrotation puzzle that simulates the computation of such a circuit, where suitable subpuzzles\nare used to simulate the wires and gates of the circuit. In particular, the previous reductions\npresented in [HH04, BR07, BR] use McColl’s planar “cross-over” circuit with AND and\nNOT gates to simulate wire crossings [McC81] and they employ Goldschlager’s log-space\ntransformation from general to planar circuits [Gol77].\nWe take the same approach in\nour construction for 2-TRP. In contrast, we simulate wire crossings in the circuit in the\nconstruction for 3-TRP directly by a new subpuzzle called CROSS, which we will introduce\nin Section 3.1 and which will make our reduction for 3-TRP significantly more efficient\ncompared with the reduction for 3-TRP presented in a previous version of this paper [BR].\nNote that using the CROSS results in a puzzle with a considerably smaller total number of\ntiles that are needed to simulate a given circuit.\n2\n\nSince we provide parsimonious reductions from the satisfiability problem to 3-TRP\nand to 2-TRP, our reductions preserve the uniqueness of the solution. Thus, the unique\nvariants of both 3-TRP and 2-TRP are DP-complete under polynomial-time randomized\nreductions, where DP is the class of differences of NP sets. In addition, we will show that\nour parsimonious reductions for 3-TRP and 2-TRP also provide “another-solution problem\nreductions” (i.e., ≤p\nasp-reductions, see Section 2.1), and so the “another-solution problems”\nassociated with 3-TRP and 2-TRP are also NP-complete.1 Moreover, since 4-TRP inherits\nthe hardness results for 3-TRP, the another-solution problem associated with 4-TRP is\nNP-complete as well. Finally, we will prove that the infinite variants of 3-TRP and 2-TRP\nare undecidable, via a circuit construction similar to the one Holzer and Holzer [HH04] used\nto show that the infinite 4-TRP problem is undecidable.\nWe mention in passing that the present paper differs from and extends its preliminary\nversion [BR] in various ways. First, the proof of Theorem 3.2, which was only sketched\nin [BR], is given here in full length, where we also display the original subpuzzles of Holzer\nand Holzer [HH04] to allow comparison and where we explicitly show the differences between\nthe subpuzzles used in the their original construction (that provides a reduction for 4-TRP\nthat is not parsimonious; see [BR07] for a parsimonious reduction for 4-TRP) and in our\nnew reduction showing 3-TRP NP-complete via a parsimonious reduction. Moreover, the\nproof of this result for 3-TRP presented here additionally differs from the one sketched\nin [BR], since the reduction given here uses the CROSS subpuzzle, which—as explained\nabove—makes the reduction significantly more efficient. Second, we here provide the proof\nof Theorem 3.5, which was completely omitted in [BR]. Third, Corollary 3.8 and the related\ndiscussion of the another-solution variants of k-TRP, k ∈{2, 3, 4}, are completely new to\nthe current version.\nThis paper is organized as follows. Section 2 provides the complexity-theoretic defi-\nnitions and notation used and defines the k-color TantrixTM rotation puzzle problem and\nits variants. Section 3.1 shows that the three-color TantrixTM rotation puzzle problem is\nNP-complete via a parsimonious reduction. To allow comparison, the original subpuzzles\nfrom Holzer and Holzer’s construction [HH04] are also presented in this section. Section 3.2\npresents our result that 2-TRP is NP-complete, again via a parsimonious reduction. Sec-\ntion 3.3 is concerned with the complexity of the unique and infinite variants of the three-\ncolor and the two-color TantrixTM rotation puzzle problem, and with the corresponding\nanother-solution problems.\n2\nDefinitions and Notation\n2.1\nComplexity-Theoretic Notions and Notation\nWe assume that the reader is familiar with the standard notions of complexity theory,\nsuch as the complexity classes P (deterministic polynomial time) and NP (nondeterministic\npolynomial time); see, e.g., the textbooks [Pap94, Rot05]. DP denotes the class of differences\n1Informally stated, an another-solution problem associated with an NP problem A asks, given an instance\nx ∈A and some solutions y1, y2, . . . , yn for “x ∈A” (i.e., the yi’s encode accepting computation paths of an\nNP machine solving A on input x), whether or not there exists another solution, y ̸∈{y1, y2, . . . , yn}, for\n“x ∈A.” See Ueda and Nagao [UN96] and Yato and Seta [YS02] for more details and results, and also for\na discussion of why these problems are particularly important for puzzle games.\n3\n\nof any two NP sets [PY84]. Note that DP is also known to be the second level of the boolean\nhierarchy over NP, see Cai et al. [CGH+88, CGH+89].\nLet Σ∗denote the set of strings over the alphabet Σ = {0, 1}.\nGiven any language\nL ⊆Σ∗, ∥L∥denotes the number of elements in L. We consider both decision problems\nand function problems. The former are formalized as languages whose elements are those\nstrings in Σ∗that encode the yes-instances of the problem at hand. Regarding the latter,\nwe focus on the counting problems related to sets in NP. The counting version #A of an\nNP set A maps each instance x of A to the number of solutions of x. That is, counting\nproblems are functions from Σ∗to N.\nAs an example, the counting version #SAT of\nSAT, the NP-complete satisfiability problem, asks how many satisfying assignments a given\nboolean formula has. Solutions of NP sets can be viewed as accepting paths of NP machines.\nValiant [Val79] defined the function class #P to contain the functions that give the number\nof accepting paths of some NP machine. In particular, #SAT is in #P. Another class of\nproblems we consider are the another-solution problems (see Footnote 1 for an informal\ndefinition and Definition 2.1 for the another-solution problems associated with k-TRP).\nThe complexity of two decision problems, A and B, will here be compared via the\npolynomial-time many-one reducibility: A ≤p\nm B if there is a polynomial-time computable\nfunction f such that for each x ∈Σ∗, x ∈A if and only if f(x) ∈B. A set B is said to be\nNP-complete if B is in NP and every NP set ≤p\nm-reduces to B.\nMany-one reductions do not always preserve the number of solutions. A reduction that\ndoes preserve the number of solutions is said to be parsimonious. Formally, if A and B are\nany two sets in NP, we say A parsimoniously reduces to B if there exists a polynomial-time\ncomputable function f such that for each x ∈Σ∗, #A(x) = #B(f(x)).\nTo compare two another-solution problems associated with two given NP problems,\nA and B, Ueda and Nagao [UN96] introduced the following notion of reducibility.2\nWe\nsay that A ≤p\nasp B if A is parsimoniously reducible to B and, in addition, there exists a\npolynomial-time computable bijective function from the set of solutions of A to the set of\nsolutions of B. Let AS-A and AS-B be the another-solution problems associated with A\nand B (see Footnote 1 for an informal definition and, specifically, Definition 2.1 for the\nanother-solution problems associated with k-TRP). Ueda and Nagao [UN96] show that if\nAS-A is NP-complete and A ≤p\nasp B, then AS-B is also NP-complete [UN96]. In particular,\nAS-SAT is known to be NP-complete [YS02].\nValiant and Vazirani [VV86] introduced the following type of randomized polynomial-\ntime many-one reducibility: A ≤p\nran B if there exists a polynomial-time randomized algo-\nrithm F and a polynomial p such that for each x ∈Σ∗, if x ∈A then F(x) ∈B with\nprobability at least 1/p(|x|), and if x ̸∈A then F(x) ̸∈B with certainty. In particular, they\nproved that the unique version of the satisfiability problem, Unique-SAT, is DP-complete\nunder randomized reductions; see also Chang, Kadin, and Rohatgi [CKR95] for further\nrelated results.\n2They call this notion “parsimonious reduction with the property (∗)” [UN96]. Yato and Seta [YS02] in-\ntroduce a similar notion (albeit tailored to the case of function problems), which they denote by “polynomial-\ntime ASP reduction.”\n4\n\n2.2\nVariants of the TantrixTM Rotation Puzzle Problem\n2.2.1\nTile Sets, Color Sequences, and Orientations\nThe TantrixTM rotation puzzle consists of four different kinds of hexagonal tiles, named Sint,\nBrid, Chin, and Rond. Each tile has three lines colored differently, where the three colors of\na tile are chosen among four possible colors, see Figures 1(a)–(d). The original TantrixTM\ncolors are red, yellow, blue, and green, which we encode here as shown in Figures 1(e)–(h).\nThe combination of four kinds of tiles having three out of four colors each gives a total of\n56 different tiles.\n(a) Sint\n(b) Brid\n(c) Chin\n(d) Rond\n(e) red\n(f) yellow\n(g) blue\n(h) green\nFigure 1: TantrixTM tile types and the encoding of TantrixTM line colors\n2\n1\n4\n3\n6\n5\n8\n7\n(a) TantrixTM tile set T2\n2\n1\n5\n4\n3\n8\n7\n6\n11\n10\n9\n14\n13\n12\n(b) TantrixTM tile set T3\nFigure 2: TantrixTM tile sets T2 (for red and blue) and T3 (for red, yellow, and blue)\nSince we wish to study TantrixTM rotation puzzle problems for which the number of\nallowed colors is restricted, the set of TantrixTM tiles available in a given problem instance\ndepends on which variant of the TantrixTM rotation puzzle problem we are interested in. Let\nC be the set that contains the four colors red, yellow, blue, and green. For each i ∈{1, 2, 3, 4},\nlet Ci ⊆C be some fixed subset of size i, and let Ti denote the set of TantrixTM tiles\navailable when the line colors for each tile are restricted to Ci. For example, T4 is the\noriginal TantrixTM tile set containing 56 tiles, and if C3 contains, say, the three colors red,\nyellow, and blue, then tile set T3 contains the 14 tiles shown in Figure 2(b).\nSome more remarks on the tile sets are in order. First, for T3 and T4, we require the\nthree lines on each tile to have distinct colors, as in the original TantrixTM tile set. For T1\nand T2, however, this is not possible, so we allow the same color being used for more than\none of the three lines of any tile. Second, note that we care only about the sequence of\ncolors on a tile,3 where we always use the clockwise direction to represent color sequences.\n3The reason for this and the resulting conventions on the tile sets stated in this paragraph is that our\nproblems refer to the variant of the TantrixTM game that seeks, via rotations, to make the line colors match\n5\n\nHowever, since different types of tiles can yield the same color sequence, we will use just\none such tile to represent the corresponding color sequence. For example, if C2 contains,\nsay, the two colors red and blue, then the color sequence red-red-blue-blue-blue-blue (which\nwe abbreviate as rrbbbb) can be represented by a Sint, a Brid, or a Rond each having one\nshort red arc and two blue additional lines, and we add only one such tile (say, the Rond)\nto the tile set T2. That is, though there is some freedom in choosing a particular set of tiles,\nto be specific we fix the tile set T2 shown in Figure 2(a). Thus, we have ∥T1∥= 1, ∥T2∥= 8,\n∥T3∥= 14, and ∥T4∥= 56, regardless of which colors are chosen to be in Ci, 1 ≤i ≤4.\nRond\nBrid\nChin\nSint\nt1\nt2\nt3\nt4\nt5\nt6\nt7\nt8\nbbrrrr\nrrbbbb\nbrrbrr\nrbbrbb\nrbrrrb\nbrbbbr\nbbbbbb\nrrrrrr\nTable 2: Color sequences of the tiles in T2\nRond\nBrid\nChin\nt1\nt2\nt3\nt4\nt5\nt6\nt7\nt8\nyrrbby\nryybbr\nyrrybb\nryyrbb\nbrrbyy\nyrbybr\nrbyryb\nbrybyr\nSint\nt9\nt10\nt11\nt12\nt13\nt14\nbrbyyr\nbybrry\nryrbby\nrbryyb\nybyrrb\nyrybbr\nTable 3: Color sequences of the tiles in T3\nTables 2 and 3 show the color sequences for the eight tiles in T2 and for the 14 tiles in\nT3 that are presented in Figures 2(a) and 2(b), respectively. Tables 4 and 5 give the six\npossible orientations for each tile in T2 and in T3, which can be described by permuting the\ncolor sequences cyclically and where repetitions of color sequences are omitted. Regarding\nthe latter, note that some of the tiles in T2 (namely, tiles t3, t4, t7, and t8 in Table 4) have\norientations that yield identical color sequences due to symmetry, and so repetitions can\nbe omitted. In contrast, no such repetitions occur for the 14 tiles in T3 when permuted\ncyclically to yield the six possible orientations (see Table 5).\nNote that, for example, tile t7 from T2 (see Table 4) has the same color sequence (namely,\nbbbbbb) in each of its six orientations. In Section 3, we will consider the counting versions\nof TantrixTM rotation puzzle problems and will construct parsimonious reductions. When\ncounting the solutions of TantrixTM rotation puzzles, we will focus on color sequences only.\nThat is, whenever some tile (such as t7 from T2) has distinct orientations with identical\ncolor sequences, we will count this as just one solution (and disregard such repetitions). In\nthis sense, our reduction to be presented in the proof of Theorem 3.5 will be parsimonious.\non all joint edges of adjacent tiles. The objective of other TantrixTM games is to create lines and loops of\nthe same color as long as possible; for problems related to these TantrixTM game variants, other conventions\non the sets of allowed tiles would be reasonable.\n6\n\nTile\nOrientation\nNumber\n1\n2\n3\n4\n5\n6\n1\nbbrrrr\nrbbrrr\nrrbbrr\nrrrbbr\nrrrrbb\nbrrrrb\n2\nrrbbbb\nbrrbbb\nbbrrbb\nbbbrrb\nbbbbrr\nrbbbbr\n3\nbrrbrr\nrbrrbr\nrrbrrb\n4\nrbbrbb\nbrbbrb\nbbrbbr\n5\nrbrrrb\nbrbrrr\nrbrbrr\nrrbrbr\nrrrbrb\nbrrrbr\n6\nbrbbbr\nrbrbbb\nbrbrbb\nbbrbrb\nbbbrbr\nrbbbrb\n7\nbbbbbb\n8\nrrrrrr\nTable 4: Color sequences of the tiles in T2 in their six orientations\nTile\nOrientation\nNumber\n1\n2\n3\n4\n5\n6\n1\nyrrbby\nyyrrbb\nbyyrrb\nbbyyrr\nrbbyyr\nrrbbyy\n2\nryybbr\nrryybb\nbrryyb\nbbrryy\nybbrry\nyybbrr\n3\nyrrybb\nbyrryb\nbbyrry\nybbyrr\nrybbyr\nrrybby\n4\nryyrbb\nbryyrb\nbbryyr\nrbbryy\nyrbbry\nyyrbbr\n5\nbrrbyy\nybrrby\nyybrrb\nbyybrr\nrbyybr\nrrbyyb\n6\nyrbybr\nryrbyb\nbryrby\nybryrb\nbybryr\nrbybry\n7\nrbyryb\nbrbyry\nybrbyr\nrybrby\nyrybrb\nbyrybr\n8\nbrybyr\nrbryby\nyrbryb\nbyrbry\nybyrbr\nrybyrb\n9\nbrbyyr\nrbrbyy\nyrbrby\nyyrbrb\nbyyrbr\nrbyyrb\n10\nbybrry\nybybrr\nrybybr\nrrybyb\nbrryby\nybrryb\n11\nryrbby\nyryrbb\nbyryrb\nbbyryr\nrbbyry\nyrbbyr\n12\nrbryyb\nbrbryy\nybrbry\nyybrbr\nryybrb\nbryybr\n13\nybyrrb\nbybyrr\nrbybyr\nrrbyby\nyrrbyb\nbyrrby\n14\nyrybbr\nryrybb\nbryryb\nbbryry\nybbryr\nrybbry\nTable 5: Color sequences of the tiles in T3 in their six orientations\n2.2.2\nDefinition of the Problems\nWe now recall some useful notation that Holzer and Holzer [HH04] introduced in order to\nformalize problems related to the TantrixTM rotation puzzle. The instances of such problems\nare TantrixTM tiles firmly arranged in the plane. To represent their positions, we use a two-\ndimensional hexagonal coordinate system shown in Figure 3. Let T ∈{T1, T2, T3, T4} be\nsome tile set as defined above. Let A : Z2 →T be a function mapping points in Z2 to\ntiles in T, i.e., A(x) is the type of the tile located at position x. Note that A is a partial\nfunction; throughout this paper (except in Theorem 3.9 and its proof), we restrict our\nproblem instances to finitely many given tiles, and the regions of Z2 they cover may have\nholes (which is a difference to the original TantrixTM game).\nDefine shape(A) to be the set of points x ∈Z2 for which A(x) is defined. For any two\ndistinct points x = (a, b) and y = (c, d) in Z2, x and y are neighbors if and only if (a = c\n7\n\nx\ny\n(1, 1)\n(0, 0)\n(−1, −1)\n(1, 0)\n(0, 1)\n(−1, 0)\n(0, −1)\nFigure 3: A two-dimensional hexagonal coordinate system\nand |b −d| = 1) or (|a −c| = 1 and b = d) or (a −c = 1 and b −d = 1) or (a −c = −1\nand b −d = −1). For any two points x and y in shape(A), A(x) and A(y) are said to be\nneighbors exactly if x and y are neighbors.\nWe now define the TantrixTM rotation puzzle problems we are interested in, where the\nparameter k is chosen from {1, 2, 3, 4}:\nName: k-Color TantrixTM Rotation Puzzle (k-TRP, for short).\nInstance: A finite shape function A : Z2 →Tk, appropriately encoded as a string in Σ∗.\nQuestion: Is there a solution to the rotation puzzle defined by A, i.e., does there exist\na rotation of the given tiles in shape(A) such that the colors of the lines of any two\nadjacent tiles match at their joint edge?\nClearly, 1-TRP can be solved trivially, so 1-TRP is in P. On the other hand, Holzer\nand Holzer [HH04] showed that 4-TRP is NP-complete and that the infinite variant of\n4-TRP is undecidable. Baumeister and Rothe [BR07] investigated the counting and the\nunique variant of 4-TRP and, in particular, provided a parsimonious reduction from SAT\nto 4-TRP. In this paper, we study the three-color and two-color versions of this problem,\n3-TRP and 2-TRP, and their counting, unique, another-solution, and infinite variants.\nDefinition 2.1\n1. A solution to a k-TRP instance A specifies an orientation of each\ntile in shape(A) such that the colors of the lines of any two adjacent tiles match at\ntheir joint edge. Let Solk-TRP(A) denote the set of solutions of A.\n2. Define the counting version of k-TRP to be the function #k-TRP mapping from Σ∗\nto N such that #k-TRP(A) = ∥Solk-TRP(A)∥.\n3. Define the unique version of k-TRP as Unique-k-TRP = {A | #k-TRP(A) = 1}.\n4. Define the another-solution problem associated with k-TRP as\nAS-k-TRP = {(A, y1, . . . , yn) | y1, . . . , yn ∈Solk-TRP(A) and ∥Solk-TRP(A)∥> n}.\nThe above problems are defined for the case of finite problem instances. The infinite\nTantrixTM rotation puzzle problem with k colors (Inf-k-TRP, for short) is defined exactly\nas k-TRP, the only difference being that the shape function A is not required to be finite\nand is represented by the encoding of a Turing machine computing A : Z2 →Tk.\n8\n\n3\nResults\n3.1\nParsimonious Reduction from SAT to 3-TRP\nTheorem 3.2 below is the main result of this section.\nNotwithstanding that our proof\nfollows the general approach of Holzer and Holzer [HH04], our specific construction and our\nproof of correctness will differ substantially from theirs. We will provide a parsimonious\nreduction from SAT to 3-TRP. Let Circuit∧,¬-SAT denote the problem of deciding, given a\nboolean circuit c with AND and NOT gates only, whether or not there is a satisfying truth\nassignment to the input variables of c. The NP-completeness of Circuit∧,¬-SAT was shown\nby Cook [Coo71]. The following lemma (stated, e.g., in [BR07]) is straightforward.\nLemma 3.1 SAT parsimoniously reduces to Circuit∧,¬-SAT.\nTheorem 3.2 SAT parsimoniously reduces to 3-TRP.\nProof.\nBy Lemma 3.1, it is enough to show that Circuit∧,¬-SAT parsimoniously reduces\nto 3-TRP. The resulting 3-TRP instance simulates a boolean circuit with AND and NOT\ngates such that the number of solutions of the rotation puzzle equals the number of satisfying\ntruth assignments to the variables of the circuit.\nGeneral remarks on our proof approach:\nThe rotation puzzle to be constructed from\na given circuit consists of different subpuzzles each using only three colors. The color green\nwas employed by Holzer and Holzer [HH04] only to exclude certain rotations, so we choose\nto eliminate this color in our three-color rotation puzzle. Thus, letting C3 contain the colors\nblue, red, and yellow, we have the tile set T3 = {t1, t2, . . . , t14}, where the enumeration of\ntiles corresponds to Figure 2(b). Furthermore, our construction will be parsimonious, i.e.,\nthere will be a one-to-one correspondence between the solutions of the given Circuit∧,¬-SAT\ninstance and the solutions of the resulting rotation puzzle instance. Note that part of our\nwork is already done, since some subpuzzles constructed in [BR07] use only three colors\nand they each have unique solutions. However, the remaining subpuzzles have to be either\nmodified substantially or to be constructed completely differently, and the arguments of why\nour modified construction is correct differs considerably from previous work [HH04, BR07].\nSince it is not so easy to exclude undesired rotations without having the color green\navailable, let us first analyze the 14 tiles in T3. For u, v ∈C3 and for each tile ti in T3,\nwhere 1 ≤i ≤14, Table 6 shows which substrings of the form uv occur in the color sequence\nof ti (as indicated by an • entry in row uv and column i). In the remainder of this proof,\nwhen showing that our construction is correct, our arguments will often be based on which\nsubstrings do or do not occur in the color sequences of certain tiles from T3, and Table 6\nmay then be looked up for convenience.\nHolzer and Holzer [HH04] consider a boolean circuit c on input variables x1, x2, . . . , xn\nas a sequence (α1, α2, . . . , αm) of computation steps (or “instructions”), and we adopt this\napproach here. For the ith instruction, αi, we have αi = xi if 1 ≤i ≤n, and if n+1 ≤i ≤m\nthen we have either αi = NOT(j) or αi = AND(j, k), where j ≤k < i.\nCircuits are\nevaluated in the standard way. We will represent the truth value true by the color blue and\nthe truth value false by the color red in our rotation puzzle.\n9\n\nRond\nBrid\nChin\nSint\nuv\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\nbb\n•\n•\n•\n•\n•\n•\nrr\n•\n•\n•\n•\n•\n•\nyy\n•\n•\n•\n•\n•\n•\nbr\n•\n•\n•\n•\n•\n•\n•\n•\n•\n•\nrb\n•\n•\n•\n•\n•\n•\n•\n•\n•\n•\nby\n•\n•\n•\n•\n•\n•\n•\n•\n•\n•\nyb\n•\n•\n•\n•\n•\n•\n•\n•\n•\n•\nry\n•\n•\n•\n•\n•\n•\n•\n•\n•\n•\nyr\n•\n•\n•\n•\n•\n•\n•\n•\n•\n•\nTable 6: Substrings uv that occur in the color sequences of the tiles in T3\nA technical difficulty in the construction results from the wire crossings that circuits\ncan have. To construct rotation puzzles from planar circuits, Holzer and Holzer use Mc-\nColl’s planar “cross-over” circuit with AND and NOT gates to simulate such wire cross-\nings [McC81], and in particular they employ Goldschlager’s log-space transformation from\ngeneral to planar circuits [Gol77]. For the details of this transformation, we refer to Holzer\nand Holzer’s work [HH04].\nWe use a different approach to overcome the difficulty caused by wire crossings. Our\nconstruction will employ a new subpuzzle for this purpose.\nHolzer and Holzer’s circuit\nconstruction uses several cross-over circuits, and each of them consists of twelve AND and\nnine NOT gates, and in addition it increases the number of instruction steps by 14. We will\navoid this blow-up by using the CROSS subpuzzle, which achieves a direct crossing of two\nadjacent wires in our TantrixTM puzzle and thus is much more efficient.\nFor the sake of comparison, we also present the original subpuzzles from Holzer and\nHolzer’s construction ([HH04]) in this section, with the following conventions: Tiles having\nmore than one possible orientation as well as tiles containing green lines will always have\na grey instead of a black edging, and modified or inserted tiles in our new subpuzzles will\nalways be highlighted by having a grey background.\nThis will illustrate the differences\nbetween our new and the previously known original subpuzzles.\nWire subpuzzles:\nWires of the circuit are simulated by the subpuzzles WIRE, MOVE,\nand COPY.\nA vertical wire is represented by a WIRE subpuzzle, which is shown in Figure 5. The\noriginal WIRE subpuzzle from [HH04] (see Figure 4) does not contain green but it does\nnot have a unique solution, while the WIRE subpuzzle from [BR07], which is not displayed\nhere, ensures the uniqueness of the solution but is using a tile with a green line. In the\noriginal WIRE subpuzzle, both tiles, a and b, have two possible orientations for each input\ncolor. Inserting two new tiles at positions x and y (see Figure 5) makes the solution unique.\nIf the input color is blue, tile x must contain one of the following color-sequence substrings\nfor the edges joint with tiles b and a: ry, rr, yy, or yr. If the input color is red, x must\ncontain one of these substrings: bb, yb, yy, or by. Tile t12 satisfies the conditions yy and\nry for the input color blue, and the conditions yb and yy for the input color red.\n10\n\nThe solution must now be fixed with tile y. The possible color-sequence substrings of y\nat the edges joint with a and b are rr and ry for the input color blue, and yb and bb for\nthe input color red. Tile t13 has exactly one of these sequences for each input color. Thus,\nthe solution for this subpuzzle contains only three colors and is unique.\nIN\nOUT\n(a) In: true\nIN\nOUT\n(b) In: false\nIN\na\nb\nOUT\n(c) Scheme\nFigure 4: Original WIRE subpuzzle, see [HH04]\nIN\nOUT\n(a) In: true\nIN\nOUT\n(b) In: false\nx\nIN\na\nb\nOUT\ny\n(c) Scheme\nFigure 5: Three-color WIRE subpuzzle\nThe MOVE subpuzzle is needed to move a wire by two positions to the left or to the\nright. The original MOVE subpuzzle from [HH04] contains only three colors but has several\nsolutions. One solution for each input color is shown in Figure 6, where the tiles with a\ngrey edging have more than one possible orientation.\nHowever, the modified subpuzzle\nfrom [BR07], which is presented in Figure 7, contains also only three colors but has a\nunique solution.\nIN\nOUT\n(a) In: true\nIN\nOUT\n(b) In: false\nFigure 6: Original MOVE subpuzzle, see [HH04]\n11\n\nIN\nOUT\n(a) In: true\nIN\nOUT\n(b) In: false\nFigure 7: Three-color MOVE subpuzzle, see [BR07]\nThe COPY subpuzzle is used to “split” a wire into two copies. By the same arguments\nas above we can take the modified COPY subpuzzle from [BR07], which is presented in\nFigure 9. Figure 8 shows the original COPY subpuzzle from [HH04].\nOUT\nIN\nOUT\n(a) In: true\nOUT\nIN\nOUT\n(b) In: false\nFigure 8: Original COPY subpuzzle, see [HH04]\nOUT\nIN\nOUT\n(a) In: true\nOUT\nIN\nOUT\n(b) In: false\nFigure 9: Three-color COPY subpuzzle, see [BR07]\nThe last subpuzzle needed to simulate the wires of the circuit is our new CROSS sub-\npuzzle shown in Figure 10. This subpuzzle has two inputs and two outputs, and it ensures\n12\n\nthat the input colors will be swapped at the outputs. This subpuzzle uses only three colors\nand has unique solutions for each combination of input colors.\nIN\nOUT\nIN\nOUT\n(a) In: true, true\nIN\nOUT\nIN\nOUT\n(b) In: true, false\nIN\nOUT\nIN\nOUT\n(c) In: false, true\nIN\nOUT\nIN\nOUT\n(d) In: false, false\nIN\na\nc\nOUT\nb\ng\nj\nh\ne\ni\nk\nIN\nd\nf\nOUT\nl1\nm1\nn1\no1\np1\nq1\nr1\ns1\nt1 u1\nl2\nm2\nn2\no2\np2\nq2\nr2\ns2\nt2\nu2\n(e) Scheme\nFigure 10: CROSS subpuzzle\nThe CROSS subpuzzle can be subdivided into three distinct parts: the lower part con-\nsisting of tiles a through k, the upper left part consisting of tiles l1 through u1, and the\nupper right part consisting of tiles l2 through u2.\nLet us first consider the upper left part. Consider the three possible colors that can\noccur at the edge of tile j joint with tile m1.\nCase 1: Assume that the joint edge of these two tiles is blue. One possible orientation for\ntile m1 has yellow at the edge joint with tile l1. This leaves two possible orientations\nfor tile l1. The first one has red at the edge joint with tile n1, but n1 does not contain\n13\n\nthe color sequence yr. The second possible orientation has yellow at the edge joint\nwith tile n1, but this leads to blue at the edges of tiles m1 and n1 with tile o1. Since\no1 does not contain the color sequence bb this is not possible either. The orientation\nof tile m1 is now fixed with red at the edge joint with tile l1.\nThere are two orientations of tile l1, but they both have blue at the edge joint with\ntile n1. In the analysis of the lower part we will see that both solutions are needed.\nThe first one has yellow at the edge joint with tile j and the second one has blue at\nthis edge. The orientation of tile n1 is fixed with red and blue at the edges joint with\ntiles m1 and l1. Tile o1 has a fixed orientation due to the color-sequence substring\nbr at the edges joint with tiles m1 and n1. For tile p1 there are two orientations left,\nbecause this tile contains the color-sequence substring rb for the edges joint with tiles\no1 and n1, twice. The first one has red at the edge joint with tile r1 and yellow at\nthe edge joint with tile q1. Thus, it is not posibble that tile r1 has yellow at the edge\njoint with tile q1, since q1 does not contain the color-sequence substring yy. Neither\nis it possible that r1 has blue at the edge joint with tile q1, because this leads to\nthe color-sequence substring yr at the edges of tiles r1 and s1 with tile t1. So the\norientation of tile p1 is fixed with blue at the edge joint with tile q1 and yellow at the\nedge joint with tile r1. Tile r1 forces the edge joint with tile q1 to be red, and since s1\ndoes not contain the color sequence yy, the orientation of tiles r1 and s1 is fixed with\nblue at their joint edge. This immediately fixes the orientation of all other tiles, and\nthe output color at the left output tile will be blue.\nCase 2: Now we assume that the joint edge of tiles j and m1 is red. There are two possible\norientations for tile m1. The first one has red at the edge joint with tile l1 and blue\nat the edge joint with tile n1. This is not possible because then the joint edge of\ntiles l1 and n1 would have to be blue, but tile n1 does not contain the color-sequence\nsubstring bb. So the orientation of tile m1 is fixed with blue at the edge joint with\ntile l1 and yellow at the edges joint with tiles n1 and o1. Since n1 does not contain\nthe color-sequence substring yr, the orientation of tiles l1 and n1 is fixed with yellow\nat their joint edge. The joint edge of tiles o1 and p1 cannot be red, since p1 does not\ncontain the color-sequence substring rr for the edges joint with tiles o1 and n1, so the\njoint edge of tiles o1 and p1 is yellow, and their orientation is fixed.\nNow, there are two possible orientations for tile r1.\nThe first one with yellow at\nthe edge joint with tile s1 is not possible, since this would lead to the color-sequence\nsubstring yb for tile u1 at the edges joint with tiles r1 and t1. So we fix the orientation\nof tile r1 with yellow at the edge joint with tile q1. This also fixes the orientation of\ntile q1 with blue at the edge joint with tile s1. The edges of tile t1 joint with tiles r1\nand s1 are both yellow, and the orientation of all other tiles is fixed. The output of\nthe subpuzzle’s left output tile will thus be red.\nCase 3: The last possible color for the joint edge of tiles j and m1 is yellow. We first\nassume that the edge of tile m1 joint with tile l1 is blue.\nThere are two possible orientations for tile l1. The first one has yellow at the edge\njoint with tile n1 and thus is not possible, since n1 does not contain the color-sequence\nsubstring ry. The second one has red at the edge joint with tile n1. Since the edge of\n14\n\ntile m1 joint with tile o1 is red, this is not possible either, because o1 does not contain\nthe color-sequence substring rb. So the orientation of tile m1 is fixed with yellow\nat the edge joint with tile l1. And since tile j does not contain the color-sequence\nsubstring by, the orientation of tile l1 is fixed as well\nThe given colors at the edges of tiles l1 and m1 immediately fix the orientation of\ntiles n1 and o1 with blue and yellow at the edges joint with tile p1, which contains the\ncolor-sequence substring by only once and so has a fixed orientation as well. Now we\nhave the same situation as in the previous case, since the joint edge of tile p1 with r1\nis blue and the joint edge of p1 with tile q1 is red. As to color red at the joint edge of\ntiles j and m1 this case will also result in a unique solution with the output color red\nat the left output tile.\nDue to symmetry the upper right part can be handled analogously with the upper left\npart. All Brid and Chin tiles are the same, and the Rond is replaced by the other Rond,\nand the Sint tiles are replaced by the respective other Sint tiles having a small arc of the\nsame color. So we obtain a symmetrical subpuzzle and similar arguments as for the upper\nleft part apply.\nWe now analyze the lower part of this subpuzzle. We first consider tiles a, b, and c. If\nthe left input is blue then there is only one possible solution to these tiles. Obviously tiles\na and c must have a vertical blue line, and since tile g does not contain the color-sequence\nsubstring by, the orientation of these three tiles is fixed with yellow at the edges of tiles\nb joint with tiles c and a. The orientation of tile g is fixed as well, since it contains the\ncolor-sequence substring br only once.\nIf the input to this part is red, we have a fixed\norientation with the color-sequence substring ry for the edges joint with tile g by similar\narguments. Note that tile g has two possible solutions left. Since tiles d, e, and f are the\nsame as tiles a, b, and c, and tile i is a mirrored tile g, the same arguments hold for the\nright input. To analyze the whole lower part, we will distinguish the following four possible\npairs of input colors:\n• First we assume that both input colors are blue (see Figure 10(a)). We have seen that\nthe orientation of tiles g and i is fixed with yellow at their edges joint with tile h,\nand red at their edges joint with tiles j and k, respectively. The orientation of tile\nh is fixed with red at the edges joint with tiles j and k, and so they are fixed with\nthe color-sequence substring by for the edges joint with tiles l1 and m1 and with the\ncolor-sequence substring yb for the edges joint with tiles m2 and l2. In the analysis\nof the upper part we have seen, that both output colors will be blue in this case, as\ndesired.\n• Now, let the right input color be blue and let the left input color be red (see Fig-\nure 10(c)). The two possible colors for tile g joint with tile h are blue and red. The\ncolor for the joint edge of tiles i and h is yellow, and since h contains the color-sequence\nsubstring yxb but not yxr, where x stands for an arbitrary color (chosen among blue,\nred, and yellow), the orientation of tiles g and h is fixed. This also fixes the orientation\nof tiles j and k. Tile j has blue at the edges joint with tiles l1 and m1, and (as we\nhave seen in the analysis of the upper part) the left output color will be blue, just like\nthe right input color. The edges of tile k joint with tiles m2 and l2 are yellow, and so\nthe right output color will be red, as desired.\n15\n\n• The case of blue being the left input color and red being the right input color (see\nFigure 10(b)) is similar to the second case.\nThe output colors will again be the\nexchanged input colors, as desired.\n• The last case is that both input colors are red (see Figure 10(d)). We have seen that\nthe two possible colors for tiles g and i joint with tile h are blue and red. Obviously,\nthey cannot both be blue. If the joint edge of tiles g and h is blue, the joint edges of\ntiles g and h with j are both yellow. This is not possible, because the combination of\nblue at the joint edge of tiles j and l1 and red at the joint edge of tiles j and m1 is\nnot possible. The case of blue at the edge of tile i joint with tile h is not possible due\nto similar arguments for tile k and the upper right part. So the edges of tiles g and i\njoint with tile h must both be red. This leads to red at the edges of tile j joint with\nthe upper left part, and tile k joint with the upper right part. We have already seen\nthat this combination leads to both output colors being red, as desired.\nSo we have unique solutions with the desired effect of exchanging the input colors at the\noutput tiles for all four possible combinations of input colors for the CROSS subpuzzle.\nGate subpuzzles:\nThe boolean gates AND and NOT are represented by the AND and\nNOT subpuzzles. Both the original four-color NOT subpuzzle from [HH04] (see Figure 11)\nand the modified four-color NOT subpuzzle from [BR07], which is not displayed here, use\ntiles with green lines to exclude certain rotations. Our three-color NOT subpuzzle is shown\nin Figure 12. Tiles a, b, c, and d from the original NOT subpuzzle shown in Figure 11\nremain unchanged. Tiles e, f, and g in this original NOT subpuzzle ensure that the output\ncolor will be correct, since the joint edge of e and b is always red. So for our new NOT\nsubpuzzle in Figure 12, we have to show that the edge between tiles x and b is always red,\nand that we have unique solutions for both input colors.\nFirst, let the input color be blue and suppose for a contradiction that the joint edge\nof tiles b and x were blue. Then the joint edge of tiles b and c would be yellow. Since x\nis a tile of type t13 and so does not contain the color-sequence substring substring bb, the\nedge between tiles c and x must be yellow. But then the edges of tile w joint with tiles c\nand x must both be blue. This is not possible, however, because w (which is of type t10)\ndoes not contain the color-sequence substring substring bb. So if the input color is blue,\nthe orientation of tile b is fixed with yellow at the edge of b joint with tile y, and with red\nat the edges of b joint with tiles c and x. This already ensures that the output color will\nbe red, because tiles c and d behave like a WIRE subpuzzle. Tile x does not contain the\ncolor-sequence substring br, so the orientation of tile c is also fixed with blue at the joint\nedge of tiles c and w. As a consequence, the joint edge of tiles w and d is yellow, and due\nto the fact that the joint edge of tiles w and x is also yellow, the orientation of w and d is\nfixed as well. Regarding tile a, the edge joint with tile y can be yellow or red, but tile x\nhas blue at the edge joint with tile y, so the joint edge of tiles y and a is yellow, and the\norientation of all tiles is fixed for the input color blue. The case of red being the input color\ncan be handled analogously.\nThe most complicated figure (besides the CROSS) is the AND subpuzzle. The original\nfour-color version from [HH04] (see Figure 13) uses four tiles with green lines and the\nmodified four-color AND subpuzzle from [BR07], which is not displayed here, uses seven\n16\n\nIN\nOUT\n(a) In: true\nIN\nOUT\n(b) In: false\nf\ng\ne\nIN\na\nb\nc\nd\nOUT\n(c) Scheme\nFigure 11: Original NOT subpuzzle, see [HH04]\nIN\nOUT\n(a) In: true\nIN\nOUT\n(b) In: false\ny\nx\nw\nIN\na\nb\nc\nd\nOUT\n(c) Scheme\nFigure 12: Three-color NOT subpuzzle\ntiles with green lines. Figure 14 shows our new AND subpuzzle using only three colors and\nhaving unique solutions for all four possible combinations of input colors. To analyze this\nsubpuzzle, we subdivide it into a lower and an upper part. The lower part ends with tile c\nand has four possible solutions (one for each combination of input colors), while the upper\npart, which begins with tile j, has only two possible solutions (one for each possible output\ncolor). The lower part can again be subdivided into three different parts.\nThe lower left part contains the tiles a, b, x, and h. If the input color to this part is blue\n(see Figures 14(a) and 14(b)), the joint edge of tiles b and x is always red, and since tile\nx (which is of type t11) does not contain the color-sequence substring rr, the orientation\nof tiles a and x is fixed. The orientation of tiles b and h is also fixed, since h (which is of\ntype t2) does not contain the color-sequence substring by but the color-sequence substring\nyy for the edges joint with tiles b and x. By similar arguments we obtain a unique solution\nfor these tiles if the left input color is red (see Figures 14(c) and 14(d)). The connecting\nedge to the rest of the subpuzzle is the joint edge between tiles b and c, and tile b will have\nthe same color at this edge as the left input color.\nTiles d, e, i, w, and y form the lower right part. If the input color to this part is blue\n(see Figures 14(a) and 14(c)), the joint edge of tiles d and y must be yellow, since tile y\n(which is of type t9) does not contain the color-sequence substrings rr nor ry for the edges\njoint with tiles d and e. Thus the joint edge of tiles y and e must be yellow, since i (which\n17\n\nIN\nOUT\nIN\n(a) In: true, true\nIN\nOUT\nIN\n(b) In: true, false\nIN\nOUT\nIN\n(c) In: false, true\nIN\nOUT\nIN\n(d) In: false, false\nh\nIN\na\nb\nc\nj\nk\ng\nl\nm\nn\nOUT\nf\no\nIN\nd\ne\np\nq\ni\n(e) Scheme\nFigure 13: Original AND subpuzzle, see [HH04]\n18\n\nIN\nOUT\nIN\n(a) In: true, true\nIN\nOUT\nIN\n(b) In: true, false\nIN\nOUT\nIN\n(c) In: false, true\nIN\nOUT\nIN\n(d) In: false, false\nx\nh\nIN\na\nb\nv\nc\nj\nk\ng\nl\nm\nn\nOUT\nw\nu\no\nIN\nd\ne\ny\ni\n(e) Scheme\nFigure 14: Three-color AND subpuzzle\nis of type t6) does not contain the color-sequence substring bb for the edges joint with tiles\ny and e. This implies that the tiles i and w also have a fixed orientation. If the input color\nto the lower right part is red (see Figures 14(b) and 14(d)), a unique solution is obtained\nby similar arguments. The connection of the lower right part to the rest of the subpuzzle is\nthe edge between tiles w and g. If the right input color is blue, this edge will also be blue,\nand if the right input color is red, this edge will be yellow.\nThe heart of the AND subpuzzle is its lower middle part, formed by the tiles c and g.\nThe colors at the joint edge between tiles b and c and at the joint edge between tiles w and\ng determine the orientation of the tiles c and g uniquely for all four possible combinations of\ninput colors. The output of this part is the color at the edge between c and j. If both input\ncolors are blue, this edge will also be blue, and otherwise this edge will always be yellow.\nThe output of the whole AND subpuzzle will be red if the edge between c and j is\nyellow, and if this edge is blue then the output of the whole subpuzzle will also be blue. If\nthe input color for the upper part is blue (see Figure 14(a)), each of the tiles j, k, l, m,\nand n has a vertical blue line. Note that since the colors red and yellow are symmetrical\nin these tiles, we would have several possible solutions without tiles o, u, and v. However,\ntile v (which is of type t9) contains neither rr nor ry for the edges joint with tiles k and j,\nso the orientation of the tiles j through n is fixed, except that tile n without tiles o and u\nwould still have two possible orientations. Tile u (which is of type t2) is fixed because of\n19\n\nOUT\n(a) Out: true\nOUT\n(b) Out: false\na\nb\nOUT\nc\n(c) Scheme\nFigure 15: Original BOOL subpuzzle, see [HH04]\nits color-sequence substring yy at the edges joint with l and m, so due to tiles o and u the\nonly color possible at the edge between n and o is yellow, and we have a unique solution.\nIf the input color for the upper part is yellow (see Figures 14(b)–(d)), we obtain unique\nsolutions by similar arguments. Hence, this new AND subpuzzle uses only three colors and\nhas unique solutions for each of the four possible combinations of input colors.\nOUT\n(a) Out: true\nOUT\n(b) Out: false\nx\nb\nc\na\nOUT\nd\n(c) Scheme\nFigure 16: Three-color BOOL subpuzzle\nInput and output subpuzzles:\nThe input variables of the boolean circuit are repre-\nsented by the subpuzzle BOOL. The original four-color BOOL subpuzzle from [HH04] is\nshown in Figure 15. Our new three-color BOOL subpuzzle is presented in Figure 16, and\nsince it is completely different from the original subpuzzle, no tiles are marked here. This\nsubpuzzle has only two possible solutions, one with the output color blue (if the corre-\nsponding variable is true), and one with the output color red (if the corresponding variable\nis false). The original four-color BOOL subpuzzle from [HH04] (which was not modified\nin [BR07]) contains tiles with green lines to exclude certain rotations.\nOur three-color\nBOOL subpuzzle does not contain any green lines, but it might not be that obvious that\nthere are only two possible solutions, one for each output color.\nFirst, we show that the output color yellow is not possible. If the output color were\nyellow, there would be two possible orientations for tile a. In the first orientation, the joint\nedge between a and b is blue. This is not possible, however, since c (which is a Chin, namely\na tile of type t8) does not contain the color-sequence substring rr. By a similar argument\nfor tile d, the other orientation with the output color yellow is not possible either.\nSecond, we show that tile x makes the solution unique. For the output color blue, there\nare two possible orientations for each of the tiles a, b, c, and d. In order to exclude one of\nthese orientations in each case, tile x must contain either of the color-sequence substrings\nbr or yr at its edges joint with tiles b and c. On the other hand, for the output color red, tile\nx must not contain the color-sequence substring ry at its edges joint with b and c, because\n20\n\nIN\n(a) TEST-true\nIN\n(b) TEST-false\nd\nIN\na\nc\nb\n(c) Scheme\nFigure 17: Original TEST subpuzzles, see [HH04]\nthis would leave two possible orientations for tile d. Tile t1 satisfies all these conditions and\nmakes the solution of the BOOL subpuzzle unique, while using only three colors.\nIN\n(a) TEST-true\nIN\n(b) TEST-false\nd\nx\nIN\na\nc\nb\n(c) Scheme\nFigure 18: Three-color TEST subpuzzles\nFinally, a subpuzzle is needed to check whether or not the circuit evaluates to true.\nThis is achieved by the subpuzzle TEST-true shown in Figure 18(a). It has only one valid\nsolution, namely that its input color is blue. Just like the subpuzzle BOOL, the original\nfour-color TEST-true subpuzzle from [HH04], which is shown in Figure 17(a) and which\nwas not modified in [BR07], uses green lines to exclude certain rotations. Again, since the\nnew TEST-true subpuzzle is completely different from the original subpuzzle, no tiles are\nmarked here. Note that in the three-color TEST-true subpuzzle of Figure 18(a), a and c\nare the same tiles as a and b in the WIRE subpuzzle of Figure 5. To ensure that the input\ncolor is blue, we have to consider all possible color-sequence substrings at the edges of d\njoint with c and a, and at the edges of b joint with a and c. For each input color, there are\nfour possibilities.\nAssume that the input color is red. Then the possible color-sequence substrings for tile\nd at the edges joint with c and a are: bb, yb, yy, and by. Similarly, the possible color-\nsequence substrings for tile b at the edges joint with a and c are: yy, yb, bb, and by. Tile\nt14 at position d excludes by and yy, while tile t11 at position b excludes yy and yb. Thus,\nred is not possible as the input color. The input color yellow can be excluded by similar\narguments. It follows that blue is the only possible input color. It is clear that the tiles a\nand c have a vertical blue line. Due to the fact that neither t11 nor t14 contains the color-\nsequence substrings rr or yy for the edges joint with tiles a and c, two possible solutions\nare still left. The color-sequence substrings for these solutions at the edges of x joint with\nc and d are ry and yr. Since tile t2 at position x contains the former but not the latter\nsequence, the TEST-true subpuzzle uses only three colors and has a unique solution.\n(Note: The TEST-false subpuzzles in Figures 18(b) and 24(e) will be needed for a\ncircuit construction in Section 3.3, see Figure 25.\nIn particular, the three-color TEST-\nfalse subpuzzle in Figure 18(b) is identical to the three-color TEST-true subpuzzle from\n21\n\nFigure 18(a), except that the colors blue and red are exchanged. By the above argument,\nthe TEST-false subpuzzle has only one valid solution, namely that its input color is red.)\nThe shapes of the subpuzzles constructed above have changed slightly. However, by\nHolzer and Holzer’s argument [HH04] about the minimal horizontal distance between two\nwires and/or gates being at least four, unintended interactions between the subpuzzles do\nnot occur. This concludes the proof of Theorem 3.2.\n❑\nTheorem 3.2 immediately gives the following corollary.\nCorollary 3.3 3-TRP is NP-complete.\nSince the tile set T3 is a subset of the tileset T4, we have 3-TRP ≤p\nm 4-TRP. Thus, the\nhardness results for 3-TRP and its variants proven in this paper immediately are inherited\nby 4-TRP and its variants, which provides an alternative proof of these hardness results for\n4-TRP and its variants established in [HH04, BR07]. In particular, Corollary 3.4 follows\nfrom Theorem 3.2 and Corollary 3.3.\nCorollary 3.4 ([HH04, BR07]) 4-TRP is NP-complete, via a parsimonious reduction\nfrom SAT.\n3.2\nParsimonious Reduction from SAT to 2-TRP\nIn contrast to the above-mentioned fact that 3-TRP ≤p\nm 4-TRP holds trivially, the reduction\n2-TRP ≤p\nm 3-TRP (which we will show to hold due to both problems being NP-complete,\nsee Corollaries 3.3 and 3.6) is not immediatedly straightforward, since the tile set T2 is not\na subset of the tile set T3 (recall Figure 2 in Section 2). In this section, we study 2-TRP\nand its variants. Our main result here is Theorem 3.5 below.\nTheorem 3.5 SAT parsimoniously reduces to 2-TRP.\nProof.\nAs in the proof of Theorem 3.2, we again provide a reduction from Circuit∧,¬-SAT,\nbut here we use McColl’s planar cross-over circuit [McC81] instead of a CROSS subpuzzle.4\nWe choose our color set C2 to contain the colors blue and red (corresponding to the\ntruth values true and false), and we use the tileset T2 shown in Figure 2(a). To simulate a\nboolean circuit with AND and NOT gates, we now present the subpuzzles constructed only\nwith tiles from T2.\nWire subpuzzles:\nWe again use Brid tiles with a straight blue line to construct the\nWIRE subpuzzle with the colors blue and red as shown in Figure 19. If the input color is\nblue, then tiles a and b must have a vertical blue line, so the output color will be blue. If\nthe input color is red, then the edge between a and b must be red too, and it follows that\nthe ouput color will also be red. Tile x forces tiles a and b to fix the orientation of the blue\n4Whether there exists an analogous two-color CROSS subpuzzle to simplify this construction, is still an\nopen question.\n22\n\nline for the input color red. Since we care only about distinct color sequences of the tiles\n(recall the remarks made in Section 2.2.1),5 we have unique solutions for both input colors.\nNote that this construction allows wires of arbitrary height, unlike the WIRE subpuzzle\nconstructed in the proof of Theorem 3.2 or the WIRE subpuzzles constructed in [HH04,\nBR07], which all are constructed so as to have even height. To construct two-color WIRE\nsubpuzzles of arbitrary height, tile x of type t8 in Figure 19 would have to be placed on\nalternating sides of tiles a, b, etc. in each level.\nIN\nOUT\n(a) In: true\nIN\nOUT\n(b) In: false\nx\nIN\na\nb\nOUT\n(c) Scheme\nFigure 19: Two-color WIRE subpuzzle\nThe two-color MOVE subpuzzle is shown in Figure 20. Just like the WIRE subpuzzle,\nit consists only of tiles of types t3 and t8 (see Figure 2(a)). For the input color blue, it is\nobvious that all tiles must have vertical blue lines and so the output color is also blue. If the\ninput color is red, then the edge between a and b is red, too. Since neither c nor d contains\nthe color-sequence substring bb, the blue lines of these four tiles have all the same direction.\nThe same argument applies to tiles e and f, and since tiles f, g, and x behave like a WIRE\nsubpuzzle, the output color will be red in this case. As above, since we care only about the\ncolor sequences of the tiles, we obtain unique solutions for both input colors.\nNote that Figure 20 shows a move to the right.\nA move to the left can be made\nsymmetrically, simply by mirroring this subpuzzle.\nIN\nOUT\n(a) In: true\nIN\nOUT\n(b) In: false\nIN\na\nb\nc\nd\ne\nf\ng\nOUT\nx\n(c) Scheme\nFigure 20: Two-color MOVE subpuzzle\n5By contrast, if we were to count all distinct orientations of the tiles even if they have identical color\nsequences, we would obtain two solutions each for tiles a and b, and six solutions for tile x, which gives a\ntotal of 24 solutions for each input color in the WIRE subpuzzle. However, as argued in Section 2.2.1, since\nour focus is on the color sequences, we have unique solutions and thus a parsimonious reduction from SAT\nto 2-TRP.\n23\n\nOUT\nIN\nOUT\n(a) In: true\nOUT\nIN\nOUT\n(b) In: false\ny\nj\nk\nl\nOUT\nh\ni\nIN\na\nb\nc\nd\ne\nf\ng\nOUT\nx\n(c) Scheme\nFigure 21: Two-color COPY subpuzzle\nThe last subpuzzle needed to simulate the wires of the boolean circuit is the COPY\nsubpuzzle in Figure 21. This subpuzzle is akin to the subpuzzle obtained by mirroring the\nMOVE subpuzzle in both directions,6 so similar arguments as above work. Again, since we\ndisregard the repetitions of color sequences, we have unique solutions for both input colors.\nGate subpuzzles:\nThe construction of the NOT subpuzzle presented in Figure 22 is\nsimilar to the corresponding subpuzzle with three colors (see Figure 12). Tiles b and d in\nthe two-color version allow only two possible orientations of tile c, one for each input color.\nThe first one has blue at the edge joint with a and, consequently, red at the edge joint\nwith e; the second possible orientation has the same colors exchanged. Since tiles e, f, and\nx behave like a WIRE subpuzzle, the output color will “negate” the input color, i.e., the\noutput color will be blue if the input color is red, and it will be red if the input color is blue.\nTile x fixes the orientation of tiles f and e and the orientation of tile a is fixed by tile b.\nWe again obtain unique solutions, since we focus on color sequences.\nIN\nOUT\n(a) In: true\nIN\nOUT\n(b) In: false\nb\nx\nIN\na\nc\ne\nf\nOUT\nd\n(c) Scheme\nFigure 22: Two-color NOT subpuzzle\n6We here say “is akin to. . . ” because the COPY subpuzzle in Figure 21 differs from a true two-sided\nmirror version of MOVE by having a tile of type t3 at position y instead of a t8 as in position x. Why? By\nthe arguments for the MOVE subpuzzle, tile x already fixes the orientation of tiles a through k but not of l\n(if the input color is red, see Figure 21(b)). The orientation of tile l is then fixed by a t3 tile at position y,\nsince obviously a t8 would not lead to a solution. However, it is clear that an argument analogous to that\nfor the MOVE subpuzzle shows that all blue lines (except that of g in Figure 21(b)) have the same direction.\n24\n\nIN\nOUT\nIN\n(a) In: true, true\nIN\nOUT\nIN\n(b) In: true, false\nIN\nOUT\nIN\n(c) In: false, true\nIN\nOUT\nIN\n(d) In: false, false\nb\ns\nIN\na\nc\ne\nf\ng\nr\nd\nt\no\nq\nu\nv\nx\nOUT\ni\nm\np\nw\nIN\nh\nj\nl\nn\nk\nz1\nz2\nz3\n(e) Scheme\nFigure 23: Two-color AND subpuzzle\nThe AND subpuzzle is again the most complicated one. To analyze this subpuzzle, we\nsubdivide it into three disjoint parts:\n1. The first part consists of the tiles a through g, z1, and z2. Tiles a through f and z2\nform a two-color NOT subpuzzle, and tile g passes the color at the edge between tiles\nf and g on to the edge between tiles g and r. So the negated left input color will be\nat the edge between tiles g and r. Tile z1 fixes the orientation of tile g to obtain a\nunique solution for this part of the subpuzzle.\n2. The second part is formed by the tiles h through q, and z3. This part is made from a\ntwo-color NOT and a two-color MOVE subpuzzle to negate the right input and move\nit by two positions to the left, which both are slightly modified with respect to the\nNOT in Figure 22 and the MOVE in Figure 20.\nFirst, the minor differences between the move-to-the-left analog of the MOVE subpuz-\nzle from Figure 20 and this modified MOVE subpuzzle as part of the AND subpuzzle\nare the following: (a) tile z3 is positioned to the right of tiles q and u and not to their\nleft, and (b) z3 is a t3 tile, whereas the tile at position x in Figure 20 is of type t8.\n25\n\nHowever, it is clear that the orientation of the blue lines of tiles l through q is fixed\nby tile k, and z3 enforces u and q to have the same direction of blue lines.\nSecond, the minor difference between the NOT from Figure 22 and this modified NOT\nsubpuzzle as part of the AND subpuzzle is that tile m is not of type t8 (as is the x in\nFigure 22) but of type t3, since the modified NOT and MOVE subpuzzles have been\nmerged. These changes are needed to ensure that we get a suitable height for this\npart of the AND subpuzzle. However, it is again clear that the orientation of the blue\nlines of tiles l through q is fixed by tile k.\n3. Finally, the third part, formed by the tiles r through x, behaves like a two-color\nsubpuzzle simulating a boolean NOR gate, which is defined as ¬(α ∨β) ≡¬α ∧¬β.\nThe two inputs to the NOR subpuzzle come from the edges between g and r and\nbetween q and u.\nIf the left input color (at the edge between g and r) is red, then tiles s and z1 ensure\nthat the edge between r and t will also be red. If the left input color is blue, then the\nedge between r and t will be blue by similar arguments, and since tile t is of type t3,\nit passes this input color on to its joint edge with v in both cases. The right input\nto the upper part (at the edge between q and u) is passed on by tile u to the edge\nbetween u and v.\nNow, we have both input colors at the edges between t and v and between u and v.\nIf both of these edges are red (see Figure 23(a)), then tile w enforces that the edge\nbetween v and x will be blue. On the other hand, if one or both of v’s edges with t\nand u are blue, then v’s short blue arc must be at these edges, which enforces that the\ncolor at the edge between v and x will be red. Finally, tile x passes the color at the\nedge joint with tile v to the output. With the negated inputs of the first and second\npart, this subpuzzle behaves like an AND gate, i.e., as a whole this subpuzzle simulates\nthe computation of the boolean function AND: ¬(¬α ∨¬β) ≡¬¬α ∧¬¬β ≡α ∧β.\nAgain, since we care only about the color sequences of the tiles, we obtain unique solutions\nfor each pair of input colors.\nOUT\n(a) BOOL Out: true\nOUT\n(b) BOOL Out: false\na\nOUT\nx\n(c) BOOL Scheme\nIN\n(d) TEST-true\nIN\n(e) TEST-false\nIN\na\n(f) TEST Scheme\nFigure 24: Two-color BOOL and TEST subpuzzles\n26\n\nInput and output subpuzzles:\nThe input variables of the circuit are simulated by the\nsubpuzzle BOOL. Constructing a subpuzzle with the only possible outputs blue or red is\nquite easy, since all tiles except t7 and t8 satisfy this condition. Figures 24(a)–(c) show our\ntwo-color BOOL subpuzzle. Note that tile x ensures the uniqueness of the solutions.\nThe last step is to check if the output of the whole circuit is true. This is done by the\nsubpuzzle TEST-true shown in Figure 24(d), which sits on top of the subpuzzle simulating\nthe circuit’s output gate. Since tile t7 contains only blue lines, the solution is unique.\n(Note: The subpuzzle TEST-false in Figure 24(e) will again be needed in Section 3.3, see\nFigure 25. It has only red lines, so the input is always red and the solution is unique.) ❑\nTheorem 3.5 immediately gives the following corollary.\nCorollary 3.6 2-TRP is NP-complete.\n3.3\nComplexity of the Unique, Another-Solution, and Infinite Variants\nof 3-TRP and 2-TRP\nParsimonious reductions preserve the number of solutions and, in particular, the uniqueness\nof solutions.\nThus, Theorems 3.2 and 3.5 imply Corollary 3.7 below that also employs\nValiant and Vazirani’s results on the DP-hardness of Unique-SAT under ≤p\nran-reductions\n(which were defined in Section 2). The proof of Corollary 3.7 follows the lines of the proof\nof [BR07, Theorem 6], which states the analogous result for Unique-4-TRP in place of\nUnique-3-TRP and Unique-2-TRP.\nCorollary 3.7\n1. Unique-SAT parsimoniously reduces to the problems Unique-3-TRP\nand Unique-2-TRP.\n2. Both Unique-3-TRP and Unique-2-TRP are DP-complete under ≤p\nran-reductions.\nWe now turn to the another-solution problems for k-TRP.\nCorollary 3.8\n1. For each k ∈{2, 3, 4}, SAT ≤p\nasp k-TRP.\n2. For k ∈{2, 3, 4}, AS-k-TRP is NP-complete.\nProof.\nIn Sections 3.1 and 3.2, we showed a parsimonious reduction from Circuit∧,¬-SAT\nto 3-TRP and 2-TRP.\nTo prove the first part of this corollary, we have to show (see\nSection 2.1) that there is a polynomial-time computable function bijectively mapping the\nsolutions of any given Circuit∧,¬-SAT instance C to the solutions of the k-TRP instance\ncorresponding to C, for each k ∈{2, 3, 4}. However, note that a satisfying assignment to the\nvariables of the circuit C immediately gives the solution for the BOOL subpuzzles according\nto our reduction for k-TRP, see the proof of Theorem 3.5 (for k = 2), of Theorem 3.2 (for\nk = 3), and of the result presented for 4-TRP in [BR07] (for k = 4).\nIn each case, our circuit is constructed as a sequence of steps, so the solutions for the\nBOOL subpuzzles determine the color at the input for all subpuzzles at the next step,\nand so on. Since all subpuzzles have unique solutions we can construct a solution to our\npuzzle in polynomial time from bottom to top using the parsimonious reductions mentioned\nabove. Now, given the assignment of the variables, we just have to place the tiles of the\n27\n\nAND\nTEST−true\n(a) Empty word not accepted\nAND\nTEST−false\n(b) Empty word accepted\nFigure 25: Two choices for the ith layer of the infinite circuit for Inf-2-TRP and Inf-3-TRP\nsingle subpuzzles according to the determined solution and so specify their orientation.\nConversely, if we have a solution of a resulting k-TRP instance for k ∈{2, 3, 4}, the output\ncolors at the BOOL subpuzzles gives the corresponding satisfying assignment to the variables\nof the circuit.\nTo prove the second part of Corollary 3.8, note that AS-SAT is NP-complete [YS02], and\nsince the parsimonious reduction from SAT to Circuit∧,¬-SAT provides a bijective transfor-\nmation between these problems’ solution sets, AS-Circuit∧,¬-SAT is also NP-complete. It\nfollows immediately, that the problems AS-3-TRP and AS-2-TRP are NP-complete. Fur-\nthermore, AS-4-TRP inherits the NP-completeness result from AS-3-TRP.\n❑\nHolzer and Holzer [HH04] proved that Inf-4-TRP, the infinite TantrixTM rotation puzzle\nproblem with four colors, is undecidable, via a reduction from (the complement of) the\nempty-word problem for Turing machines. The proof of Theorem 3.9 below uses essentially\nthe same argument but is based on our modified three-color and two-color constructions.\nTheorem 3.9 Both Inf-2-TRP and Inf-3-TRP are undecidable.\nProof.\nThe empty-word problem for Turing machines asks whether the empty word, λ,\nbelongs to the language L(M) accepted by a given Turing machine M. By Rice’s Theo-\nrem [Ric53], both this problem and its complement are undecidable. To reduce the latter\nproblem to either Inf-2-TRP or Inf-3-TRP, we do the following. Let Mi denote the simu-\nlation of a Turing machine M for exactly i steps. Then, Mi accepts its input if and only if\nM accepts the input within i steps.\nWe employ another circuit construction that will be simulated by a TantrixTM rotation\npuzzle. First, two wires are initialized with the boolean value true. Then, in each step, we\nuse either the circuit shown in Figure 25(a) or the one shown in Figure 25(b). The former\ncircuit is chosen in step i if λ /∈L(Mi), and the latter one is chosen in step i if λ ∈L(Mi).\nTo transform this circuit into an Inf-k-TRP instance, where k is either two or three, we use\nthe TEST-true subpuzzle from either Figure 18(a) or Figure 24(d), rotated by 180 degrees\nand with the “IN” tile becoming an “OUT” tile, in order to initialize both wires with the\ninput true. Then we substitute the single layers of the circuit by the subpuzzles described\nabove, step by step, always choosing either the circuit from Figure 25(a) (where TEST-true\nis the subpuzzle from Figure 18(a) if k = 3, or from Figure 24(d) if k = 2), or the circuit\n28\n\nfrom Figure 25(b) (where TEST-false is the subpuzzle from Figure 18(b) if k = 3, or from\nFigure 24(e) if k = 2).\nSince both wires are initialized with the value true, it is obvious that the constructed\nsubpuzzle has a solution if and only if λ /∈L(M). Note that the layout of the circuit is\ncomputable, and our reduction will output the encoding of a Turing machine computing first\nthis circuit layout and then the transformation to the TantrixTM rotation puzzle as described\nabove. By this reduction, both Inf-2-TRP and Inf-3-TRP are shown to be undecidable. ❑\n4\nConclusions\nThis paper studied the three-color and two-color TantrixTM rotation puzzle problems,\n3-TRP and 2-TRP, and their unique, another-solution, and infinite variants. Our main\ncontribution is that both 3-TRP and 2-TRP are NP-complete via a parsimonious reduc-\ntion from SAT, which in particular solves a question raised by Holzer and Holzer [HH04].\nSince restricting the number of colors to three and two, respectively, drastically reduces the\nnumber of TantrixTM tiles available, our constructions as well as our correctness arguments\nsubstantially differ from those in [HH04, BR07]. Table 1 in Section 1 shows that our results\ngive a complete picture of the complexity of k-TRP, 1 ≤k ≤4. An interesting question\nstill remaining open is whether the analogs of k-TRP without holes still are NP-complete.\nAcknowledgments: We are grateful to Markus Holzer and Piotr Faliszewski for inspiring\ndiscussions on TantrixTM rotation puzzles, and we thank Thomas Baumeister for his help\nwith producing reasonably small figures. We thank the anonymous LATA 2008 referees for\nhelpful comments, and in particular the referee who let us know that he or she has also\nwritten a program for verifying the correctness of our constructions.\nReferences\n[BR]\nD. Baumeister and J. Rothe. The three-color and two-color TantrixTM rotation\npuzzle problems are NP-complete via parsimonious reductions. In Proceedings\nof the 2nd International Conference on Language and Automata Theory and\nApplications. Springer-Verlag Lecture Notes in Computer Science. To appear.\n[BR07]\nD. Baumeister and J. Rothe.\nSatisfiability parsimoniously reduces to the\nTantrixTM rotation puzzle problem. In Proceedings of the 5th Conference on\nMachines, Computations and Universality, pages 134–145. Springer-Verlag Lec-\nture Notes in Computer Science #4664, September 2007.\n[CGH+88] J. Cai, T. Gundermann, J. Hartmanis, L. Hemachandra, V. Sewelson, K. Wag-\nner, and G. Wechsung. The boolean hierarchy I: Structural properties. SIAM\nJournal on Computing, 17(6):1232–1252, 1988.\n[CGH+89] J. Cai, T. Gundermann, J. Hartmanis, L. Hemachandra, V. Sewelson, K. Wag-\nner, and G. Wechsung. The boolean hierarchy II: Applications. SIAM Journal\non Computing, 18(1):95–111, 1989.\n29\n\n[CKR95]\nR. Chang, J. Kadin, and P. Rohatgi. On unique satisfiability and the threshold\nbehavior of randomized reductions. Journal of Computer and System Sciences,\n50(3):359–373, 1995.\n[Coo71]\nS. Cook.\nThe complexity of theorem-proving procedures.\nIn Proceedings of\nthe 3rd ACM Symposium on Theory of Computing, pages 151–158. ACM Press,\n1971.\n[Dow05]\nK. Downing. Tantrix: A minute to learn, 100 (genetic algorithm) generations\nto master. Genetic Programming and Evolvable Machines, 6(4):381–406, 2005.\n[Gol77]\nL. Goldschlager. The monotone and planar circuit value problems are log space\ncomplete for P. SIGACT News, 9(2):25–29, 1977.\n[Gr ̈a90]\nE. Gr ̈adel.\nDomino games and complexity.\nSIAM Journal on Computing,\n19(5):787–804, 1990.\n[HH04]\nM. Holzer and W. Holzer. TantrixTM rotation puzzles are intractable. Discrete\nApplied Mathematics, 144(3):345–358, 2004.\n[McC81]\nW. McColl. Planar crossovers. IEEE Transactions on Computers, C-30(3):223–\n225, 1981.\n[Pap94]\nC. Papadimitriou. Computational Complexity. Addison-Wesley, 1994.\n[PY84]\nC. Papadimitriou and M. Yannakakis. The complexity of facets (and some facets\nof complexity). Journal of Computer and System Sciences, 28(2):244–259, 1984.\n[Ric53]\nH. Rice.\nClasses of recursively enumerable sets and their decision problems.\nTransactions of the American Mathematical Society, 74:358–366, 1953.\n[Rot05]\nJ. Rothe. Complexity Theory and Cryptology. An Introduction to Cryptocom-\nplexity. EATCS Texts in Theoretical Computer Science. Springer-Verlag, Berlin,\nHeidelberg, New York, 2005.\n[UN96]\nN. Ueda and T. Nagao. NP-completeness results for NONOGRAM via parsimo-\nnious reductions. Technical Report TR96-0008, Tokyo Institute of Technology,\nDepartment of Information Science, Tokyo, Japan, May 1996.\n[Val79]\nL. Valiant. The complexity of computing the permanent. Theoretical Computer\nScience, 8(2):189–201, 1979.\n[VV86]\nL. Valiant and V. Vazirani. NP is as easy as detecting unique solutions. Theo-\nretical Computer Science, 47:85–93, 1986.\n[YS02]\nT. Yato and T. Seta. Complexity and completeness of finding another solution\nand its application to puzzles. Joho Shori Gakkai Kenkyu Hokoku, 2002(103(AL-\n87)):9–16, 2002.\n30","paragraphs":[{"paragraph_id":"p1","order":1,"text":"arXiv:0711.1827v3 [cs.CC] 9 Jun 2008\nThe Three-Color and Two-Color TantrixTM Rotation Puzzle\nProblems are NP-Complete via Parsimonious Reductions∗\nDorothea Baumeister\nand\nJ ̈org Rothe\nInstitut f ̈ur Informatik\nHeinrich-Heine-Universit ̈at D ̈usseldorf\n40225 D ̈usseldorf, Germany\nJune 9, 2008\nAbstract\nHolzer and Holzer [HH04] proved that the TantrixTM rotation puzzle problem with\nfour colors is NP-complete, and they showed that the infinite variant of this problem\nis undecidable. In this paper, we study the three-color and two-color TantrixTM rota-\ntion puzzle problems (3-TRP and 2-TRP) and their variants. Restricting the number\nof allowed colors to three (respectively, to two) reduces the set of available TantrixTM\ntiles from 56 to 14 (respectively, to 8).\nWe prove that 3-TRP and 2-TRP are NP-\ncomplete, which answers a question raised by Holzer and Holzer [HH04] in the affirma-\ntive. Since our reductions are parsimonious, it follows that the problems Unique-3-TRP\nand Unique-2-TRP are DP-complete under randomized reductions. We also show that\nthe another-solution problems associated with 4-TRP, 3-TRP, and 2-TRP are NP-\ncomplete. Finally, we prove that the infinite variants of 3-TRP and 2-TRP are unde-\ncidable.\n1\nIntroduction\nThe puzzle game TantrixTM, invented by Mike McManaway in 1991, is a domino-like strat-\negy game played with hexagonal tiles in the plane. Each tile contains three colored lines\nin different patterns (see Figure 1). We are here interested in the variant of the TantrixTM\nrotation puzzle game whose aim it is to match the line colors of the joint edges for each pair\nof adjacent tiles, just by rotating the tiles around their axes while their locations remain\nfixed. This paper continues the complexity-theoretic study of such problems that was initi-\nated by Holzer and Holzer [HH04]. Other results on the complexity of domino-like strategy\ngames can be found, e.g., in Gr ̈adel’s work [Gr ̈a90]. Ueda and Nagao [UN96] and Yato and\nSeta [YS02] provided a framework for studying the problem of finding another solution of\nany given NP problem when some solutions to this NP problem are already known—an ap-\nproach particularly appropriate for puzzle games. TantrixTM puzzles have also been studied\nwith regard to “evolutionary computation,” see Downing [Dow05].\n∗Supported in part by DFG grants RO 1202/9-3 and RO 1202/11-1, the European Science Foundation’s\nEUROCORES program LogICCC, and the Alexander von Humboldt Foundation’s TransCoop program.\nURL: http://ccc.cs.uni-duesseldorf.de/∼rothe (J. Rothe).\n1"},{"paragraph_id":"p2","order":2,"text":"Holzer and Holzer [HH04] defined two decision problems associated with four-color\nTantrixTM rotation puzzles. The first problem’s instances are restricted to a finite num-\nber of tiles, and the second problem’s instances are allowed to have infinitely many tiles.\nThey proved that the finite variant of this problem is NP-complete and that the infinite\nproblem variant is undecidable. The constructions in [HH04] use tiles with four colors, just\nas the original TantrixTM tile set. Holzer and Holzer posed the question of whether the\nTantrixTM rotation puzzle problem remains NP-complete if restricted to only three colors,\nor if restricted to otherwise reduced tile sets. In this paper, we answer this question in the\naffirmative for the three-color and the two-color version of this problem.\nFor each k, 1 ≤k ≤4, Table 1 summarizes the previously known and our new results\nfor k-TRP, the k-color TantrixTM rotation puzzle problem, and its variants. (All problems\nare formally defined in Section 2.)\nk\nk-TRP is\nParsimonious?\nUnique-k-TRP is\nAS-k-TRP is\nInf-k-TRP is\n1\nin P\nin P\nin P\ndecidable\n(trivial)\n(trivial)\n(trivial)\n(trivial)\n2\nNP-complete\nyes\nDP-≤p\nran-complete NP-complete\nundecidable\n(see Cor. 3.6) (see Thm. 3.5) (see Cor. 3.7)\n(see Cor. 3.8) (see Thm. 3.9)\n3\nNP-complete\nyes\nDP-≤p\nran-complete NP-complete\nundecidable\n(see Cor. 3.3) (see Thm. 3.2) (see Cor. 3.7)\n(see Cor. 3.8) (see Thm. 3.9)\n4\nNP-complete\nyes\nDP-≤p\nran-complete NP-complete\nundecidable\n(see [HH04])\n(see [BR07])\n(see [BR07])\n(see Cor. 3.8) (see [HH04])\nTable 1: Overview of complexity and decidability results for k-TRP and its variants\nSince the four-color TantrixTM tile set contains the three-color TantrixTM tile set, our\nnew complexity results for 3-TRP imply the previous results for 4-TRP (both its NP-\ncompleteness [HH04] and that satisfiability parsimoniously reduces to 4-TRP [BR07]). In\ncontrast, the three-color TantrixTM tile set does not contain the two-color TantrixTM tile\nset (see Figure 2 in Section 2). Thus, 3-TRP does not straightforwardly inherit its hardness\nresults from those of 2-TRP, which is why both reductions, the one to 3-TRP and the one\nto 2-TRP, have to be presented. Note that they each substantially differ—both regarding\nthe subpuzzles constructed and regarding the arguments showing that the constructions\nare correct—from the previously known reductions presented in [HH04, BR07], and we will\nexplicitly illustrate the differences between our new and the original subpuzzles.\nOur reductions will be from a boolean circuit problem, and we construct a TantrixTM\nrotation puzzle that simulates the computation of such a circuit, where suitable subpuzzles\nare used to simulate the wires and gates of the circuit. In particular, the previous reductions\npresented in [HH04, BR07, BR] use McColl’s planar “cross-over” circuit with AND and\nNOT gates to simulate wire crossings [McC81] and they employ Goldschlager’s log-space\ntransformation from general to planar circuits [Gol77].\nWe take the same approach in\nour construction for 2-TRP. In contrast, we simulate wire crossings in the circuit in the\nconstruction for 3-TRP directly by a new subpuzzle called CROSS, which we will introduce\nin Section 3.1 and which will make our reduction for 3-TRP significantly more efficient\ncompared with the reduction for 3-TRP presented in a previous version of this paper [BR].\nNote that using the CROSS results in a puzzle with a considerably smaller total number of\ntiles that are needed to simulate a given circuit.\n2"},{"paragraph_id":"p3","order":3,"text":"Since we provide parsimonious reductions from the satisfiability problem to 3-TRP\nand to 2-TRP, our reductions preserve the uniqueness of the solution. Thus, the unique\nvariants of both 3-TRP and 2-TRP are DP-complete under polynomial-time randomized\nreductions, where DP is the class of differences of NP sets. In addition, we will show that\nour parsimonious reductions for 3-TRP and 2-TRP also provide “another-solution problem\nreductions” (i.e., ≤p\nasp-reductions, see Section 2.1), and so the “another-solution problems”\nassociated with 3-TRP and 2-TRP are also NP-complete.1 Moreover, since 4-TRP inherits\nthe hardness results for 3-TRP, the another-solution problem associated with 4-TRP is\nNP-complete as well. Finally, we will prove that the infinite variants of 3-TRP and 2-TRP\nare undecidable, via a circuit construction similar to the one Holzer and Holzer [HH04] used\nto show that the infinite 4-TRP problem is undecidable.\nWe mention in passing that the present paper differs from and extends its preliminary\nversion [BR] in various ways. First, the proof of Theorem 3.2, which was only sketched\nin [BR], is given here in full length, where we also display the original subpuzzles of Holzer\nand Holzer [HH04] to allow comparison and where we explicitly show the differences between\nthe subpuzzles used in the their original construction (that provides a reduction for 4-TRP\nthat is not parsimonious; see [BR07] for a parsimonious reduction for 4-TRP) and in our\nnew reduction showing 3-TRP NP-complete via a parsimonious reduction. Moreover, the\nproof of this result for 3-TRP presented here additionally differs from the one sketched\nin [BR], since the reduction given here uses the CROSS subpuzzle, which—as explained\nabove—makes the reduction significantly more efficient. Second, we here provide the proof\nof Theorem 3.5, which was completely omitted in [BR]. Third, Corollary 3.8 and the related\ndiscussion of the another-solution variants of k-TRP, k ∈{2, 3, 4}, are completely new to\nthe current version.\nThis paper is organized as follows. Section 2 provides the complexity-theoretic defi-\nnitions and notation used and defines the k-color TantrixTM rotation puzzle problem and\nits variants. Section 3.1 shows that the three-color TantrixTM rotation puzzle problem is\nNP-complete via a parsimonious reduction. To allow comparison, the original subpuzzles\nfrom Holzer and Holzer’s construction [HH04] are also presented in this section. Section 3.2\npresents our result that 2-TRP is NP-complete, again via a parsimonious reduction. Sec-\ntion 3.3 is concerned with the complexity of the unique and infinite variants of the three-\ncolor and the two-color TantrixTM rotation puzzle problem, and with the corresponding\nanother-solution problems.\n2\nDefinitions and Notation\n2.1\nComplexity-Theoretic Notions and Notation\nWe assume that the reader is familiar with the standard notions of complexity theory,\nsuch as the complexity classes P (deterministic polynomial time) and NP (nondeterministic\npolynomial time); see, e.g., the textbooks [Pap94, Rot05]. DP denotes the class of differences\n1Informally stated, an another-solution problem associated with an NP problem A asks, given an instance\nx ∈A and some solutions y1, y2, . . . , yn for “x ∈A” (i.e., the yi’s encode accepting computation paths of an\nNP machine solving A on input x), whether or not there exists another solution, y ̸∈{y1, y2, . . . , yn}, for\n“x ∈A.” See Ueda and Nagao [UN96] and Yato and Seta [YS02] for more details and results, and also for\na discussion of why these problems are particularly important for puzzle games.\n3"},{"paragraph_id":"p4","order":4,"text":"of any two NP sets [PY84]. Note that DP is also known to be the second level of the boolean\nhierarchy over NP, see Cai et al. [CGH+88, CGH+89].\nLet Σ∗denote the set of strings over the alphabet Σ = {0, 1}.\nGiven any language\nL ⊆Σ∗, ∥L∥denotes the number of elements in L. We consider both decision problems\nand function problems. The former are formalized as languages whose elements are those\nstrings in Σ∗that encode the yes-instances of the problem at hand. Regarding the latter,\nwe focus on the counting problems related to sets in NP. The counting version #A of an\nNP set A maps each instance x of A to the number of solutions of x. That is, counting\nproblems are functions from Σ∗to N.\nAs an example, the counting version #SAT of\nSAT, the NP-complete satisfiability problem, asks how many satisfying assignments a given\nboolean formula has. Solutions of NP sets can be viewed as accepting paths of NP machines.\nValiant [Val79] defined the function class #P to contain the functions that give the number\nof accepting paths of some NP machine. In particular, #SAT is in #P. Another class of\nproblems we consider are the another-solution problems (see Footnote 1 for an informal\ndefinition and Definition 2.1 for the another-solution problems associated with k-TRP).\nThe complexity of two decision problems, A and B, will here be compared via the\npolynomial-time many-one reducibility: A ≤p\nm B if there is a polynomial-time computable\nfunction f such that for each x ∈Σ∗, x ∈A if and only if f(x) ∈B. A set B is said to be\nNP-complete if B is in NP and every NP set ≤p\nm-reduces to B.\nMany-one reductions do not always preserve the number of solutions. A reduction that\ndoes preserve the number of solutions is said to be parsimonious. Formally, if A and B are\nany two sets in NP, we say A parsimoniously reduces to B if there exists a polynomial-time\ncomputable function f such that for each x ∈Σ∗, #A(x) = #B(f(x)).\nTo compare two another-solution problems associated with two given NP problems,\nA and B, Ueda and Nagao [UN96] introduced the following notion of reducibility.2\nWe\nsay that A ≤p\nasp B if A is parsimoniously reducible to B and, in addition, there exists a\npolynomial-time computable bijective function from the set of solutions of A to the set of\nsolutions of B. Let AS-A and AS-B be the another-solution problems associated with A\nand B (see Footnote 1 for an informal definition and, specifically, Definition 2.1 for the\nanother-solution problems associated with k-TRP). Ueda and Nagao [UN96] show that if\nAS-A is NP-complete and A ≤p\nasp B, then AS-B is also NP-complete [UN96]. In particular,\nAS-SAT is known to be NP-complete [YS02].\nValiant and Vazirani [VV86] introduced the following type of randomized polynomial-\ntime many-one reducibility: A ≤p\nran B if there exists a polynomial-time randomized algo-\nrithm F and a polynomial p such that for each x ∈Σ∗, if x ∈A then F(x) ∈B with\nprobability at least 1/p(|x|), and if x ̸∈A then F(x) ̸∈B with certainty. In particular, they\nproved that the unique version of the satisfiability problem, Unique-SAT, is DP-complete\nunder randomized reductions; see also Chang, Kadin, and Rohatgi [CKR95] for further\nrelated results.\n2They call this notion “parsimonious reduction with the property (∗)” [UN96]. Yato and Seta [YS02] in-\ntroduce a similar notion (albeit tailored to the case of function problems), which they denote by “polynomial-\ntime ASP reduction.”\n4"},{"paragraph_id":"p5","order":5,"text":"2.2\nVariants of the TantrixTM Rotation Puzzle Problem\n2.2.1\nTile Sets, Color Sequences, and Orientations\nThe TantrixTM rotation puzzle consists of four different kinds of hexagonal tiles, named Sint,\nBrid, Chin, and Rond. Each tile has three lines colored differently, where the three colors of\na tile are chosen among four possible colors, see Figures 1(a)–(d). The original TantrixTM\ncolors are red, yellow, blue, and green, which we encode here as shown in Figures 1(e)–(h).\nThe combination of four kinds of tiles having three out of four colors each gives a total of\n56 different tiles.\n(a) Sint\n(b) Brid\n(c) Chin\n(d) Rond\n(e) red\n(f) yellow\n(g) blue\n(h) green\nFigure 1: TantrixTM tile types and the encoding of TantrixTM line colors\n2\n1\n4\n3\n6\n5\n8\n7\n(a) TantrixTM tile set T2\n2\n1\n5\n4\n3\n8\n7\n6\n11\n10\n9\n14\n13\n12\n(b) TantrixTM tile set T3\nFigure 2: TantrixTM tile sets T2 (for red and blue) and T3 (for red, yellow, and blue)\nSince we wish to study TantrixTM rotation puzzle problems for which the number of\nallowed colors is restricted, the set of TantrixTM tiles available in a given problem instance\ndepends on which variant of the TantrixTM rotation puzzle problem we are interested in. Let\nC be the set that contains the four colors red, yellow, blue, and green. For each i ∈{1, 2, 3, 4},\nlet Ci ⊆C be some fixed subset of size i, and let Ti denote the set of TantrixTM tiles\navailable when the line colors for each tile are restricted to Ci. For example, T4 is the\noriginal TantrixTM tile set containing 56 tiles, and if C3 contains, say, the three colors red,\nyellow, and blue, then tile set T3 contains the 14 tiles shown in Figure 2(b).\nSome more remarks on the tile sets are in order. First, for T3 and T4, we require the\nthree lines on each tile to have distinct colors, as in the original TantrixTM tile set. For T1\nand T2, however, this is not possible, so we allow the same color being used for more than\none of the three lines of any tile. Second, note that we care only about the sequence of\ncolors on a tile,3 where we always use the clockwise direction to represent color sequences.\n3The reason for this and the resulting conventions on the tile sets stated in this paragraph is that our\nproblems refer to the variant of the TantrixTM game that seeks, via rotations, to make the line colors match\n5"},{"paragraph_id":"p6","order":6,"text":"However, since different types of tiles can yield the same color sequence, we will use just\none such tile to represent the corresponding color sequence. For example, if C2 contains,\nsay, the two colors red and blue, then the color sequence red-red-blue-blue-blue-blue (which\nwe abbreviate as rrbbbb) can be represented by a Sint, a Brid, or a Rond each having one\nshort red arc and two blue additional lines, and we add only one such tile (say, the Rond)\nto the tile set T2. That is, though there is some freedom in choosing a particular set of tiles,\nto be specific we fix the tile set T2 shown in Figure 2(a). Thus, we have ∥T1∥= 1, ∥T2∥= 8,\n∥T3∥= 14, and ∥T4∥= 56, regardless of which colors are chosen to be in Ci, 1 ≤i ≤4.\nRond\nBrid\nChin\nSint\nt1\nt2\nt3\nt4\nt5\nt6\nt7\nt8\nbbrrrr\nrrbbbb\nbrrbrr\nrbbrbb\nrbrrrb\nbrbbbr\nbbbbbb\nrrrrrr\nTable 2: Color sequences of the tiles in T2\nRond\nBrid\nChin\nt1\nt2\nt3\nt4\nt5\nt6\nt7\nt8\nyrrbby\nryybbr\nyrrybb\nryyrbb\nbrrbyy\nyrbybr\nrbyryb\nbrybyr\nSint\nt9\nt10\nt11\nt12\nt13\nt14\nbrbyyr\nbybrry\nryrbby\nrbryyb\nybyrrb\nyrybbr\nTable 3: Color sequences of the tiles in T3\nTables 2 and 3 show the color sequences for the eight tiles in T2 and for the 14 tiles in\nT3 that are presented in Figures 2(a) and 2(b), respectively. Tables 4 and 5 give the six\npossible orientations for each tile in T2 and in T3, which can be described by permuting the\ncolor sequences cyclically and where repetitions of color sequences are omitted. Regarding\nthe latter, note that some of the tiles in T2 (namely, tiles t3, t4, t7, and t8 in Table 4) have\norientations that yield identical color sequences due to symmetry, and so repetitions can\nbe omitted. In contrast, no such repetitions occur for the 14 tiles in T3 when permuted\ncyclically to yield the six possible orientations (see Table 5).\nNote that, for example, tile t7 from T2 (see Table 4) has the same color sequence (namely,\nbbbbbb) in each of its six orientations. In Section 3, we will consider the counting versions\nof TantrixTM rotation puzzle problems and will construct parsimonious reductions. When\ncounting the solutions of TantrixTM rotation puzzles, we will focus on color sequences only.\nThat is, whenever some tile (such as t7 from T2) has distinct orientations with identical\ncolor sequences, we will count this as just one solution (and disregard such repetitions). In\nthis sense, our reduction to be presented in the proof of Theorem 3.5 will be parsimonious.\non all joint edges of adjacent tiles. The objective of other TantrixTM games is to create lines and loops of\nthe same color as long as possible; for problems related to these TantrixTM game variants, other conventions\non the sets of allowed tiles would be reasonable.\n6"},{"paragraph_id":"p7","order":7,"text":"Tile\nOrientation\nNumber\n1\n2\n3\n4\n5\n6\n1\nbbrrrr\nrbbrrr\nrrbbrr\nrrrbbr\nrrrrbb\nbrrrrb\n2\nrrbbbb\nbrrbbb\nbbrrbb\nbbbrrb\nbbbbrr\nrbbbbr\n3\nbrrbrr\nrbrrbr\nrrbrrb\n4\nrbbrbb\nbrbbrb\nbbrbbr\n5\nrbrrrb\nbrbrrr\nrbrbrr\nrrbrbr\nrrrbrb\nbrrrbr\n6\nbrbbbr\nrbrbbb\nbrbrbb\nbbrbrb\nbbbrbr\nrbbbrb\n7\nbbbbbb\n8\nrrrrrr\nTable 4: Color sequences of the tiles in T2 in their six orientations\nTile\nOrientation\nNumber\n1\n2\n3\n4\n5\n6\n1\nyrrbby\nyyrrbb\nbyyrrb\nbbyyrr\nrbbyyr\nrrbbyy\n2\nryybbr\nrryybb\nbrryyb\nbbrryy\nybbrry\nyybbrr\n3\nyrrybb\nbyrryb\nbbyrry\nybbyrr\nrybbyr\nrrybby\n4\nryyrbb\nbryyrb\nbbryyr\nrbbryy\nyrbbry\nyyrbbr\n5\nbrrbyy\nybrrby\nyybrrb\nbyybrr\nrbyybr\nrrbyyb\n6\nyrbybr\nryrbyb\nbryrby\nybryrb\nbybryr\nrbybry\n7\nrbyryb\nbrbyry\nybrbyr\nrybrby\nyrybrb\nbyrybr\n8\nbrybyr\nrbryby\nyrbryb\nbyrbry\nybyrbr\nrybyrb\n9\nbrbyyr\nrbrbyy\nyrbrby\nyyrbrb\nbyyrbr\nrbyyrb\n10\nbybrry\nybybrr\nrybybr\nrrybyb\nbrryby\nybrryb\n11\nryrbby\nyryrbb\nbyryrb\nbbyryr\nrbbyry\nyrbbyr\n12\nrbryyb\nbrbryy\nybrbry\nyybrbr\nryybrb\nbryybr\n13\nybyrrb\nbybyrr\nrbybyr\nrrbyby\nyrrbyb\nbyrrby\n14\nyrybbr\nryrybb\nbryryb\nbbryry\nybbryr\nrybbry\nTable 5: Color sequences of the tiles in T3 in their six orientations\n2.2.2\nDefinition of the Problems\nWe now recall some useful notation that Holzer and Holzer [HH04] introduced in order to\nformalize problems related to the TantrixTM rotation puzzle. The instances of such problems\nare TantrixTM tiles firmly arranged in the plane. To represent their positions, we use a two-\ndimensional hexagonal coordinate system shown in Figure 3. Let T ∈{T1, T2, T3, T4} be\nsome tile set as defined above. Let A : Z2 →T be a function mapping points in Z2 to\ntiles in T, i.e., A(x) is the type of the tile located at position x. Note that A is a partial\nfunction; throughout this paper (except in Theorem 3.9 and its proof), we restrict our\nproblem instances to finitely many given tiles, and the regions of Z2 they cover may have\nholes (which is a difference to the original TantrixTM game).\nDefine shape(A) to be the set of points x ∈Z2 for which A(x) is defined. For any two\ndistinct points x = (a, b) and y = (c, d) in Z2, x and y are neighbors if and only if (a = c\n7"},{"paragraph_id":"p8","order":8,"text":"x\ny\n(1, 1)\n(0, 0)\n(−1, −1)\n(1, 0)\n(0, 1)\n(−1, 0)\n(0, −1)\nFigure 3: A two-dimensional hexagonal coordinate system\nand |b −d| = 1) or (|a −c| = 1 and b = d) or (a −c = 1 and b −d = 1) or (a −c = −1\nand b −d = −1). For any two points x and y in shape(A), A(x) and A(y) are said to be\nneighbors exactly if x and y are neighbors.\nWe now define the TantrixTM rotation puzzle problems we are interested in, where the\nparameter k is chosen from {1, 2, 3, 4}:\nName: k-Color TantrixTM Rotation Puzzle (k-TRP, for short).\nInstance: A finite shape function A : Z2 →Tk, appropriately encoded as a string in Σ∗.\nQuestion: Is there a solution to the rotation puzzle defined by A, i.e., does there exist\na rotation of the given tiles in shape(A) such that the colors of the lines of any two\nadjacent tiles match at their joint edge?\nClearly, 1-TRP can be solved trivially, so 1-TRP is in P. On the other hand, Holzer\nand Holzer [HH04] showed that 4-TRP is NP-complete and that the infinite variant of\n4-TRP is undecidable. Baumeister and Rothe [BR07] investigated the counting and the\nunique variant of 4-TRP and, in particular, provided a parsimonious reduction from SAT\nto 4-TRP. In this paper, we study the three-color and two-color versions of this problem,\n3-TRP and 2-TRP, and their counting, unique, another-solution, and infinite variants.\nDefinition 2.1\n1. A solution to a k-TRP instance A specifies an orientation of each\ntile in shape(A) such that the colors of the lines of any two adjacent tiles match at\ntheir joint edge. Let Solk-TRP(A) denote the set of solutions of A.\n2. Define the counting version of k-TRP to be the function #k-TRP mapping from Σ∗\nto N such that #k-TRP(A) = ∥Solk-TRP(A)∥.\n3. Define the unique version of k-TRP as Unique-k-TRP = {A | #k-TRP(A) = 1}.\n4. Define the another-solution problem associated with k-TRP as\nAS-k-TRP = {(A, y1, . . . , yn) | y1, . . . , yn ∈Solk-TRP(A) and ∥Solk-TRP(A)∥> n}.\nThe above problems are defined for the case of finite problem instances. The infinite\nTantrixTM rotation puzzle problem with k colors (Inf-k-TRP, for short) is defined exactly\nas k-TRP, the only difference being that the shape function A is not required to be finite\nand is represented by the encoding of a Turing machine computing A : Z2 →Tk.\n8"},{"paragraph_id":"p9","order":9,"text":"3\nResults\n3.1\nParsimonious Reduction from SAT to 3-TRP\nTheorem 3.2 below is the main result of this section.\nNotwithstanding that our proof\nfollows the general approach of Holzer and Holzer [HH04], our specific construction and our\nproof of correctness will differ substantially from theirs. We will provide a parsimonious\nreduction from SAT to 3-TRP. Let Circuit∧,¬-SAT denote the problem of deciding, given a\nboolean circuit c with AND and NOT gates only, whether or not there is a satisfying truth\nassignment to the input variables of c. The NP-completeness of Circuit∧,¬-SAT was shown\nby Cook [Coo71]. The following lemma (stated, e.g., in [BR07]) is straightforward.\nLemma 3.1 SAT parsimoniously reduces to Circuit∧,¬-SAT.\nTheorem 3.2 SAT parsimoniously reduces to 3-TRP.\nProof.\nBy Lemma 3.1, it is enough to show that Circuit∧,¬-SAT parsimoniously reduces\nto 3-TRP. The resulting 3-TRP instance simulates a boolean circuit with AND and NOT\ngates such that the number of solutions of the rotation puzzle equals the number of satisfying\ntruth assignments to the variables of the circuit.\nGeneral remarks on our proof approach:\nThe rotation puzzle to be constructed from\na given circuit consists of different subpuzzles each using only three colors. The color green\nwas employed by Holzer and Holzer [HH04] only to exclude certain rotations, so we choose\nto eliminate this color in our three-color rotation puzzle. Thus, letting C3 contain the colors\nblue, red, and yellow, we have the tile set T3 = {t1, t2, . . . , t14}, where the enumeration of\ntiles corresponds to Figure 2(b). Furthermore, our construction will be parsimonious, i.e.,\nthere will be a one-to-one correspondence between the solutions of the given Circuit∧,¬-SAT\ninstance and the solutions of the resulting rotation puzzle instance. Note that part of our\nwork is already done, since some subpuzzles constructed in [BR07] use only three colors\nand they each have unique solutions. However, the remaining subpuzzles have to be either\nmodified substantially or to be constructed completely differently, and the arguments of why\nour modified construction is correct differs considerably from previous work [HH04, BR07].\nSince it is not so easy to exclude undesired rotations without having the color green\navailable, let us first analyze the 14 tiles in T3. For u, v ∈C3 and for each tile ti in T3,\nwhere 1 ≤i ≤14, Table 6 shows which substrings of the form uv occur in the color sequence\nof ti (as indicated by an • entry in row uv and column i). In the remainder of this proof,\nwhen showing that our construction is correct, our arguments will often be based on which\nsubstrings do or do not occur in the color sequences of certain tiles from T3, and Table 6\nmay then be looked up for convenience.\nHolzer and Holzer [HH04] consider a boolean circuit c on input variables x1, x2, . . . , xn\nas a sequence (α1, α2, . . . , αm) of computation steps (or “instructions”), and we adopt this\napproach here. For the ith instruction, αi, we have αi = xi if 1 ≤i ≤n, and if n+1 ≤i ≤m\nthen we have either αi = NOT(j) or αi = AND(j, k), where j ≤k < i.\nCircuits are\nevaluated in the standard way. We will represent the truth value true by the color blue and\nthe truth value false by the color red in our rotation puzzle.\n9"},{"paragraph_id":"p10","order":10,"text":"Rond\nBrid\nChin\nSint\nuv\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\nbb\n•\n•\n•\n•\n•\n•\nrr\n•\n•\n•\n•\n•\n•\nyy\n•\n•\n•\n•\n•\n•\nbr\n•\n•\n•\n•\n•\n•\n•\n•\n•\n•\nrb\n•\n•\n•\n•\n•\n•\n•\n•\n•\n•\nby\n•\n•\n•\n•\n•\n•\n•\n•\n•\n•\nyb\n•\n•\n•\n•\n•\n•\n•\n•\n•\n•\nry\n•\n•\n•\n•\n•\n•\n•\n•\n•\n•\nyr\n•\n•\n•\n•\n•\n•\n•\n•\n•\n•\nTable 6: Substrings uv that occur in the color sequences of the tiles in T3\nA technical difficulty in the construction results from the wire crossings that circuits\ncan have. To construct rotation puzzles from planar circuits, Holzer and Holzer use Mc-\nColl’s planar “cross-over” circuit with AND and NOT gates to simulate such wire cross-\nings [McC81], and in particular they employ Goldschlager’s log-space transformation from\ngeneral to planar circuits [Gol77]. For the details of this transformation, we refer to Holzer\nand Holzer’s work [HH04].\nWe use a different approach to overcome the difficulty caused by wire crossings. Our\nconstruction will employ a new subpuzzle for this purpose.\nHolzer and Holzer’s circuit\nconstruction uses several cross-over circuits, and each of them consists of twelve AND and\nnine NOT gates, and in addition it increases the number of instruction steps by 14. We will\navoid this blow-up by using the CROSS subpuzzle, which achieves a direct crossing of two\nadjacent wires in our TantrixTM puzzle and thus is much more efficient.\nFor the sake of comparison, we also present the original subpuzzles from Holzer and\nHolzer’s construction ([HH04]) in this section, with the following conventions: Tiles having\nmore than one possible orientation as well as tiles containing green lines will always have\na grey instead of a black edging, and modified or inserted tiles in our new subpuzzles will\nalways be highlighted by having a grey background.\nThis will illustrate the differences\nbetween our new and the previously known original subpuzzles.\nWire subpuzzles:\nWires of the circuit are simulated by the subpuzzles WIRE, MOVE,\nand COPY.\nA vertical wire is represented by a WIRE subpuzzle, which is shown in Figure 5. The\noriginal WIRE subpuzzle from [HH04] (see Figure 4) does not contain green but it does\nnot have a unique solution, while the WIRE subpuzzle from [BR07], which is not displayed\nhere, ensures the uniqueness of the solution but is using a tile with a green line. In the\noriginal WIRE subpuzzle, both tiles, a and b, have two possible orientations for each input\ncolor. Inserting two new tiles at positions x and y (see Figure 5) makes the solution unique.\nIf the input color is blue, tile x must contain one of the following color-sequence substrings\nfor the edges joint with tiles b and a: ry, rr, yy, or yr. If the input color is red, x must\ncontain one of these substrings: bb, yb, yy, or by. Tile t12 satisfies the conditions yy and\nry for the input color blue, and the conditions yb and yy for the input color red.\n10"},{"paragraph_id":"p11","order":11,"text":"The solution must now be fixed with tile y. The possible color-sequence substrings of y\nat the edges joint with a and b are rr and ry for the input color blue, and yb and bb for\nthe input color red. Tile t13 has exactly one of these sequences for each input color. Thus,\nthe solution for this subpuzzle contains only three colors and is unique.\nIN\nOUT\n(a) In: true\nIN\nOUT\n(b) In: false\nIN\na\nb\nOUT\n(c) Scheme\nFigure 4: Original WIRE subpuzzle, see [HH04]\nIN\nOUT\n(a) In: true\nIN\nOUT\n(b) In: false\nx\nIN\na\nb\nOUT\ny\n(c) Scheme\nFigure 5: Three-color WIRE subpuzzle\nThe MOVE subpuzzle is needed to move a wire by two positions to the left or to the\nright. The original MOVE subpuzzle from [HH04] contains only three colors but has several\nsolutions. One solution for each input color is shown in Figure 6, where the tiles with a\ngrey edging have more than one possible orientation.\nHowever, the modified subpuzzle\nfrom [BR07], which is presented in Figure 7, contains also only three colors but has a\nunique solution.\nIN\nOUT\n(a) In: true\nIN\nOUT\n(b) In: false\nFigure 6: Original MOVE subpuzzle, see [HH04]\n11"},{"paragraph_id":"p12","order":12,"text":"IN\nOUT\n(a) In: true\nIN\nOUT\n(b) In: false\nFigure 7: Three-color MOVE subpuzzle, see [BR07]\nThe COPY subpuzzle is used to “split” a wire into two copies. By the same arguments\nas above we can take the modified COPY subpuzzle from [BR07], which is presented in\nFigure 9. Figure 8 shows the original COPY subpuzzle from [HH04].\nOUT\nIN\nOUT\n(a) In: true\nOUT\nIN\nOUT\n(b) In: false\nFigure 8: Original COPY subpuzzle, see [HH04]\nOUT\nIN\nOUT\n(a) In: true\nOUT\nIN\nOUT\n(b) In: false\nFigure 9: Three-color COPY subpuzzle, see [BR07]\nThe last subpuzzle needed to simulate the wires of the circuit is our new CROSS sub-\npuzzle shown in Figure 10. This subpuzzle has two inputs and two outputs, and it ensures\n12"},{"paragraph_id":"p13","order":13,"text":"that the input colors will be swapped at the outputs. This subpuzzle uses only three colors\nand has unique solutions for each combination of input colors.\nIN\nOUT\nIN\nOUT\n(a) In: true, true\nIN\nOUT\nIN\nOUT\n(b) In: true, false\nIN\nOUT\nIN\nOUT\n(c) In: false, true\nIN\nOUT\nIN\nOUT\n(d) In: false, false\nIN\na\nc\nOUT\nb\ng\nj\nh\ne\ni\nk\nIN\nd\nf\nOUT\nl1\nm1\nn1\no1\np1\nq1\nr1\ns1\nt1 u1\nl2\nm2\nn2\no2\np2\nq2\nr2\ns2\nt2\nu2\n(e) Scheme\nFigure 10: CROSS subpuzzle\nThe CROSS subpuzzle can be subdivided into three distinct parts: the lower part con-\nsisting of tiles a through k, the upper left part consisting of tiles l1 through u1, and the\nupper right part consisting of tiles l2 through u2.\nLet us first consider the upper left part. Consider the three possible colors that can\noccur at the edge of tile j joint with tile m1.\nCase 1: Assume that the joint edge of these two tiles is blue. One possible orientation for\ntile m1 has yellow at the edge joint with tile l1. This leaves two possible orientations\nfor tile l1. The first one has red at the edge joint with tile n1, but n1 does not contain\n13"},{"paragraph_id":"p14","order":14,"text":"the color sequence yr. The second possible orientation has yellow at the edge joint\nwith tile n1, but this leads to blue at the edges of tiles m1 and n1 with tile o1. Since\no1 does not contain the color sequence bb this is not possible either. The orientation\nof tile m1 is now fixed with red at the edge joint with tile l1.\nThere are two orientations of tile l1, but they both have blue at the edge joint with\ntile n1. In the analysis of the lower part we will see that both solutions are needed.\nThe first one has yellow at the edge joint with tile j and the second one has blue at\nthis edge. The orientation of tile n1 is fixed with red and blue at the edges joint with\ntiles m1 and l1. Tile o1 has a fixed orientation due to the color-sequence substring\nbr at the edges joint with tiles m1 and n1. For tile p1 there are two orientations left,\nbecause this tile contains the color-sequence substring rb for the edges joint with tiles\no1 and n1, twice. The first one has red at the edge joint with tile r1 and yellow at\nthe edge joint with tile q1. Thus, it is not posibble that tile r1 has yellow at the edge\njoint with tile q1, since q1 does not contain the color-sequence substring yy. Neither\nis it possible that r1 has blue at the edge joint with tile q1, because this leads to\nthe color-sequence substring yr at the edges of tiles r1 and s1 with tile t1. So the\norientation of tile p1 is fixed with blue at the edge joint with tile q1 and yellow at the\nedge joint with tile r1. Tile r1 forces the edge joint with tile q1 to be red, and since s1\ndoes not contain the color sequence yy, the orientation of tiles r1 and s1 is fixed with\nblue at their joint edge. This immediately fixes the orientation of all other tiles, and\nthe output color at the left output tile will be blue.\nCase 2: Now we assume that the joint edge of tiles j and m1 is red. There are two possible\norientations for tile m1. The first one has red at the edge joint with tile l1 and blue\nat the edge joint with tile n1. This is not possible because then the joint edge of\ntiles l1 and n1 would have to be blue, but tile n1 does not contain the color-sequence\nsubstring bb. So the orientation of tile m1 is fixed with blue at the edge joint with\ntile l1 and yellow at the edges joint with tiles n1 and o1. Since n1 does not contain\nthe color-sequence substring yr, the orientation of tiles l1 and n1 is fixed with yellow\nat their joint edge. The joint edge of tiles o1 and p1 cannot be red, since p1 does not\ncontain the color-sequence substring rr for the edges joint with tiles o1 and n1, so the\njoint edge of tiles o1 and p1 is yellow, and their orientation is fixed.\nNow, there are two possible orientations for tile r1.\nThe first one with yellow at\nthe edge joint with tile s1 is not possible, since this would lead to the color-sequence\nsubstring yb for tile u1 at the edges joint with tiles r1 and t1. So we fix the orientation\nof tile r1 with yellow at the edge joint with tile q1. This also fixes the orientation of\ntile q1 with blue at the edge joint with tile s1. The edges of tile t1 joint with tiles r1\nand s1 are both yellow, and the orientation of all other tiles is fixed. The output of\nthe subpuzzle’s left output tile will thus be red.\nCase 3: The last possible color for the joint edge of tiles j and m1 is yellow. We first\nassume that the edge of tile m1 joint with tile l1 is blue.\nThere are two possible orientations for tile l1. The first one has yellow at the edge\njoint with tile n1 and thus is not possible, since n1 does not contain the color-sequence\nsubstring ry. The second one has red at the edge joint with tile n1. Since the edge of\n14"},{"paragraph_id":"p15","order":15,"text":"tile m1 joint with tile o1 is red, this is not possible either, because o1 does not contain\nthe color-sequence substring rb. So the orientation of tile m1 is fixed with yellow\nat the edge joint with tile l1. And since tile j does not contain the color-sequence\nsubstring by, the orientation of tile l1 is fixed as well\nThe given colors at the edges of tiles l1 and m1 immediately fix the orientation of\ntiles n1 and o1 with blue and yellow at the edges joint with tile p1, which contains the\ncolor-sequence substring by only once and so has a fixed orientation as well. Now we\nhave the same situation as in the previous case, since the joint edge of tile p1 with r1\nis blue and the joint edge of p1 with tile q1 is red. As to color red at the joint edge of\ntiles j and m1 this case will also result in a unique solution with the output color red\nat the left output tile.\nDue to symmetry the upper right part can be handled analogously with the upper left\npart. All Brid and Chin tiles are the same, and the Rond is replaced by the other Rond,\nand the Sint tiles are replaced by the respective other Sint tiles having a small arc of the\nsame color. So we obtain a symmetrical subpuzzle and similar arguments as for the upper\nleft part apply.\nWe now analyze the lower part of this subpuzzle. We first consider tiles a, b, and c. If\nthe left input is blue then there is only one possible solution to these tiles. Obviously tiles\na and c must have a vertical blue line, and since tile g does not contain the color-sequence\nsubstring by, the orientation of these three tiles is fixed with yellow at the edges of tiles\nb joint with tiles c and a. The orientation of tile g is fixed as well, since it contains the\ncolor-sequence substring br only once.\nIf the input to this part is red, we have a fixed\norientation with the color-sequence substring ry for the edges joint with tile g by similar\narguments. Note that tile g has two possible solutions left. Since tiles d, e, and f are the\nsame as tiles a, b, and c, and tile i is a mirrored tile g, the same arguments hold for the\nright input. To analyze the whole lower part, we will distinguish the following four possible\npairs of input colors:\n• First we assume that both input colors are blue (see Figure 10(a)). We have seen that\nthe orientation of tiles g and i is fixed with yellow at their edges joint with tile h,\nand red at their edges joint with tiles j and k, respectively. The orientation of tile\nh is fixed with red at the edges joint with tiles j and k, and so they are fixed with\nthe color-sequence substring by for the edges joint with tiles l1 and m1 and with the\ncolor-sequence substring yb for the edges joint with tiles m2 and l2. In the analysis\nof the upper part we have seen, that both output colors will be blue in this case, as\ndesired.\n• Now, let the right input color be blue and let the left input color be red (see Fig-\nure 10(c)). The two possible colors for tile g joint with tile h are blue and red. The\ncolor for the joint edge of tiles i and h is yellow, and since h contains the color-sequence\nsubstring yxb but not yxr, where x stands for an arbitrary color (chosen among blue,\nred, and yellow), the orientation of tiles g and h is fixed. This also fixes the orientation\nof tiles j and k. Tile j has blue at the edges joint with tiles l1 and m1, and (as we\nhave seen in the analysis of the upper part) the left output color will be blue, just like\nthe right input color. The edges of tile k joint with tiles m2 and l2 are yellow, and so\nthe right output color will be red, as desired.\n15"},{"paragraph_id":"p16","order":16,"text":"• The case of blue being the left input color and red being the right input color (see\nFigure 10(b)) is similar to the second case.\nThe output colors will again be the\nexchanged input colors, as desired.\n• The last case is that both input colors are red (see Figure 10(d)). We have seen that\nthe two possible colors for tiles g and i joint with tile h are blue and red. Obviously,\nthey cannot both be blue. If the joint edge of tiles g and h is blue, the joint edges of\ntiles g and h with j are both yellow. This is not possible, because the combination of\nblue at the joint edge of tiles j and l1 and red at the joint edge of tiles j and m1 is\nnot possible. The case of blue at the edge of tile i joint with tile h is not possible due\nto similar arguments for tile k and the upper right part. So the edges of tiles g and i\njoint with tile h must both be red. This leads to red at the edges of tile j joint with\nthe upper left part, and tile k joint with the upper right part. We have already seen\nthat this combination leads to both output colors being red, as desired.\nSo we have unique solutions with the desired effect of exchanging the input colors at the\noutput tiles for all four possible combinations of input colors for the CROSS subpuzzle.\nGate subpuzzles:\nThe boolean gates AND and NOT are represented by the AND and\nNOT subpuzzles. Both the original four-color NOT subpuzzle from [HH04] (see Figure 11)\nand the modified four-color NOT subpuzzle from [BR07], which is not displayed here, use\ntiles with green lines to exclude certain rotations. Our three-color NOT subpuzzle is shown\nin Figure 12. Tiles a, b, c, and d from the original NOT subpuzzle shown in Figure 11\nremain unchanged. Tiles e, f, and g in this original NOT subpuzzle ensure that the output\ncolor will be correct, since the joint edge of e and b is always red. So for our new NOT\nsubpuzzle in Figure 12, we have to show that the edge between tiles x and b is always red,\nand that we have unique solutions for both input colors.\nFirst, let the input color be blue and suppose for a contradiction that the joint edge\nof tiles b and x were blue. Then the joint edge of tiles b and c would be yellow. Since x\nis a tile of type t13 and so does not contain the color-sequence substring substring bb, the\nedge between tiles c and x must be yellow. But then the edges of tile w joint with tiles c\nand x must both be blue. This is not possible, however, because w (which is of type t10)\ndoes not contain the color-sequence substring substring bb. So if the input color is blue,\nthe orientation of tile b is fixed with yellow at the edge of b joint with tile y, and with red\nat the edges of b joint with tiles c and x. This already ensures that the output color will\nbe red, because tiles c and d behave like a WIRE subpuzzle. Tile x does not contain the\ncolor-sequence substring br, so the orientation of tile c is also fixed with blue at the joint\nedge of tiles c and w. As a consequence, the joint edge of tiles w and d is yellow, and due\nto the fact that the joint edge of tiles w and x is also yellow, the orientation of w and d is\nfixed as well. Regarding tile a, the edge joint with tile y can be yellow or red, but tile x\nhas blue at the edge joint with tile y, so the joint edge of tiles y and a is yellow, and the\norientation of all tiles is fixed for the input color blue. The case of red being the input color\ncan be handled analogously.\nThe most complicated figure (besides the CROSS) is the AND subpuzzle. The original\nfour-color version from [HH04] (see Figure 13) uses four tiles with green lines and the\nmodified four-color AND subpuzzle from [BR07], which is not displayed here, uses seven\n16"},{"paragraph_id":"p17","order":17,"text":"IN\nOUT\n(a) In: true\nIN\nOUT\n(b) In: false\nf\ng\ne\nIN\na\nb\nc\nd\nOUT\n(c) Scheme\nFigure 11: Original NOT subpuzzle, see [HH04]\nIN\nOUT\n(a) In: true\nIN\nOUT\n(b) In: false\ny\nx\nw\nIN\na\nb\nc\nd\nOUT\n(c) Scheme\nFigure 12: Three-color NOT subpuzzle\ntiles with green lines. Figure 14 shows our new AND subpuzzle using only three colors and\nhaving unique solutions for all four possible combinations of input colors. To analyze this\nsubpuzzle, we subdivide it into a lower and an upper part. The lower part ends with tile c\nand has four possible solutions (one for each combination of input colors), while the upper\npart, which begins with tile j, has only two possible solutions (one for each possible output\ncolor). The lower part can again be subdivided into three different parts.\nThe lower left part contains the tiles a, b, x, and h. If the input color to this part is blue\n(see Figures 14(a) and 14(b)), the joint edge of tiles b and x is always red, and since tile\nx (which is of type t11) does not contain the color-sequence substring rr, the orientation\nof tiles a and x is fixed. The orientation of tiles b and h is also fixed, since h (which is of\ntype t2) does not contain the color-sequence substring by but the color-sequence substring\nyy for the edges joint with tiles b and x. By similar arguments we obtain a unique solution\nfor these tiles if the left input color is red (see Figures 14(c) and 14(d)). The connecting\nedge to the rest of the subpuzzle is the joint edge between tiles b and c, and tile b will have\nthe same color at this edge as the left input color.\nTiles d, e, i, w, and y form the lower right part. If the input color to this part is blue\n(see Figures 14(a) and 14(c)), the joint edge of tiles d and y must be yellow, since tile y\n(which is of type t9) does not contain the color-sequence substrings rr nor ry for the edges\njoint with tiles d and e. Thus the joint edge of tiles y and e must be yellow, since i (which\n17"},{"paragraph_id":"p18","order":18,"text":"IN\nOUT\nIN\n(a) In: true, true\nIN\nOUT\nIN\n(b) In: true, false\nIN\nOUT\nIN\n(c) In: false, true\nIN\nOUT\nIN\n(d) In: false, false\nh\nIN\na\nb\nc\nj\nk\ng\nl\nm\nn\nOUT\nf\no\nIN\nd\ne\np\nq\ni\n(e) Scheme\nFigure 13: Original AND subpuzzle, see [HH04]\n18"},{"paragraph_id":"p19","order":19,"text":"IN\nOUT\nIN\n(a) In: true, true\nIN\nOUT\nIN\n(b) In: true, false\nIN\nOUT\nIN\n(c) In: false, true\nIN\nOUT\nIN\n(d) In: false, false\nx\nh\nIN\na\nb\nv\nc\nj\nk\ng\nl\nm\nn\nOUT\nw\nu\no\nIN\nd\ne\ny\ni\n(e) Scheme\nFigure 14: Three-color AND subpuzzle\nis of type t6) does not contain the color-sequence substring bb for the edges joint with tiles\ny and e. This implies that the tiles i and w also have a fixed orientation. If the input color\nto the lower right part is red (see Figures 14(b) and 14(d)), a unique solution is obtained\nby similar arguments. The connection of the lower right part to the rest of the subpuzzle is\nthe edge between tiles w and g. If the right input color is blue, this edge will also be blue,\nand if the right input color is red, this edge will be yellow.\nThe heart of the AND subpuzzle is its lower middle part, formed by the tiles c and g.\nThe colors at the joint edge between tiles b and c and at the joint edge between tiles w and\ng determine the orientation of the tiles c and g uniquely for all four possible combinations of\ninput colors. The output of this part is the color at the edge between c and j. If both input\ncolors are blue, this edge will also be blue, and otherwise this edge will always be yellow.\nThe output of the whole AND subpuzzle will be red if the edge between c and j is\nyellow, and if this edge is blue then the output of the whole subpuzzle will also be blue. If\nthe input color for the upper part is blue (see Figure 14(a)), each of the tiles j, k, l, m,\nand n has a vertical blue line. Note that since the colors red and yellow are symmetrical\nin these tiles, we would have several possible solutions without tiles o, u, and v. However,\ntile v (which is of type t9) contains neither rr nor ry for the edges joint with tiles k and j,\nso the orientation of the tiles j through n is fixed, except that tile n without tiles o and u\nwould still have two possible orientations. Tile u (which is of type t2) is fixed because of\n19"},{"paragraph_id":"p20","order":20,"text":"OUT\n(a) Out: true\nOUT\n(b) Out: false\na\nb\nOUT\nc\n(c) Scheme\nFigure 15: Original BOOL subpuzzle, see [HH04]\nits color-sequence substring yy at the edges joint with l and m, so due to tiles o and u the\nonly color possible at the edge between n and o is yellow, and we have a unique solution.\nIf the input color for the upper part is yellow (see Figures 14(b)–(d)), we obtain unique\nsolutions by similar arguments. Hence, this new AND subpuzzle uses only three colors and\nhas unique solutions for each of the four possible combinations of input colors.\nOUT\n(a) Out: true\nOUT\n(b) Out: false\nx\nb\nc\na\nOUT\nd\n(c) Scheme\nFigure 16: Three-color BOOL subpuzzle\nInput and output subpuzzles:\nThe input variables of the boolean circuit are repre-\nsented by the subpuzzle BOOL. The original four-color BOOL subpuzzle from [HH04] is\nshown in Figure 15. Our new three-color BOOL subpuzzle is presented in Figure 16, and\nsince it is completely different from the original subpuzzle, no tiles are marked here. This\nsubpuzzle has only two possible solutions, one with the output color blue (if the corre-\nsponding variable is true), and one with the output color red (if the corresponding variable\nis false). The original four-color BOOL subpuzzle from [HH04] (which was not modified\nin [BR07]) contains tiles with green lines to exclude certain rotations.\nOur three-color\nBOOL subpuzzle does not contain any green lines, but it might not be that obvious that\nthere are only two possible solutions, one for each output color.\nFirst, we show that the output color yellow is not possible. If the output color were\nyellow, there would be two possible orientations for tile a. In the first orientation, the joint\nedge between a and b is blue. This is not possible, however, since c (which is a Chin, namely\na tile of type t8) does not contain the color-sequence substring rr. By a similar argument\nfor tile d, the other orientation with the output color yellow is not possible either.\nSecond, we show that tile x makes the solution unique. For the output color blue, there\nare two possible orientations for each of the tiles a, b, c, and d. In order to exclude one of\nthese orientations in each case, tile x must contain either of the color-sequence substrings\nbr or yr at its edges joint with tiles b and c. On the other hand, for the output color red, tile\nx must not contain the color-sequence substring ry at its edges joint with b and c, because\n20"},{"paragraph_id":"p21","order":21,"text":"IN\n(a) TEST-true\nIN\n(b) TEST-false\nd\nIN\na\nc\nb\n(c) Scheme\nFigure 17: Original TEST subpuzzles, see [HH04]\nthis would leave two possible orientations for tile d. Tile t1 satisfies all these conditions and\nmakes the solution of the BOOL subpuzzle unique, while using only three colors.\nIN\n(a) TEST-true\nIN\n(b) TEST-false\nd\nx\nIN\na\nc\nb\n(c) Scheme\nFigure 18: Three-color TEST subpuzzles\nFinally, a subpuzzle is needed to check whether or not the circuit evaluates to true.\nThis is achieved by the subpuzzle TEST-true shown in Figure 18(a). It has only one valid\nsolution, namely that its input color is blue. Just like the subpuzzle BOOL, the original\nfour-color TEST-true subpuzzle from [HH04], which is shown in Figure 17(a) and which\nwas not modified in [BR07], uses green lines to exclude certain rotations. Again, since the\nnew TEST-true subpuzzle is completely different from the original subpuzzle, no tiles are\nmarked here. Note that in the three-color TEST-true subpuzzle of Figure 18(a), a and c\nare the same tiles as a and b in the WIRE subpuzzle of Figure 5. To ensure that the input\ncolor is blue, we have to consider all possible color-sequence substrings at the edges of d\njoint with c and a, and at the edges of b joint with a and c. For each input color, there are\nfour possibilities.\nAssume that the input color is red. Then the possible color-sequence substrings for tile\nd at the edges joint with c and a are: bb, yb, yy, and by. Similarly, the possible color-\nsequence substrings for tile b at the edges joint with a and c are: yy, yb, bb, and by. Tile\nt14 at position d excludes by and yy, while tile t11 at position b excludes yy and yb. Thus,\nred is not possible as the input color. The input color yellow can be excluded by similar\narguments. It follows that blue is the only possible input color. It is clear that the tiles a\nand c have a vertical blue line. Due to the fact that neither t11 nor t14 contains the color-\nsequence substrings rr or yy for the edges joint with tiles a and c, two possible solutions\nare still left. The color-sequence substrings for these solutions at the edges of x joint with\nc and d are ry and yr. Since tile t2 at position x contains the former but not the latter\nsequence, the TEST-true subpuzzle uses only three colors and has a unique solution.\n(Note: The TEST-false subpuzzles in Figures 18(b) and 24(e) will be needed for a\ncircuit construction in Section 3.3, see Figure 25.\nIn particular, the three-color TEST-\nfalse subpuzzle in Figure 18(b) is identical to the three-color TEST-true subpuzzle from\n21"},{"paragraph_id":"p22","order":22,"text":"Figure 18(a), except that the colors blue and red are exchanged. By the above argument,\nthe TEST-false subpuzzle has only one valid solution, namely that its input color is red.)\nThe shapes of the subpuzzles constructed above have changed slightly. However, by\nHolzer and Holzer’s argument [HH04] about the minimal horizontal distance between two\nwires and/or gates being at least four, unintended interactions between the subpuzzles do\nnot occur. This concludes the proof of Theorem 3.2.\n❑\nTheorem 3.2 immediately gives the following corollary.\nCorollary 3.3 3-TRP is NP-complete.\nSince the tile set T3 is a subset of the tileset T4, we have 3-TRP ≤p\nm 4-TRP. Thus, the\nhardness results for 3-TRP and its variants proven in this paper immediately are inherited\nby 4-TRP and its variants, which provides an alternative proof of these hardness results for\n4-TRP and its variants established in [HH04, BR07]. In particular, Corollary 3.4 follows\nfrom Theorem 3.2 and Corollary 3.3.\nCorollary 3.4 ([HH04, BR07]) 4-TRP is NP-complete, via a parsimonious reduction\nfrom SAT.\n3.2\nParsimonious Reduction from SAT to 2-TRP\nIn contrast to the above-mentioned fact that 3-TRP ≤p\nm 4-TRP holds trivially, the reduction\n2-TRP ≤p\nm 3-TRP (which we will show to hold due to both problems being NP-complete,\nsee Corollaries 3.3 and 3.6) is not immediatedly straightforward, since the tile set T2 is not\na subset of the tile set T3 (recall Figure 2 in Section 2). In this section, we study 2-TRP\nand its variants. Our main result here is Theorem 3.5 below.\nTheorem 3.5 SAT parsimoniously reduces to 2-TRP.\nProof.\nAs in the proof of Theorem 3.2, we again provide a reduction from Circuit∧,¬-SAT,\nbut here we use McColl’s planar cross-over circuit [McC81] instead of a CROSS subpuzzle.4\nWe choose our color set C2 to contain the colors blue and red (corresponding to the\ntruth values true and false), and we use the tileset T2 shown in Figure 2(a). To simulate a\nboolean circuit with AND and NOT gates, we now present the subpuzzles constructed only\nwith tiles from T2.\nWire subpuzzles:\nWe again use Brid tiles with a straight blue line to construct the\nWIRE subpuzzle with the colors blue and red as shown in Figure 19. If the input color is\nblue, then tiles a and b must have a vertical blue line, so the output color will be blue. If\nthe input color is red, then the edge between a and b must be red too, and it follows that\nthe ouput color will also be red. Tile x forces tiles a and b to fix the orientation of the blue\n4Whether there exists an analogous two-color CROSS subpuzzle to simplify this construction, is still an\nopen question.\n22"},{"paragraph_id":"p23","order":23,"text":"line for the input color red. Since we care only about distinct color sequences of the tiles\n(recall the remarks made in Section 2.2.1),5 we have unique solutions for both input colors.\nNote that this construction allows wires of arbitrary height, unlike the WIRE subpuzzle\nconstructed in the proof of Theorem 3.2 or the WIRE subpuzzles constructed in [HH04,\nBR07], which all are constructed so as to have even height. To construct two-color WIRE\nsubpuzzles of arbitrary height, tile x of type t8 in Figure 19 would have to be placed on\nalternating sides of tiles a, b, etc. in each level.\nIN\nOUT\n(a) In: true\nIN\nOUT\n(b) In: false\nx\nIN\na\nb\nOUT\n(c) Scheme\nFigure 19: Two-color WIRE subpuzzle\nThe two-color MOVE subpuzzle is shown in Figure 20. Just like the WIRE subpuzzle,\nit consists only of tiles of types t3 and t8 (see Figure 2(a)). For the input color blue, it is\nobvious that all tiles must have vertical blue lines and so the output color is also blue. If the\ninput color is red, then the edge between a and b is red, too. Since neither c nor d contains\nthe color-sequence substring bb, the blue lines of these four tiles have all the same direction.\nThe same argument applies to tiles e and f, and since tiles f, g, and x behave like a WIRE\nsubpuzzle, the output color will be red in this case. As above, since we care only about the\ncolor sequences of the tiles, we obtain unique solutions for both input colors.\nNote that Figure 20 shows a move to the right.\nA move to the left can be made\nsymmetrically, simply by mirroring this subpuzzle.\nIN\nOUT\n(a) In: true\nIN\nOUT\n(b) In: false\nIN\na\nb\nc\nd\ne\nf\ng\nOUT\nx\n(c) Scheme\nFigure 20: Two-color MOVE subpuzzle\n5By contrast, if we were to count all distinct orientations of the tiles even if they have identical color\nsequences, we would obtain two solutions each for tiles a and b, and six solutions for tile x, which gives a\ntotal of 24 solutions for each input color in the WIRE subpuzzle. However, as argued in Section 2.2.1, since\nour focus is on the color sequences, we have unique solutions and thus a parsimonious reduction from SAT\nto 2-TRP.\n23"},{"paragraph_id":"p24","order":24,"text":"OUT\nIN\nOUT\n(a) In: true\nOUT\nIN\nOUT\n(b) In: false\ny\nj\nk\nl\nOUT\nh\ni\nIN\na\nb\nc\nd\ne\nf\ng\nOUT\nx\n(c) Scheme\nFigure 21: Two-color COPY subpuzzle\nThe last subpuzzle needed to simulate the wires of the boolean circuit is the COPY\nsubpuzzle in Figure 21. This subpuzzle is akin to the subpuzzle obtained by mirroring the\nMOVE subpuzzle in both directions,6 so similar arguments as above work. Again, since we\ndisregard the repetitions of color sequences, we have unique solutions for both input colors.\nGate subpuzzles:\nThe construction of the NOT subpuzzle presented in Figure 22 is\nsimilar to the corresponding subpuzzle with three colors (see Figure 12). Tiles b and d in\nthe two-color version allow only two possible orientations of tile c, one for each input color.\nThe first one has blue at the edge joint with a and, consequently, red at the edge joint\nwith e; the second possible orientation has the same colors exchanged. Since tiles e, f, and\nx behave like a WIRE subpuzzle, the output color will “negate” the input color, i.e., the\noutput color will be blue if the input color is red, and it will be red if the input color is blue.\nTile x fixes the orientation of tiles f and e and the orientation of tile a is fixed by tile b.\nWe again obtain unique solutions, since we focus on color sequences.\nIN\nOUT\n(a) In: true\nIN\nOUT\n(b) In: false\nb\nx\nIN\na\nc\ne\nf\nOUT\nd\n(c) Scheme\nFigure 22: Two-color NOT subpuzzle\n6We here say “is akin to. . . ” because the COPY subpuzzle in Figure 21 differs from a true two-sided\nmirror version of MOVE by having a tile of type t3 at position y instead of a t8 as in position x. Why? By\nthe arguments for the MOVE subpuzzle, tile x already fixes the orientation of tiles a through k but not of l\n(if the input color is red, see Figure 21(b)). The orientation of tile l is then fixed by a t3 tile at position y,\nsince obviously a t8 would not lead to a solution. However, it is clear that an argument analogous to that\nfor the MOVE subpuzzle shows that all blue lines (except that of g in Figure 21(b)) have the same direction.\n24"},{"paragraph_id":"p25","order":25,"text":"IN\nOUT\nIN\n(a) In: true, true\nIN\nOUT\nIN\n(b) In: true, false\nIN\nOUT\nIN\n(c) In: false, true\nIN\nOUT\nIN\n(d) In: false, false\nb\ns\nIN\na\nc\ne\nf\ng\nr\nd\nt\no\nq\nu\nv\nx\nOUT\ni\nm\np\nw\nIN\nh\nj\nl\nn\nk\nz1\nz2\nz3\n(e) Scheme\nFigure 23: Two-color AND subpuzzle\nThe AND subpuzzle is again the most complicated one. To analyze this subpuzzle, we\nsubdivide it into three disjoint parts:\n1. The first part consists of the tiles a through g, z1, and z2. Tiles a through f and z2\nform a two-color NOT subpuzzle, and tile g passes the color at the edge between tiles\nf and g on to the edge between tiles g and r. So the negated left input color will be\nat the edge between tiles g and r. Tile z1 fixes the orientation of tile g to obtain a\nunique solution for this part of the subpuzzle.\n2. The second part is formed by the tiles h through q, and z3. This part is made from a\ntwo-color NOT and a two-color MOVE subpuzzle to negate the right input and move\nit by two positions to the left, which both are slightly modified with respect to the\nNOT in Figure 22 and the MOVE in Figure 20.\nFirst, the minor differences between the move-to-the-left analog of the MOVE subpuz-\nzle from Figure 20 and this modified MOVE subpuzzle as part of the AND subpuzzle\nare the following: (a) tile z3 is positioned to the right of tiles q and u and not to their\nleft, and (b) z3 is a t3 tile, whereas the tile at position x in Figure 20 is of type t8.\n25"},{"paragraph_id":"p26","order":26,"text":"However, it is clear that the orientation of the blue lines of tiles l through q is fixed\nby tile k, and z3 enforces u and q to have the same direction of blue lines.\nSecond, the minor difference between the NOT from Figure 22 and this modified NOT\nsubpuzzle as part of the AND subpuzzle is that tile m is not of type t8 (as is the x in\nFigure 22) but of type t3, since the modified NOT and MOVE subpuzzles have been\nmerged. These changes are needed to ensure that we get a suitable height for this\npart of the AND subpuzzle. However, it is again clear that the orientation of the blue\nlines of tiles l through q is fixed by tile k.\n3. Finally, the third part, formed by the tiles r through x, behaves like a two-color\nsubpuzzle simulating a boolean NOR gate, which is defined as ¬(α ∨β) ≡¬α ∧¬β.\nThe two inputs to the NOR subpuzzle come from the edges between g and r and\nbetween q and u.\nIf the left input color (at the edge between g and r) is red, then tiles s and z1 ensure\nthat the edge between r and t will also be red. If the left input color is blue, then the\nedge between r and t will be blue by similar arguments, and since tile t is of type t3,\nit passes this input color on to its joint edge with v in both cases. The right input\nto the upper part (at the edge between q and u) is passed on by tile u to the edge\nbetween u and v.\nNow, we have both input colors at the edges between t and v and between u and v.\nIf both of these edges are red (see Figure 23(a)), then tile w enforces that the edge\nbetween v and x will be blue. On the other hand, if one or both of v’s edges with t\nand u are blue, then v’s short blue arc must be at these edges, which enforces that the\ncolor at the edge between v and x will be red. Finally, tile x passes the color at the\nedge joint with tile v to the output. With the negated inputs of the first and second\npart, this subpuzzle behaves like an AND gate, i.e., as a whole this subpuzzle simulates\nthe computation of the boolean function AND: ¬(¬α ∨¬β) ≡¬¬α ∧¬¬β ≡α ∧β.\nAgain, since we care only about the color sequences of the tiles, we obtain unique solutions\nfor each pair of input colors.\nOUT\n(a) BOOL Out: true\nOUT\n(b) BOOL Out: false\na\nOUT\nx\n(c) BOOL Scheme\nIN\n(d) TEST-true\nIN\n(e) TEST-false\nIN\na\n(f) TEST Scheme\nFigure 24: Two-color BOOL and TEST subpuzzles\n26"},{"paragraph_id":"p27","order":27,"text":"Input and output subpuzzles:\nThe input variables of the circuit are simulated by the\nsubpuzzle BOOL. Constructing a subpuzzle with the only possible outputs blue or red is\nquite easy, since all tiles except t7 and t8 satisfy this condition. Figures 24(a)–(c) show our\ntwo-color BOOL subpuzzle. Note that tile x ensures the uniqueness of the solutions.\nThe last step is to check if the output of the whole circuit is true. This is done by the\nsubpuzzle TEST-true shown in Figure 24(d), which sits on top of the subpuzzle simulating\nthe circuit’s output gate. Since tile t7 contains only blue lines, the solution is unique.\n(Note: The subpuzzle TEST-false in Figure 24(e) will again be needed in Section 3.3, see\nFigure 25. It has only red lines, so the input is always red and the solution is unique.) ❑\nTheorem 3.5 immediately gives the following corollary.\nCorollary 3.6 2-TRP is NP-complete.\n3.3\nComplexity of the Unique, Another-Solution, and Infinite Variants\nof 3-TRP and 2-TRP\nParsimonious reductions preserve the number of solutions and, in particular, the uniqueness\nof solutions.\nThus, Theorems 3.2 and 3.5 imply Corollary 3.7 below that also employs\nValiant and Vazirani’s results on the DP-hardness of Unique-SAT under ≤p\nran-reductions\n(which were defined in Section 2). The proof of Corollary 3.7 follows the lines of the proof\nof [BR07, Theorem 6], which states the analogous result for Unique-4-TRP in place of\nUnique-3-TRP and Unique-2-TRP.\nCorollary 3.7\n1. Unique-SAT parsimoniously reduces to the problems Unique-3-TRP\nand Unique-2-TRP.\n2. Both Unique-3-TRP and Unique-2-TRP are DP-complete under ≤p\nran-reductions.\nWe now turn to the another-solution problems for k-TRP.\nCorollary 3.8\n1. For each k ∈{2, 3, 4}, SAT ≤p\nasp k-TRP.\n2. For k ∈{2, 3, 4}, AS-k-TRP is NP-complete.\nProof.\nIn Sections 3.1 and 3.2, we showed a parsimonious reduction from Circuit∧,¬-SAT\nto 3-TRP and 2-TRP.\nTo prove the first part of this corollary, we have to show (see\nSection 2.1) that there is a polynomial-time computable function bijectively mapping the\nsolutions of any given Circuit∧,¬-SAT instance C to the solutions of the k-TRP instance\ncorresponding to C, for each k ∈{2, 3, 4}. However, note that a satisfying assignment to the\nvariables of the circuit C immediately gives the solution for the BOOL subpuzzles according\nto our reduction for k-TRP, see the proof of Theorem 3.5 (for k = 2), of Theorem 3.2 (for\nk = 3), and of the result presented for 4-TRP in [BR07] (for k = 4).\nIn each case, our circuit is constructed as a sequence of steps, so the solutions for the\nBOOL subpuzzles determine the color at the input for all subpuzzles at the next step,\nand so on. Since all subpuzzles have unique solutions we can construct a solution to our\npuzzle in polynomial time from bottom to top using the parsimonious reductions mentioned\nabove. Now, given the assignment of the variables, we just have to place the tiles of the\n27"},{"paragraph_id":"p28","order":28,"text":"AND\nTEST−true\n(a) Empty word not accepted\nAND\nTEST−false\n(b) Empty word accepted\nFigure 25: Two choices for the ith layer of the infinite circuit for Inf-2-TRP and Inf-3-TRP\nsingle subpuzzles according to the determined solution and so specify their orientation.\nConversely, if we have a solution of a resulting k-TRP instance for k ∈{2, 3, 4}, the output\ncolors at the BOOL subpuzzles gives the corresponding satisfying assignment to the variables\nof the circuit.\nTo prove the second part of Corollary 3.8, note that AS-SAT is NP-complete [YS02], and\nsince the parsimonious reduction from SAT to Circuit∧,¬-SAT provides a bijective transfor-\nmation between these problems’ solution sets, AS-Circuit∧,¬-SAT is also NP-complete. It\nfollows immediately, that the problems AS-3-TRP and AS-2-TRP are NP-complete. Fur-\nthermore, AS-4-TRP inherits the NP-completeness result from AS-3-TRP.\n❑\nHolzer and Holzer [HH04] proved that Inf-4-TRP, the infinite TantrixTM rotation puzzle\nproblem with four colors, is undecidable, via a reduction from (the complement of) the\nempty-word problem for Turing machines. The proof of Theorem 3.9 below uses essentially\nthe same argument but is based on our modified three-color and two-color constructions.\nTheorem 3.9 Both Inf-2-TRP and Inf-3-TRP are undecidable.\nProof.\nThe empty-word problem for Turing machines asks whether the empty word, λ,\nbelongs to the language L(M) accepted by a given Turing machine M. By Rice’s Theo-\nrem [Ric53], both this problem and its complement are undecidable. To reduce the latter\nproblem to either Inf-2-TRP or Inf-3-TRP, we do the following. Let Mi denote the simu-\nlation of a Turing machine M for exactly i steps. Then, Mi accepts its input if and only if\nM accepts the input within i steps.\nWe employ another circuit construction that will be simulated by a TantrixTM rotation\npuzzle. First, two wires are initialized with the boolean value true. Then, in each step, we\nuse either the circuit shown in Figure 25(a) or the one shown in Figure 25(b). The former\ncircuit is chosen in step i if λ /∈L(Mi), and the latter one is chosen in step i if λ ∈L(Mi).\nTo transform this circuit into an Inf-k-TRP instance, where k is either two or three, we use\nthe TEST-true subpuzzle from either Figure 18(a) or Figure 24(d), rotated by 180 degrees\nand with the “IN” tile becoming an “OUT” tile, in order to initialize both wires with the\ninput true. Then we substitute the single layers of the circuit by the subpuzzles described\nabove, step by step, always choosing either the circuit from Figure 25(a) (where TEST-true\nis the subpuzzle from Figure 18(a) if k = 3, or from Figure 24(d) if k = 2), or the circuit\n28"},{"paragraph_id":"p29","order":29,"text":"from Figure 25(b) (where TEST-false is the subpuzzle from Figure 18(b) if k = 3, or from\nFigure 24(e) if k = 2).\nSince both wires are initialized with the value true, it is obvious that the constructed\nsubpuzzle has a solution if and only if λ /∈L(M). Note that the layout of the circuit is\ncomputable, and our reduction will output the encoding of a Turing machine computing first\nthis circuit layout and then the transformation to the TantrixTM rotation puzzle as described\nabove. By this reduction, both Inf-2-TRP and Inf-3-TRP are shown to be undecidable. ❑\n4\nConclusions\nThis paper studied the three-color and two-color TantrixTM rotation puzzle problems,\n3-TRP and 2-TRP, and their unique, another-solution, and infinite variants. Our main\ncontribution is that both 3-TRP and 2-TRP are NP-complete via a parsimonious reduc-\ntion from SAT, which in particular solves a question raised by Holzer and Holzer [HH04].\nSince restricting the number of colors to three and two, respectively, drastically reduces the\nnumber of TantrixTM tiles available, our constructions as well as our correctness arguments\nsubstantially differ from those in [HH04, BR07]. Table 1 in Section 1 shows that our results\ngive a complete picture of the complexity of k-TRP, 1 ≤k ≤4. An interesting question\nstill remaining open is whether the analogs of k-TRP without holes still are NP-complete.\nAcknowledgments: We are grateful to Markus Holzer and Piotr Faliszewski for inspiring\ndiscussions on TantrixTM rotation puzzles, and we thank Thomas Baumeister for his help\nwith producing reasonably small figures. We thank the anonymous LATA 2008 referees for\nhelpful comments, and in particular the referee who let us know that he or she has also\nwritten a program for verifying the correctness of our constructions.\nReferences\n[BR]\nD. Baumeister and J. Rothe. The three-color and two-color TantrixTM rotation\npuzzle problems are NP-complete via parsimonious reductions. In Proceedings\nof the 2nd International Conference on Language and Automata Theory and\nApplications. Springer-Verlag Lecture Notes in Computer Science. To appear.\n[BR07]\nD. Baumeister and J. Rothe.\nSatisfiability parsimoniously reduces to the\nTantrixTM rotation puzzle problem. In Proceedings of the 5th Conference on\nMachines, Computations and Universality, pages 134–145. Springer-Verlag Lec-\nture Notes in Computer Science #4664, September 2007.\n[CGH+88] J. Cai, T. Gundermann, J. Hartmanis, L. Hemachandra, V. Sewelson, K. Wag-\nner, and G. Wechsung. The boolean hierarchy I: Structural properties. SIAM\nJournal on Computing, 17(6):1232–1252, 1988.\n[CGH+89] J. Cai, T. Gundermann, J. Hartmanis, L. Hemachandra, V. Sewelson, K. Wag-\nner, and G. Wechsung. The boolean hierarchy II: Applications. SIAM Journal\non Computing, 18(1):95–111, 1989.\n29"},{"paragraph_id":"p30","order":30,"text":"[CKR95]\nR. Chang, J. Kadin, and P. Rohatgi. On unique satisfiability and the threshold\nbehavior of randomized reductions. Journal of Computer and System Sciences,\n50(3):359–373, 1995.\n[Coo71]\nS. Cook.\nThe complexity of theorem-proving procedures.\nIn Proceedings of\nthe 3rd ACM Symposium on Theory of Computing, pages 151–158. ACM Press,\n1971.\n[Dow05]\nK. Downing. Tantrix: A minute to learn, 100 (genetic algorithm) generations\nto master. Genetic Programming and Evolvable Machines, 6(4):381–406, 2005.\n[Gol77]\nL. Goldschlager. The monotone and planar circuit value problems are log space\ncomplete for P. SIGACT News, 9(2):25–29, 1977.\n[Gr ̈a90]\nE. Gr ̈adel.\nDomino games and complexity.\nSIAM Journal on Computing,\n19(5):787–804, 1990.\n[HH04]\nM. Holzer and W. Holzer. TantrixTM rotation puzzles are intractable. Discrete\nApplied Mathematics, 144(3):345–358, 2004.\n[McC81]\nW. McColl. Planar crossovers. IEEE Transactions on Computers, C-30(3):223–\n225, 1981.\n[Pap94]\nC. Papadimitriou. Computational Complexity. Addison-Wesley, 1994.\n[PY84]\nC. Papadimitriou and M. Yannakakis. The complexity of facets (and some facets\nof complexity). Journal of Computer and System Sciences, 28(2):244–259, 1984.\n[Ric53]\nH. Rice.\nClasses of recursively enumerable sets and their decision problems.\nTransactions of the American Mathematical Society, 74:358–366, 1953.\n[Rot05]\nJ. Rothe. Complexity Theory and Cryptology. An Introduction to Cryptocom-\nplexity. EATCS Texts in Theoretical Computer Science. Springer-Verlag, Berlin,\nHeidelberg, New York, 2005.\n[UN96]\nN. Ueda and T. Nagao. NP-completeness results for NONOGRAM via parsimo-\nnious reductions. Technical Report TR96-0008, Tokyo Institute of Technology,\nDepartment of Information Science, Tokyo, Japan, May 1996.\n[Val79]\nL. Valiant. The complexity of computing the permanent. Theoretical Computer\nScience, 8(2):189–201, 1979.\n[VV86]\nL. Valiant and V. Vazirani. NP is as easy as detecting unique solutions. Theo-\nretical Computer Science, 47:85–93, 1986.\n[YS02]\nT. Yato and T. Seta. Complexity and completeness of finding another solution\nand its application to puzzles. Joho Shori Gakkai Kenkyu Hokoku, 2002(103(AL-\n87)):9–16, 2002.\n30"}],"pages":[{"page":1,"text":"arXiv:0711.1827v3 [cs.CC] 9 Jun 2008\nThe Three-Color and Two-Color TantrixTM Rotation Puzzle\nProblems are NP-Complete via Parsimonious Reductions∗\nDorothea Baumeister\nand\nJ ̈org Rothe\nInstitut f ̈ur Informatik\nHeinrich-Heine-Universit ̈at D ̈usseldorf\n40225 D ̈usseldorf, Germany\nJune 9, 2008\nAbstract\nHolzer and Holzer [HH04] proved that the TantrixTM rotation puzzle problem with\nfour colors is NP-complete, and they showed that the infinite variant of this problem\nis undecidable. In this paper, we study the three-color and two-color TantrixTM rota-\ntion puzzle problems (3-TRP and 2-TRP) and their variants. Restricting the number\nof allowed colors to three (respectively, to two) reduces the set of available TantrixTM\ntiles from 56 to 14 (respectively, to 8).\nWe prove that 3-TRP and 2-TRP are NP-\ncomplete, which answers a question raised by Holzer and Holzer [HH04] in the affirma-\ntive. Since our reductions are parsimonious, it follows that the problems Unique-3-TRP\nand Unique-2-TRP are DP-complete under randomized reductions. We also show that\nthe another-solution problems associated with 4-TRP, 3-TRP, and 2-TRP are NP-\ncomplete. Finally, we prove that the infinite variants of 3-TRP and 2-TRP are unde-\ncidable.\n1\nIntroduction\nThe puzzle game TantrixTM, invented by Mike McManaway in 1991, is a domino-like strat-\negy game played with hexagonal tiles in the plane. Each tile contains three colored lines\nin different patterns (see Figure 1). We are here interested in the variant of the TantrixTM\nrotation puzzle game whose aim it is to match the line colors of the joint edges for each pair\nof adjacent tiles, just by rotating the tiles around their axes while their locations remain\nfixed. This paper continues the complexity-theoretic study of such problems that was initi-\nated by Holzer and Holzer [HH04]. Other results on the complexity of domino-like strategy\ngames can be found, e.g., in Gr ̈adel’s work [Gr ̈a90]. Ueda and Nagao [UN96] and Yato and\nSeta [YS02] provided a framework for studying the problem of finding another solution of\nany given NP problem when some solutions to this NP problem are already known—an ap-\nproach particularly appropriate for puzzle games. TantrixTM puzzles have also been studied\nwith regard to “evolutionary computation,” see Downing [Dow05].\n∗Supported in part by DFG grants RO 1202/9-3 and RO 1202/11-1, the European Science Foundation’s\nEUROCORES program LogICCC, and the Alexander von Humboldt Foundation’s TransCoop program.\nURL: http://ccc.cs.uni-duesseldorf.de/∼rothe (J. Rothe).\n1"},{"page":2,"text":"Holzer and Holzer [HH04] defined two decision problems associated with four-color\nTantrixTM rotation puzzles. The first problem’s instances are restricted to a finite num-\nber of tiles, and the second problem’s instances are allowed to have infinitely many tiles.\nThey proved that the finite variant of this problem is NP-complete and that the infinite\nproblem variant is undecidable. The constructions in [HH04] use tiles with four colors, just\nas the original TantrixTM tile set. Holzer and Holzer posed the question of whether the\nTantrixTM rotation puzzle problem remains NP-complete if restricted to only three colors,\nor if restricted to otherwise reduced tile sets. In this paper, we answer this question in the\naffirmative for the three-color and the two-color version of this problem.\nFor each k, 1 ≤k ≤4, Table 1 summarizes the previously known and our new results\nfor k-TRP, the k-color TantrixTM rotation puzzle problem, and its variants. (All problems\nare formally defined in Section 2.)\nk\nk-TRP is\nParsimonious?\nUnique-k-TRP is\nAS-k-TRP is\nInf-k-TRP is\n1\nin P\nin P\nin P\ndecidable\n(trivial)\n(trivial)\n(trivial)\n(trivial)\n2\nNP-complete\nyes\nDP-≤p\nran-complete NP-complete\nundecidable\n(see Cor. 3.6) (see Thm. 3.5) (see Cor. 3.7)\n(see Cor. 3.8) (see Thm. 3.9)\n3\nNP-complete\nyes\nDP-≤p\nran-complete NP-complete\nundecidable\n(see Cor. 3.3) (see Thm. 3.2) (see Cor. 3.7)\n(see Cor. 3.8) (see Thm. 3.9)\n4\nNP-complete\nyes\nDP-≤p\nran-complete NP-complete\nundecidable\n(see [HH04])\n(see [BR07])\n(see [BR07])\n(see Cor. 3.8) (see [HH04])\nTable 1: Overview of complexity and decidability results for k-TRP and its variants\nSince the four-color TantrixTM tile set contains the three-color TantrixTM tile set, our\nnew complexity results for 3-TRP imply the previous results for 4-TRP (both its NP-\ncompleteness [HH04] and that satisfiability parsimoniously reduces to 4-TRP [BR07]). In\ncontrast, the three-color TantrixTM tile set does not contain the two-color TantrixTM tile\nset (see Figure 2 in Section 2). Thus, 3-TRP does not straightforwardly inherit its hardness\nresults from those of 2-TRP, which is why both reductions, the one to 3-TRP and the one\nto 2-TRP, have to be presented. Note that they each substantially differ—both regarding\nthe subpuzzles constructed and regarding the arguments showing that the constructions\nare correct—from the previously known reductions presented in [HH04, BR07], and we will\nexplicitly illustrate the differences between our new and the original subpuzzles.\nOur reductions will be from a boolean circuit problem, and we construct a TantrixTM\nrotation puzzle that simulates the computation of such a circuit, where suitable subpuzzles\nare used to simulate the wires and gates of the circuit. In particular, the previous reductions\npresented in [HH04, BR07, BR] use McColl’s planar “cross-over” circuit with AND and\nNOT gates to simulate wire crossings [McC81] and they employ Goldschlager’s log-space\ntransformation from general to planar circuits [Gol77].\nWe take the same approach in\nour construction for 2-TRP. In contrast, we simulate wire crossings in the circuit in the\nconstruction for 3-TRP directly by a new subpuzzle called CROSS, which we will introduce\nin Section 3.1 and which will make our reduction for 3-TRP significantly more efficient\ncompared with the reduction for 3-TRP presented in a previous version of this paper [BR].\nNote that using the CROSS results in a puzzle with a considerably smaller total number of\ntiles that are needed to simulate a given circuit.\n2"},{"page":3,"text":"Since we provide parsimonious reductions from the satisfiability problem to 3-TRP\nand to 2-TRP, our reductions preserve the uniqueness of the solution. Thus, the unique\nvariants of both 3-TRP and 2-TRP are DP-complete under polynomial-time randomized\nreductions, where DP is the class of differences of NP sets. In addition, we will show that\nour parsimonious reductions for 3-TRP and 2-TRP also provide “another-solution problem\nreductions” (i.e., ≤p\nasp-reductions, see Section 2.1), and so the “another-solution problems”\nassociated with 3-TRP and 2-TRP are also NP-complete.1 Moreover, since 4-TRP inherits\nthe hardness results for 3-TRP, the another-solution problem associated with 4-TRP is\nNP-complete as well. Finally, we will prove that the infinite variants of 3-TRP and 2-TRP\nare undecidable, via a circuit construction similar to the one Holzer and Holzer [HH04] used\nto show that the infinite 4-TRP problem is undecidable.\nWe mention in passing that the present paper differs from and extends its preliminary\nversion [BR] in various ways. First, the proof of Theorem 3.2, which was only sketched\nin [BR], is given here in full length, where we also display the original subpuzzles of Holzer\nand Holzer [HH04] to allow comparison and where we explicitly show the differences between\nthe subpuzzles used in the their original construction (that provides a reduction for 4-TRP\nthat is not parsimonious; see [BR07] for a parsimonious reduction for 4-TRP) and in our\nnew reduction showing 3-TRP NP-complete via a parsimonious reduction. Moreover, the\nproof of this result for 3-TRP presented here additionally differs from the one sketched\nin [BR], since the reduction given here uses the CROSS subpuzzle, which—as explained\nabove—makes the reduction significantly more efficient. Second, we here provide the proof\nof Theorem 3.5, which was completely omitted in [BR]. Third, Corollary 3.8 and the related\ndiscussion of the another-solution variants of k-TRP, k ∈{2, 3, 4}, are completely new to\nthe current version.\nThis paper is organized as follows. Section 2 provides the complexity-theoretic defi-\nnitions and notation used and defines the k-color TantrixTM rotation puzzle problem and\nits variants. Section 3.1 shows that the three-color TantrixTM rotation puzzle problem is\nNP-complete via a parsimonious reduction. To allow comparison, the original subpuzzles\nfrom Holzer and Holzer’s construction [HH04] are also presented in this section. Section 3.2\npresents our result that 2-TRP is NP-complete, again via a parsimonious reduction. Sec-\ntion 3.3 is concerned with the complexity of the unique and infinite variants of the three-\ncolor and the two-color TantrixTM rotation puzzle problem, and with the corresponding\nanother-solution problems.\n2\nDefinitions and Notation\n2.1\nComplexity-Theoretic Notions and Notation\nWe assume that the reader is familiar with the standard notions of complexity theory,\nsuch as the complexity classes P (deterministic polynomial time) and NP (nondeterministic\npolynomial time); see, e.g., the textbooks [Pap94, Rot05]. DP denotes the class of differences\n1Informally stated, an another-solution problem associated with an NP problem A asks, given an instance\nx ∈A and some solutions y1, y2, . . . , yn for “x ∈A” (i.e., the yi’s encode accepting computation paths of an\nNP machine solving A on input x), whether or not there exists another solution, y ̸∈{y1, y2, . . . , yn}, for\n“x ∈A.” See Ueda and Nagao [UN96] and Yato and Seta [YS02] for more details and results, and also for\na discussion of why these problems are particularly important for puzzle games.\n3"},{"page":4,"text":"of any two NP sets [PY84]. Note that DP is also known to be the second level of the boolean\nhierarchy over NP, see Cai et al. [CGH+88, CGH+89].\nLet Σ∗denote the set of strings over the alphabet Σ = {0, 1}.\nGiven any language\nL ⊆Σ∗, ∥L∥denotes the number of elements in L. We consider both decision problems\nand function problems. The former are formalized as languages whose elements are those\nstrings in Σ∗that encode the yes-instances of the problem at hand. Regarding the latter,\nwe focus on the counting problems related to sets in NP. The counting version #A of an\nNP set A maps each instance x of A to the number of solutions of x. That is, counting\nproblems are functions from Σ∗to N.\nAs an example, the counting version #SAT of\nSAT, the NP-complete satisfiability problem, asks how many satisfying assignments a given\nboolean formula has. Solutions of NP sets can be viewed as accepting paths of NP machines.\nValiant [Val79] defined the function class #P to contain the functions that give the number\nof accepting paths of some NP machine. In particular, #SAT is in #P. Another class of\nproblems we consider are the another-solution problems (see Footnote 1 for an informal\ndefinition and Definition 2.1 for the another-solution problems associated with k-TRP).\nThe complexity of two decision problems, A and B, will here be compared via the\npolynomial-time many-one reducibility: A ≤p\nm B if there is a polynomial-time computable\nfunction f such that for each x ∈Σ∗, x ∈A if and only if f(x) ∈B. A set B is said to be\nNP-complete if B is in NP and every NP set ≤p\nm-reduces to B.\nMany-one reductions do not always preserve the number of solutions. A reduction that\ndoes preserve the number of solutions is said to be parsimonious. Formally, if A and B are\nany two sets in NP, we say A parsimoniously reduces to B if there exists a polynomial-time\ncomputable function f such that for each x ∈Σ∗, #A(x) = #B(f(x)).\nTo compare two another-solution problems associated with two given NP problems,\nA and B, Ueda and Nagao [UN96] introduced the following notion of reducibility.2\nWe\nsay that A ≤p\nasp B if A is parsimoniously reducible to B and, in addition, there exists a\npolynomial-time computable bijective function from the set of solutions of A to the set of\nsolutions of B. Let AS-A and AS-B be the another-solution problems associated with A\nand B (see Footnote 1 for an informal definition and, specifically, Definition 2.1 for the\nanother-solution problems associated with k-TRP). Ueda and Nagao [UN96] show that if\nAS-A is NP-complete and A ≤p\nasp B, then AS-B is also NP-complete [UN96]. In particular,\nAS-SAT is known to be NP-complete [YS02].\nValiant and Vazirani [VV86] introduced the following type of randomized polynomial-\ntime many-one reducibility: A ≤p\nran B if there exists a polynomial-time randomized algo-\nrithm F and a polynomial p such that for each x ∈Σ∗, if x ∈A then F(x) ∈B with\nprobability at least 1/p(|x|), and if x ̸∈A then F(x) ̸∈B with certainty. In particular, they\nproved that the unique version of the satisfiability problem, Unique-SAT, is DP-complete\nunder randomized reductions; see also Chang, Kadin, and Rohatgi [CKR95] for further\nrelated results.\n2They call this notion “parsimonious reduction with the property (∗)” [UN96]. Yato and Seta [YS02] in-\ntroduce a similar notion (albeit tailored to the case of function problems), which they denote by “polynomial-\ntime ASP reduction.”\n4"},{"page":5,"text":"2.2\nVariants of the TantrixTM Rotation Puzzle Problem\n2.2.1\nTile Sets, Color Sequences, and Orientations\nThe TantrixTM rotation puzzle consists of four different kinds of hexagonal tiles, named Sint,\nBrid, Chin, and Rond. Each tile has three lines colored differently, where the three colors of\na tile are chosen among four possible colors, see Figures 1(a)–(d). The original TantrixTM\ncolors are red, yellow, blue, and green, which we encode here as shown in Figures 1(e)–(h).\nThe combination of four kinds of tiles having three out of four colors each gives a total of\n56 different tiles.\n(a) Sint\n(b) Brid\n(c) Chin\n(d) Rond\n(e) red\n(f) yellow\n(g) blue\n(h) green\nFigure 1: TantrixTM tile types and the encoding of TantrixTM line colors\n2\n1\n4\n3\n6\n5\n8\n7\n(a) TantrixTM tile set T2\n2\n1\n5\n4\n3\n8\n7\n6\n11\n10\n9\n14\n13\n12\n(b) TantrixTM tile set T3\nFigure 2: TantrixTM tile sets T2 (for red and blue) and T3 (for red, yellow, and blue)\nSince we wish to study TantrixTM rotation puzzle problems for which the number of\nallowed colors is restricted, the set of TantrixTM tiles available in a given problem instance\ndepends on which variant of the TantrixTM rotation puzzle problem we are interested in. Let\nC be the set that contains the four colors red, yellow, blue, and green. For each i ∈{1, 2, 3, 4},\nlet Ci ⊆C be some fixed subset of size i, and let Ti denote the set of TantrixTM tiles\navailable when the line colors for each tile are restricted to Ci. For example, T4 is the\noriginal TantrixTM tile set containing 56 tiles, and if C3 contains, say, the three colors red,\nyellow, and blue, then tile set T3 contains the 14 tiles shown in Figure 2(b).\nSome more remarks on the tile sets are in order. First, for T3 and T4, we require the\nthree lines on each tile to have distinct colors, as in the original TantrixTM tile set. For T1\nand T2, however, this is not possible, so we allow the same color being used for more than\none of the three lines of any tile. Second, note that we care only about the sequence of\ncolors on a tile,3 where we always use the clockwise direction to represent color sequences.\n3The reason for this and the resulting conventions on the tile sets stated in this paragraph is that our\nproblems refer to the variant of the TantrixTM game that seeks, via rotations, to make the line colors match\n5"},{"page":6,"text":"However, since different types of tiles can yield the same color sequence, we will use just\none such tile to represent the corresponding color sequence. For example, if C2 contains,\nsay, the two colors red and blue, then the color sequence red-red-blue-blue-blue-blue (which\nwe abbreviate as rrbbbb) can be represented by a Sint, a Brid, or a Rond each having one\nshort red arc and two blue additional lines, and we add only one such tile (say, the Rond)\nto the tile set T2. That is, though there is some freedom in choosing a particular set of tiles,\nto be specific we fix the tile set T2 shown in Figure 2(a). Thus, we have ∥T1∥= 1, ∥T2∥= 8,\n∥T3∥= 14, and ∥T4∥= 56, regardless of which colors are chosen to be in Ci, 1 ≤i ≤4.\nRond\nBrid\nChin\nSint\nt1\nt2\nt3\nt4\nt5\nt6\nt7\nt8\nbbrrrr\nrrbbbb\nbrrbrr\nrbbrbb\nrbrrrb\nbrbbbr\nbbbbbb\nrrrrrr\nTable 2: Color sequences of the tiles in T2\nRond\nBrid\nChin\nt1\nt2\nt3\nt4\nt5\nt6\nt7\nt8\nyrrbby\nryybbr\nyrrybb\nryyrbb\nbrrbyy\nyrbybr\nrbyryb\nbrybyr\nSint\nt9\nt10\nt11\nt12\nt13\nt14\nbrbyyr\nbybrry\nryrbby\nrbryyb\nybyrrb\nyrybbr\nTable 3: Color sequences of the tiles in T3\nTables 2 and 3 show the color sequences for the eight tiles in T2 and for the 14 tiles in\nT3 that are presented in Figures 2(a) and 2(b), respectively. Tables 4 and 5 give the six\npossible orientations for each tile in T2 and in T3, which can be described by permuting the\ncolor sequences cyclically and where repetitions of color sequences are omitted. Regarding\nthe latter, note that some of the tiles in T2 (namely, tiles t3, t4, t7, and t8 in Table 4) have\norientations that yield identical color sequences due to symmetry, and so repetitions can\nbe omitted. In contrast, no such repetitions occur for the 14 tiles in T3 when permuted\ncyclically to yield the six possible orientations (see Table 5).\nNote that, for example, tile t7 from T2 (see Table 4) has the same color sequence (namely,\nbbbbbb) in each of its six orientations. In Section 3, we will consider the counting versions\nof TantrixTM rotation puzzle problems and will construct parsimonious reductions. When\ncounting the solutions of TantrixTM rotation puzzles, we will focus on color sequences only.\nThat is, whenever some tile (such as t7 from T2) has distinct orientations with identical\ncolor sequences, we will count this as just one solution (and disregard such repetitions). In\nthis sense, our reduction to be presented in the proof of Theorem 3.5 will be parsimonious.\non all joint edges of adjacent tiles. The objective of other TantrixTM games is to create lines and loops of\nthe same color as long as possible; for problems related to these TantrixTM game variants, other conventions\non the sets of allowed tiles would be reasonable.\n6"},{"page":7,"text":"Tile\nOrientation\nNumber\n1\n2\n3\n4\n5\n6\n1\nbbrrrr\nrbbrrr\nrrbbrr\nrrrbbr\nrrrrbb\nbrrrrb\n2\nrrbbbb\nbrrbbb\nbbrrbb\nbbbrrb\nbbbbrr\nrbbbbr\n3\nbrrbrr\nrbrrbr\nrrbrrb\n4\nrbbrbb\nbrbbrb\nbbrbbr\n5\nrbrrrb\nbrbrrr\nrbrbrr\nrrbrbr\nrrrbrb\nbrrrbr\n6\nbrbbbr\nrbrbbb\nbrbrbb\nbbrbrb\nbbbrbr\nrbbbrb\n7\nbbbbbb\n8\nrrrrrr\nTable 4: Color sequences of the tiles in T2 in their six orientations\nTile\nOrientation\nNumber\n1\n2\n3\n4\n5\n6\n1\nyrrbby\nyyrrbb\nbyyrrb\nbbyyrr\nrbbyyr\nrrbbyy\n2\nryybbr\nrryybb\nbrryyb\nbbrryy\nybbrry\nyybbrr\n3\nyrrybb\nbyrryb\nbbyrry\nybbyrr\nrybbyr\nrrybby\n4\nryyrbb\nbryyrb\nbbryyr\nrbbryy\nyrbbry\nyyrbbr\n5\nbrrbyy\nybrrby\nyybrrb\nbyybrr\nrbyybr\nrrbyyb\n6\nyrbybr\nryrbyb\nbryrby\nybryrb\nbybryr\nrbybry\n7\nrbyryb\nbrbyry\nybrbyr\nrybrby\nyrybrb\nbyrybr\n8\nbrybyr\nrbryby\nyrbryb\nbyrbry\nybyrbr\nrybyrb\n9\nbrbyyr\nrbrbyy\nyrbrby\nyyrbrb\nbyyrbr\nrbyyrb\n10\nbybrry\nybybrr\nrybybr\nrrybyb\nbrryby\nybrryb\n11\nryrbby\nyryrbb\nbyryrb\nbbyryr\nrbbyry\nyrbbyr\n12\nrbryyb\nbrbryy\nybrbry\nyybrbr\nryybrb\nbryybr\n13\nybyrrb\nbybyrr\nrbybyr\nrrbyby\nyrrbyb\nbyrrby\n14\nyrybbr\nryrybb\nbryryb\nbbryry\nybbryr\nrybbry\nTable 5: Color sequences of the tiles in T3 in their six orientations\n2.2.2\nDefinition of the Problems\nWe now recall some useful notation that Holzer and Holzer [HH04] introduced in order to\nformalize problems related to the TantrixTM rotation puzzle. The instances of such problems\nare TantrixTM tiles firmly arranged in the plane. To represent their positions, we use a two-\ndimensional hexagonal coordinate system shown in Figure 3. Let T ∈{T1, T2, T3, T4} be\nsome tile set as defined above. Let A : Z2 →T be a function mapping points in Z2 to\ntiles in T, i.e., A(x) is the type of the tile located at position x. Note that A is a partial\nfunction; throughout this paper (except in Theorem 3.9 and its proof), we restrict our\nproblem instances to finitely many given tiles, and the regions of Z2 they cover may have\nholes (which is a difference to the original TantrixTM game).\nDefine shape(A) to be the set of points x ∈Z2 for which A(x) is defined. For any two\ndistinct points x = (a, b) and y = (c, d) in Z2, x and y are neighbors if and only if (a = c\n7"},{"page":8,"text":"x\ny\n(1, 1)\n(0, 0)\n(−1, −1)\n(1, 0)\n(0, 1)\n(−1, 0)\n(0, −1)\nFigure 3: A two-dimensional hexagonal coordinate system\nand |b −d| = 1) or (|a −c| = 1 and b = d) or (a −c = 1 and b −d = 1) or (a −c = −1\nand b −d = −1). For any two points x and y in shape(A), A(x) and A(y) are said to be\nneighbors exactly if x and y are neighbors.\nWe now define the TantrixTM rotation puzzle problems we are interested in, where the\nparameter k is chosen from {1, 2, 3, 4}:\nName: k-Color TantrixTM Rotation Puzzle (k-TRP, for short).\nInstance: A finite shape function A : Z2 →Tk, appropriately encoded as a string in Σ∗.\nQuestion: Is there a solution to the rotation puzzle defined by A, i.e., does there exist\na rotation of the given tiles in shape(A) such that the colors of the lines of any two\nadjacent tiles match at their joint edge?\nClearly, 1-TRP can be solved trivially, so 1-TRP is in P. On the other hand, Holzer\nand Holzer [HH04] showed that 4-TRP is NP-complete and that the infinite variant of\n4-TRP is undecidable. Baumeister and Rothe [BR07] investigated the counting and the\nunique variant of 4-TRP and, in particular, provided a parsimonious reduction from SAT\nto 4-TRP. In this paper, we study the three-color and two-color versions of this problem,\n3-TRP and 2-TRP, and their counting, unique, another-solution, and infinite variants.\nDefinition 2.1\n1. A solution to a k-TRP instance A specifies an orientation of each\ntile in shape(A) such that the colors of the lines of any two adjacent tiles match at\ntheir joint edge. Let Solk-TRP(A) denote the set of solutions of A.\n2. Define the counting version of k-TRP to be the function #k-TRP mapping from Σ∗\nto N such that #k-TRP(A) = ∥Solk-TRP(A)∥.\n3. Define the unique version of k-TRP as Unique-k-TRP = {A | #k-TRP(A) = 1}.\n4. Define the another-solution problem associated with k-TRP as\nAS-k-TRP = {(A, y1, . . . , yn) | y1, . . . , yn ∈Solk-TRP(A) and ∥Solk-TRP(A)∥> n}.\nThe above problems are defined for the case of finite problem instances. The infinite\nTantrixTM rotation puzzle problem with k colors (Inf-k-TRP, for short) is defined exactly\nas k-TRP, the only difference being that the shape function A is not required to be finite\nand is represented by the encoding of a Turing machine computing A : Z2 →Tk.\n8"},{"page":9,"text":"3\nResults\n3.1\nParsimonious Reduction from SAT to 3-TRP\nTheorem 3.2 below is the main result of this section.\nNotwithstanding that our proof\nfollows the general approach of Holzer and Holzer [HH04], our specific construction and our\nproof of correctness will differ substantially from theirs. We will provide a parsimonious\nreduction from SAT to 3-TRP. Let Circuit∧,¬-SAT denote the problem of deciding, given a\nboolean circuit c with AND and NOT gates only, whether or not there is a satisfying truth\nassignment to the input variables of c. The NP-completeness of Circuit∧,¬-SAT was shown\nby Cook [Coo71]. The following lemma (stated, e.g., in [BR07]) is straightforward.\nLemma 3.1 SAT parsimoniously reduces to Circuit∧,¬-SAT.\nTheorem 3.2 SAT parsimoniously reduces to 3-TRP.\nProof.\nBy Lemma 3.1, it is enough to show that Circuit∧,¬-SAT parsimoniously reduces\nto 3-TRP. The resulting 3-TRP instance simulates a boolean circuit with AND and NOT\ngates such that the number of solutions of the rotation puzzle equals the number of satisfying\ntruth assignments to the variables of the circuit.\nGeneral remarks on our proof approach:\nThe rotation puzzle to be constructed from\na given circuit consists of different subpuzzles each using only three colors. The color green\nwas employed by Holzer and Holzer [HH04] only to exclude certain rotations, so we choose\nto eliminate this color in our three-color rotation puzzle. Thus, letting C3 contain the colors\nblue, red, and yellow, we have the tile set T3 = {t1, t2, . . . , t14}, where the enumeration of\ntiles corresponds to Figure 2(b). Furthermore, our construction will be parsimonious, i.e.,\nthere will be a one-to-one correspondence between the solutions of the given Circuit∧,¬-SAT\ninstance and the solutions of the resulting rotation puzzle instance. Note that part of our\nwork is already done, since some subpuzzles constructed in [BR07] use only three colors\nand they each have unique solutions. However, the remaining subpuzzles have to be either\nmodified substantially or to be constructed completely differently, and the arguments of why\nour modified construction is correct differs considerably from previous work [HH04, BR07].\nSince it is not so easy to exclude undesired rotations without having the color green\navailable, let us first analyze the 14 tiles in T3. For u, v ∈C3 and for each tile ti in T3,\nwhere 1 ≤i ≤14, Table 6 shows which substrings of the form uv occur in the color sequence\nof ti (as indicated by an • entry in row uv and column i). In the remainder of this proof,\nwhen showing that our construction is correct, our arguments will often be based on which\nsubstrings do or do not occur in the color sequences of certain tiles from T3, and Table 6\nmay then be looked up for convenience.\nHolzer and Holzer [HH04] consider a boolean circuit c on input variables x1, x2, . . . , xn\nas a sequence (α1, α2, . . . , αm) of computation steps (or “instructions”), and we adopt this\napproach here. For the ith instruction, αi, we have αi = xi if 1 ≤i ≤n, and if n+1 ≤i ≤m\nthen we have either αi = NOT(j) or αi = AND(j, k), where j ≤k < i.\nCircuits are\nevaluated in the standard way. We will represent the truth value true by the color blue and\nthe truth value false by the color red in our rotation puzzle.\n9"},{"page":10,"text":"Rond\nBrid\nChin\nSint\nuv\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\nbb\n•\n•\n•\n•\n•\n•\nrr\n•\n•\n•\n•\n•\n•\nyy\n•\n•\n•\n•\n•\n•\nbr\n•\n•\n•\n•\n•\n•\n•\n•\n•\n•\nrb\n•\n•\n•\n•\n•\n•\n•\n•\n•\n•\nby\n•\n•\n•\n•\n•\n•\n•\n•\n•\n•\nyb\n•\n•\n•\n•\n•\n•\n•\n•\n•\n•\nry\n•\n•\n•\n•\n•\n•\n•\n•\n•\n•\nyr\n•\n•\n•\n•\n•\n•\n•\n•\n•\n•\nTable 6: Substrings uv that occur in the color sequences of the tiles in T3\nA technical difficulty in the construction results from the wire crossings that circuits\ncan have. To construct rotation puzzles from planar circuits, Holzer and Holzer use Mc-\nColl’s planar “cross-over” circuit with AND and NOT gates to simulate such wire cross-\nings [McC81], and in particular they employ Goldschlager’s log-space transformation from\ngeneral to planar circuits [Gol77]. For the details of this transformation, we refer to Holzer\nand Holzer’s work [HH04].\nWe use a different approach to overcome the difficulty caused by wire crossings. Our\nconstruction will employ a new subpuzzle for this purpose.\nHolzer and Holzer’s circuit\nconstruction uses several cross-over circuits, and each of them consists of twelve AND and\nnine NOT gates, and in addition it increases the number of instruction steps by 14. We will\navoid this blow-up by using the CROSS subpuzzle, which achieves a direct crossing of two\nadjacent wires in our TantrixTM puzzle and thus is much more efficient.\nFor the sake of comparison, we also present the original subpuzzles from Holzer and\nHolzer’s construction ([HH04]) in this section, with the following conventions: Tiles having\nmore than one possible orientation as well as tiles containing green lines will always have\na grey instead of a black edging, and modified or inserted tiles in our new subpuzzles will\nalways be highlighted by having a grey background.\nThis will illustrate the differences\nbetween our new and the previously known original subpuzzles.\nWire subpuzzles:\nWires of the circuit are simulated by the subpuzzles WIRE, MOVE,\nand COPY.\nA vertical wire is represented by a WIRE subpuzzle, which is shown in Figure 5. The\noriginal WIRE subpuzzle from [HH04] (see Figure 4) does not contain green but it does\nnot have a unique solution, while the WIRE subpuzzle from [BR07], which is not displayed\nhere, ensures the uniqueness of the solution but is using a tile with a green line. In the\noriginal WIRE subpuzzle, both tiles, a and b, have two possible orientations for each input\ncolor. Inserting two new tiles at positions x and y (see Figure 5) makes the solution unique.\nIf the input color is blue, tile x must contain one of the following color-sequence substrings\nfor the edges joint with tiles b and a: ry, rr, yy, or yr. If the input color is red, x must\ncontain one of these substrings: bb, yb, yy, or by. Tile t12 satisfies the conditions yy and\nry for the input color blue, and the conditions yb and yy for the input color red.\n10"},{"page":11,"text":"The solution must now be fixed with tile y. The possible color-sequence substrings of y\nat the edges joint with a and b are rr and ry for the input color blue, and yb and bb for\nthe input color red. Tile t13 has exactly one of these sequences for each input color. Thus,\nthe solution for this subpuzzle contains only three colors and is unique.\nIN\nOUT\n(a) In: true\nIN\nOUT\n(b) In: false\nIN\na\nb\nOUT\n(c) Scheme\nFigure 4: Original WIRE subpuzzle, see [HH04]\nIN\nOUT\n(a) In: true\nIN\nOUT\n(b) In: false\nx\nIN\na\nb\nOUT\ny\n(c) Scheme\nFigure 5: Three-color WIRE subpuzzle\nThe MOVE subpuzzle is needed to move a wire by two positions to the left or to the\nright. The original MOVE subpuzzle from [HH04] contains only three colors but has several\nsolutions. One solution for each input color is shown in Figure 6, where the tiles with a\ngrey edging have more than one possible orientation.\nHowever, the modified subpuzzle\nfrom [BR07], which is presented in Figure 7, contains also only three colors but has a\nunique solution.\nIN\nOUT\n(a) In: true\nIN\nOUT\n(b) In: false\nFigure 6: Original MOVE subpuzzle, see [HH04]\n11"},{"page":12,"text":"IN\nOUT\n(a) In: true\nIN\nOUT\n(b) In: false\nFigure 7: Three-color MOVE subpuzzle, see [BR07]\nThe COPY subpuzzle is used to “split” a wire into two copies. By the same arguments\nas above we can take the modified COPY subpuzzle from [BR07], which is presented in\nFigure 9. Figure 8 shows the original COPY subpuzzle from [HH04].\nOUT\nIN\nOUT\n(a) In: true\nOUT\nIN\nOUT\n(b) In: false\nFigure 8: Original COPY subpuzzle, see [HH04]\nOUT\nIN\nOUT\n(a) In: true\nOUT\nIN\nOUT\n(b) In: false\nFigure 9: Three-color COPY subpuzzle, see [BR07]\nThe last subpuzzle needed to simulate the wires of the circuit is our new CROSS sub-\npuzzle shown in Figure 10. This subpuzzle has two inputs and two outputs, and it ensures\n12"},{"page":13,"text":"that the input colors will be swapped at the outputs. This subpuzzle uses only three colors\nand has unique solutions for each combination of input colors.\nIN\nOUT\nIN\nOUT\n(a) In: true, true\nIN\nOUT\nIN\nOUT\n(b) In: true, false\nIN\nOUT\nIN\nOUT\n(c) In: false, true\nIN\nOUT\nIN\nOUT\n(d) In: false, false\nIN\na\nc\nOUT\nb\ng\nj\nh\ne\ni\nk\nIN\nd\nf\nOUT\nl1\nm1\nn1\no1\np1\nq1\nr1\ns1\nt1 u1\nl2\nm2\nn2\no2\np2\nq2\nr2\ns2\nt2\nu2\n(e) Scheme\nFigure 10: CROSS subpuzzle\nThe CROSS subpuzzle can be subdivided into three distinct parts: the lower part con-\nsisting of tiles a through k, the upper left part consisting of tiles l1 through u1, and the\nupper right part consisting of tiles l2 through u2.\nLet us first consider the upper left part. Consider the three possible colors that can\noccur at the edge of tile j joint with tile m1.\nCase 1: Assume that the joint edge of these two tiles is blue. One possible orientation for\ntile m1 has yellow at the edge joint with tile l1. This leaves two possible orientations\nfor tile l1. The first one has red at the edge joint with tile n1, but n1 does not contain\n13"},{"page":14,"text":"the color sequence yr. The second possible orientation has yellow at the edge joint\nwith tile n1, but this leads to blue at the edges of tiles m1 and n1 with tile o1. Since\no1 does not contain the color sequence bb this is not possible either. The orientation\nof tile m1 is now fixed with red at the edge joint with tile l1.\nThere are two orientations of tile l1, but they both have blue at the edge joint with\ntile n1. In the analysis of the lower part we will see that both solutions are needed.\nThe first one has yellow at the edge joint with tile j and the second one has blue at\nthis edge. The orientation of tile n1 is fixed with red and blue at the edges joint with\ntiles m1 and l1. Tile o1 has a fixed orientation due to the color-sequence substring\nbr at the edges joint with tiles m1 and n1. For tile p1 there are two orientations left,\nbecause this tile contains the color-sequence substring rb for the edges joint with tiles\no1 and n1, twice. The first one has red at the edge joint with tile r1 and yellow at\nthe edge joint with tile q1. Thus, it is not posibble that tile r1 has yellow at the edge\njoint with tile q1, since q1 does not contain the color-sequence substring yy. Neither\nis it possible that r1 has blue at the edge joint with tile q1, because this leads to\nthe color-sequence substring yr at the edges of tiles r1 and s1 with tile t1. So the\norientation of tile p1 is fixed with blue at the edge joint with tile q1 and yellow at the\nedge joint with tile r1. Tile r1 forces the edge joint with tile q1 to be red, and since s1\ndoes not contain the color sequence yy, the orientation of tiles r1 and s1 is fixed with\nblue at their joint edge. This immediately fixes the orientation of all other tiles, and\nthe output color at the left output tile will be blue.\nCase 2: Now we assume that the joint edge of tiles j and m1 is red. There are two possible\norientations for tile m1. The first one has red at the edge joint with tile l1 and blue\nat the edge joint with tile n1. This is not possible because then the joint edge of\ntiles l1 and n1 would have to be blue, but tile n1 does not contain the color-sequence\nsubstring bb. So the orientation of tile m1 is fixed with blue at the edge joint with\ntile l1 and yellow at the edges joint with tiles n1 and o1. Since n1 does not contain\nthe color-sequence substring yr, the orientation of tiles l1 and n1 is fixed with yellow\nat their joint edge. The joint edge of tiles o1 and p1 cannot be red, since p1 does not\ncontain the color-sequence substring rr for the edges joint with tiles o1 and n1, so the\njoint edge of tiles o1 and p1 is yellow, and their orientation is fixed.\nNow, there are two possible orientations for tile r1.\nThe first one with yellow at\nthe edge joint with tile s1 is not possible, since this would lead to the color-sequence\nsubstring yb for tile u1 at the edges joint with tiles r1 and t1. So we fix the orientation\nof tile r1 with yellow at the edge joint with tile q1. This also fixes the orientation of\ntile q1 with blue at the edge joint with tile s1. The edges of tile t1 joint with tiles r1\nand s1 are both yellow, and the orientation of all other tiles is fixed. The output of\nthe subpuzzle’s left output tile will thus be red.\nCase 3: The last possible color for the joint edge of tiles j and m1 is yellow. We first\nassume that the edge of tile m1 joint with tile l1 is blue.\nThere are two possible orientations for tile l1. The first one has yellow at the edge\njoint with tile n1 and thus is not possible, since n1 does not contain the color-sequence\nsubstring ry. The second one has red at the edge joint with tile n1. Since the edge of\n14"},{"page":15,"text":"tile m1 joint with tile o1 is red, this is not possible either, because o1 does not contain\nthe color-sequence substring rb. So the orientation of tile m1 is fixed with yellow\nat the edge joint with tile l1. And since tile j does not contain the color-sequence\nsubstring by, the orientation of tile l1 is fixed as well\nThe given colors at the edges of tiles l1 and m1 immediately fix the orientation of\ntiles n1 and o1 with blue and yellow at the edges joint with tile p1, which contains the\ncolor-sequence substring by only once and so has a fixed orientation as well. Now we\nhave the same situation as in the previous case, since the joint edge of tile p1 with r1\nis blue and the joint edge of p1 with tile q1 is red. As to color red at the joint edge of\ntiles j and m1 this case will also result in a unique solution with the output color red\nat the left output tile.\nDue to symmetry the upper right part can be handled analogously with the upper left\npart. All Brid and Chin tiles are the same, and the Rond is replaced by the other Rond,\nand the Sint tiles are replaced by the respective other Sint tiles having a small arc of the\nsame color. So we obtain a symmetrical subpuzzle and similar arguments as for the upper\nleft part apply.\nWe now analyze the lower part of this subpuzzle. We first consider tiles a, b, and c. If\nthe left input is blue then there is only one possible solution to these tiles. Obviously tiles\na and c must have a vertical blue line, and since tile g does not contain the color-sequence\nsubstring by, the orientation of these three tiles is fixed with yellow at the edges of tiles\nb joint with tiles c and a. The orientation of tile g is fixed as well, since it contains the\ncolor-sequence substring br only once.\nIf the input to this part is red, we have a fixed\norientation with the color-sequence substring ry for the edges joint with tile g by similar\narguments. Note that tile g has two possible solutions left. Since tiles d, e, and f are the\nsame as tiles a, b, and c, and tile i is a mirrored tile g, the same arguments hold for the\nright input. To analyze the whole lower part, we will distinguish the following four possible\npairs of input colors:\n• First we assume that both input colors are blue (see Figure 10(a)). We have seen that\nthe orientation of tiles g and i is fixed with yellow at their edges joint with tile h,\nand red at their edges joint with tiles j and k, respectively. The orientation of tile\nh is fixed with red at the edges joint with tiles j and k, and so they are fixed with\nthe color-sequence substring by for the edges joint with tiles l1 and m1 and with the\ncolor-sequence substring yb for the edges joint with tiles m2 and l2. In the analysis\nof the upper part we have seen, that both output colors will be blue in this case, as\ndesired.\n• Now, let the right input color be blue and let the left input color be red (see Fig-\nure 10(c)). The two possible colors for tile g joint with tile h are blue and red. The\ncolor for the joint edge of tiles i and h is yellow, and since h contains the color-sequence\nsubstring yxb but not yxr, where x stands for an arbitrary color (chosen among blue,\nred, and yellow), the orientation of tiles g and h is fixed. This also fixes the orientation\nof tiles j and k. Tile j has blue at the edges joint with tiles l1 and m1, and (as we\nhave seen in the analysis of the upper part) the left output color will be blue, just like\nthe right input color. The edges of tile k joint with tiles m2 and l2 are yellow, and so\nthe right output color will be red, as desired.\n15"},{"page":16,"text":"• The case of blue being the left input color and red being the right input color (see\nFigure 10(b)) is similar to the second case.\nThe output colors will again be the\nexchanged input colors, as desired.\n• The last case is that both input colors are red (see Figure 10(d)). We have seen that\nthe two possible colors for tiles g and i joint with tile h are blue and red. Obviously,\nthey cannot both be blue. If the joint edge of tiles g and h is blue, the joint edges of\ntiles g and h with j are both yellow. This is not possible, because the combination of\nblue at the joint edge of tiles j and l1 and red at the joint edge of tiles j and m1 is\nnot possible. The case of blue at the edge of tile i joint with tile h is not possible due\nto similar arguments for tile k and the upper right part. So the edges of tiles g and i\njoint with tile h must both be red. This leads to red at the edges of tile j joint with\nthe upper left part, and tile k joint with the upper right part. We have already seen\nthat this combination leads to both output colors being red, as desired.\nSo we have unique solutions with the desired effect of exchanging the input colors at the\noutput tiles for all four possible combinations of input colors for the CROSS subpuzzle.\nGate subpuzzles:\nThe boolean gates AND and NOT are represented by the AND and\nNOT subpuzzles. Both the original four-color NOT subpuzzle from [HH04] (see Figure 11)\nand the modified four-color NOT subpuzzle from [BR07], which is not displayed here, use\ntiles with green lines to exclude certain rotations. Our three-color NOT subpuzzle is shown\nin Figure 12. Tiles a, b, c, and d from the original NOT subpuzzle shown in Figure 11\nremain unchanged. Tiles e, f, and g in this original NOT subpuzzle ensure that the output\ncolor will be correct, since the joint edge of e and b is always red. So for our new NOT\nsubpuzzle in Figure 12, we have to show that the edge between tiles x and b is always red,\nand that we have unique solutions for both input colors.\nFirst, let the input color be blue and suppose for a contradiction that the joint edge\nof tiles b and x were blue. Then the joint edge of tiles b and c would be yellow. Since x\nis a tile of type t13 and so does not contain the color-sequence substring substring bb, the\nedge between tiles c and x must be yellow. But then the edges of tile w joint with tiles c\nand x must both be blue. This is not possible, however, because w (which is of type t10)\ndoes not contain the color-sequence substring substring bb. So if the input color is blue,\nthe orientation of tile b is fixed with yellow at the edge of b joint with tile y, and with red\nat the edges of b joint with tiles c and x. This already ensures that the output color will\nbe red, because tiles c and d behave like a WIRE subpuzzle. Tile x does not contain the\ncolor-sequence substring br, so the orientation of tile c is also fixed with blue at the joint\nedge of tiles c and w. As a consequence, the joint edge of tiles w and d is yellow, and due\nto the fact that the joint edge of tiles w and x is also yellow, the orientation of w and d is\nfixed as well. Regarding tile a, the edge joint with tile y can be yellow or red, but tile x\nhas blue at the edge joint with tile y, so the joint edge of tiles y and a is yellow, and the\norientation of all tiles is fixed for the input color blue. The case of red being the input color\ncan be handled analogously.\nThe most complicated figure (besides the CROSS) is the AND subpuzzle. The original\nfour-color version from [HH04] (see Figure 13) uses four tiles with green lines and the\nmodified four-color AND subpuzzle from [BR07], which is not displayed here, uses seven\n16"},{"page":17,"text":"IN\nOUT\n(a) In: true\nIN\nOUT\n(b) In: false\nf\ng\ne\nIN\na\nb\nc\nd\nOUT\n(c) Scheme\nFigure 11: Original NOT subpuzzle, see [HH04]\nIN\nOUT\n(a) In: true\nIN\nOUT\n(b) In: false\ny\nx\nw\nIN\na\nb\nc\nd\nOUT\n(c) Scheme\nFigure 12: Three-color NOT subpuzzle\ntiles with green lines. Figure 14 shows our new AND subpuzzle using only three colors and\nhaving unique solutions for all four possible combinations of input colors. To analyze this\nsubpuzzle, we subdivide it into a lower and an upper part. The lower part ends with tile c\nand has four possible solutions (one for each combination of input colors), while the upper\npart, which begins with tile j, has only two possible solutions (one for each possible output\ncolor). The lower part can again be subdivided into three different parts.\nThe lower left part contains the tiles a, b, x, and h. If the input color to this part is blue\n(see Figures 14(a) and 14(b)), the joint edge of tiles b and x is always red, and since tile\nx (which is of type t11) does not contain the color-sequence substring rr, the orientation\nof tiles a and x is fixed. The orientation of tiles b and h is also fixed, since h (which is of\ntype t2) does not contain the color-sequence substring by but the color-sequence substring\nyy for the edges joint with tiles b and x. By similar arguments we obtain a unique solution\nfor these tiles if the left input color is red (see Figures 14(c) and 14(d)). The connecting\nedge to the rest of the subpuzzle is the joint edge between tiles b and c, and tile b will have\nthe same color at this edge as the left input color.\nTiles d, e, i, w, and y form the lower right part. If the input color to this part is blue\n(see Figures 14(a) and 14(c)), the joint edge of tiles d and y must be yellow, since tile y\n(which is of type t9) does not contain the color-sequence substrings rr nor ry for the edges\njoint with tiles d and e. Thus the joint edge of tiles y and e must be yellow, since i (which\n17"},{"page":18,"text":"IN\nOUT\nIN\n(a) In: true, true\nIN\nOUT\nIN\n(b) In: true, false\nIN\nOUT\nIN\n(c) In: false, true\nIN\nOUT\nIN\n(d) In: false, false\nh\nIN\na\nb\nc\nj\nk\ng\nl\nm\nn\nOUT\nf\no\nIN\nd\ne\np\nq\ni\n(e) Scheme\nFigure 13: Original AND subpuzzle, see [HH04]\n18"},{"page":19,"text":"IN\nOUT\nIN\n(a) In: true, true\nIN\nOUT\nIN\n(b) In: true, false\nIN\nOUT\nIN\n(c) In: false, true\nIN\nOUT\nIN\n(d) In: false, false\nx\nh\nIN\na\nb\nv\nc\nj\nk\ng\nl\nm\nn\nOUT\nw\nu\no\nIN\nd\ne\ny\ni\n(e) Scheme\nFigure 14: Three-color AND subpuzzle\nis of type t6) does not contain the color-sequence substring bb for the edges joint with tiles\ny and e. This implies that the tiles i and w also have a fixed orientation. If the input color\nto the lower right part is red (see Figures 14(b) and 14(d)), a unique solution is obtained\nby similar arguments. The connection of the lower right part to the rest of the subpuzzle is\nthe edge between tiles w and g. If the right input color is blue, this edge will also be blue,\nand if the right input color is red, this edge will be yellow.\nThe heart of the AND subpuzzle is its lower middle part, formed by the tiles c and g.\nThe colors at the joint edge between tiles b and c and at the joint edge between tiles w and\ng determine the orientation of the tiles c and g uniquely for all four possible combinations of\ninput colors. The output of this part is the color at the edge between c and j. If both input\ncolors are blue, this edge will also be blue, and otherwise this edge will always be yellow.\nThe output of the whole AND subpuzzle will be red if the edge between c and j is\nyellow, and if this edge is blue then the output of the whole subpuzzle will also be blue. If\nthe input color for the upper part is blue (see Figure 14(a)), each of the tiles j, k, l, m,\nand n has a vertical blue line. Note that since the colors red and yellow are symmetrical\nin these tiles, we would have several possible solutions without tiles o, u, and v. However,\ntile v (which is of type t9) contains neither rr nor ry for the edges joint with tiles k and j,\nso the orientation of the tiles j through n is fixed, except that tile n without tiles o and u\nwould still have two possible orientations. Tile u (which is of type t2) is fixed because of\n19"},{"page":20,"text":"OUT\n(a) Out: true\nOUT\n(b) Out: false\na\nb\nOUT\nc\n(c) Scheme\nFigure 15: Original BOOL subpuzzle, see [HH04]\nits color-sequence substring yy at the edges joint with l and m, so due to tiles o and u the\nonly color possible at the edge between n and o is yellow, and we have a unique solution.\nIf the input color for the upper part is yellow (see Figures 14(b)–(d)), we obtain unique\nsolutions by similar arguments. Hence, this new AND subpuzzle uses only three colors and\nhas unique solutions for each of the four possible combinations of input colors.\nOUT\n(a) Out: true\nOUT\n(b) Out: false\nx\nb\nc\na\nOUT\nd\n(c) Scheme\nFigure 16: Three-color BOOL subpuzzle\nInput and output subpuzzles:\nThe input variables of the boolean circuit are repre-\nsented by the subpuzzle BOOL. The original four-color BOOL subpuzzle from [HH04] is\nshown in Figure 15. Our new three-color BOOL subpuzzle is presented in Figure 16, and\nsince it is completely different from the original subpuzzle, no tiles are marked here. This\nsubpuzzle has only two possible solutions, one with the output color blue (if the corre-\nsponding variable is true), and one with the output color red (if the corresponding variable\nis false). The original four-color BOOL subpuzzle from [HH04] (which was not modified\nin [BR07]) contains tiles with green lines to exclude certain rotations.\nOur three-color\nBOOL subpuzzle does not contain any green lines, but it might not be that obvious that\nthere are only two possible solutions, one for each output color.\nFirst, we show that the output color yellow is not possible. If the output color were\nyellow, there would be two possible orientations for tile a. In the first orientation, the joint\nedge between a and b is blue. This is not possible, however, since c (which is a Chin, namely\na tile of type t8) does not contain the color-sequence substring rr. By a similar argument\nfor tile d, the other orientation with the output color yellow is not possible either.\nSecond, we show that tile x makes the solution unique. For the output color blue, there\nare two possible orientations for each of the tiles a, b, c, and d. In order to exclude one of\nthese orientations in each case, tile x must contain either of the color-sequence substrings\nbr or yr at its edges joint with tiles b and c. On the other hand, for the output color red, tile\nx must not contain the color-sequence substring ry at its edges joint with b and c, because\n20"},{"page":21,"text":"IN\n(a) TEST-true\nIN\n(b) TEST-false\nd\nIN\na\nc\nb\n(c) Scheme\nFigure 17: Original TEST subpuzzles, see [HH04]\nthis would leave two possible orientations for tile d. Tile t1 satisfies all these conditions and\nmakes the solution of the BOOL subpuzzle unique, while using only three colors.\nIN\n(a) TEST-true\nIN\n(b) TEST-false\nd\nx\nIN\na\nc\nb\n(c) Scheme\nFigure 18: Three-color TEST subpuzzles\nFinally, a subpuzzle is needed to check whether or not the circuit evaluates to true.\nThis is achieved by the subpuzzle TEST-true shown in Figure 18(a). It has only one valid\nsolution, namely that its input color is blue. Just like the subpuzzle BOOL, the original\nfour-color TEST-true subpuzzle from [HH04], which is shown in Figure 17(a) and which\nwas not modified in [BR07], uses green lines to exclude certain rotations. Again, since the\nnew TEST-true subpuzzle is completely different from the original subpuzzle, no tiles are\nmarked here. Note that in the three-color TEST-true subpuzzle of Figure 18(a), a and c\nare the same tiles as a and b in the WIRE subpuzzle of Figure 5. To ensure that the input\ncolor is blue, we have to consider all possible color-sequence substrings at the edges of d\njoint with c and a, and at the edges of b joint with a and c. For each input color, there are\nfour possibilities.\nAssume that the input color is red. Then the possible color-sequence substrings for tile\nd at the edges joint with c and a are: bb, yb, yy, and by. Similarly, the possible color-\nsequence substrings for tile b at the edges joint with a and c are: yy, yb, bb, and by. Tile\nt14 at position d excludes by and yy, while tile t11 at position b excludes yy and yb. Thus,\nred is not possible as the input color. The input color yellow can be excluded by similar\narguments. It follows that blue is the only possible input color. It is clear that the tiles a\nand c have a vertical blue line. Due to the fact that neither t11 nor t14 contains the color-\nsequence substrings rr or yy for the edges joint with tiles a and c, two possible solutions\nare still left. The color-sequence substrings for these solutions at the edges of x joint with\nc and d are ry and yr. Since tile t2 at position x contains the former but not the latter\nsequence, the TEST-true subpuzzle uses only three colors and has a unique solution.\n(Note: The TEST-false subpuzzles in Figures 18(b) and 24(e) will be needed for a\ncircuit construction in Section 3.3, see Figure 25.\nIn particular, the three-color TEST-\nfalse subpuzzle in Figure 18(b) is identical to the three-color TEST-true subpuzzle from\n21"},{"page":22,"text":"Figure 18(a), except that the colors blue and red are exchanged. By the above argument,\nthe TEST-false subpuzzle has only one valid solution, namely that its input color is red.)\nThe shapes of the subpuzzles constructed above have changed slightly. However, by\nHolzer and Holzer’s argument [HH04] about the minimal horizontal distance between two\nwires and/or gates being at least four, unintended interactions between the subpuzzles do\nnot occur. This concludes the proof of Theorem 3.2.\n❑\nTheorem 3.2 immediately gives the following corollary.\nCorollary 3.3 3-TRP is NP-complete.\nSince the tile set T3 is a subset of the tileset T4, we have 3-TRP ≤p\nm 4-TRP. Thus, the\nhardness results for 3-TRP and its variants proven in this paper immediately are inherited\nby 4-TRP and its variants, which provides an alternative proof of these hardness results for\n4-TRP and its variants established in [HH04, BR07]. In particular, Corollary 3.4 follows\nfrom Theorem 3.2 and Corollary 3.3.\nCorollary 3.4 ([HH04, BR07]) 4-TRP is NP-complete, via a parsimonious reduction\nfrom SAT.\n3.2\nParsimonious Reduction from SAT to 2-TRP\nIn contrast to the above-mentioned fact that 3-TRP ≤p\nm 4-TRP holds trivially, the reduction\n2-TRP ≤p\nm 3-TRP (which we will show to hold due to both problems being NP-complete,\nsee Corollaries 3.3 and 3.6) is not immediatedly straightforward, since the tile set T2 is not\na subset of the tile set T3 (recall Figure 2 in Section 2). In this section, we study 2-TRP\nand its variants. Our main result here is Theorem 3.5 below.\nTheorem 3.5 SAT parsimoniously reduces to 2-TRP.\nProof.\nAs in the proof of Theorem 3.2, we again provide a reduction from Circuit∧,¬-SAT,\nbut here we use McColl’s planar cross-over circuit [McC81] instead of a CROSS subpuzzle.4\nWe choose our color set C2 to contain the colors blue and red (corresponding to the\ntruth values true and false), and we use the tileset T2 shown in Figure 2(a). To simulate a\nboolean circuit with AND and NOT gates, we now present the subpuzzles constructed only\nwith tiles from T2.\nWire subpuzzles:\nWe again use Brid tiles with a straight blue line to construct the\nWIRE subpuzzle with the colors blue and red as shown in Figure 19. If the input color is\nblue, then tiles a and b must have a vertical blue line, so the output color will be blue. If\nthe input color is red, then the edge between a and b must be red too, and it follows that\nthe ouput color will also be red. Tile x forces tiles a and b to fix the orientation of the blue\n4Whether there exists an analogous two-color CROSS subpuzzle to simplify this construction, is still an\nopen question.\n22"},{"page":23,"text":"line for the input color red. Since we care only about distinct color sequences of the tiles\n(recall the remarks made in Section 2.2.1),5 we have unique solutions for both input colors.\nNote that this construction allows wires of arbitrary height, unlike the WIRE subpuzzle\nconstructed in the proof of Theorem 3.2 or the WIRE subpuzzles constructed in [HH04,\nBR07], which all are constructed so as to have even height. To construct two-color WIRE\nsubpuzzles of arbitrary height, tile x of type t8 in Figure 19 would have to be placed on\nalternating sides of tiles a, b, etc. in each level.\nIN\nOUT\n(a) In: true\nIN\nOUT\n(b) In: false\nx\nIN\na\nb\nOUT\n(c) Scheme\nFigure 19: Two-color WIRE subpuzzle\nThe two-color MOVE subpuzzle is shown in Figure 20. Just like the WIRE subpuzzle,\nit consists only of tiles of types t3 and t8 (see Figure 2(a)). For the input color blue, it is\nobvious that all tiles must have vertical blue lines and so the output color is also blue. If the\ninput color is red, then the edge between a and b is red, too. Since neither c nor d contains\nthe color-sequence substring bb, the blue lines of these four tiles have all the same direction.\nThe same argument applies to tiles e and f, and since tiles f, g, and x behave like a WIRE\nsubpuzzle, the output color will be red in this case. As above, since we care only about the\ncolor sequences of the tiles, we obtain unique solutions for both input colors.\nNote that Figure 20 shows a move to the right.\nA move to the left can be made\nsymmetrically, simply by mirroring this subpuzzle.\nIN\nOUT\n(a) In: true\nIN\nOUT\n(b) In: false\nIN\na\nb\nc\nd\ne\nf\ng\nOUT\nx\n(c) Scheme\nFigure 20: Two-color MOVE subpuzzle\n5By contrast, if we were to count all distinct orientations of the tiles even if they have identical color\nsequences, we would obtain two solutions each for tiles a and b, and six solutions for tile x, which gives a\ntotal of 24 solutions for each input color in the WIRE subpuzzle. However, as argued in Section 2.2.1, since\nour focus is on the color sequences, we have unique solutions and thus a parsimonious reduction from SAT\nto 2-TRP.\n23"},{"page":24,"text":"OUT\nIN\nOUT\n(a) In: true\nOUT\nIN\nOUT\n(b) In: false\ny\nj\nk\nl\nOUT\nh\ni\nIN\na\nb\nc\nd\ne\nf\ng\nOUT\nx\n(c) Scheme\nFigure 21: Two-color COPY subpuzzle\nThe last subpuzzle needed to simulate the wires of the boolean circuit is the COPY\nsubpuzzle in Figure 21. This subpuzzle is akin to the subpuzzle obtained by mirroring the\nMOVE subpuzzle in both directions,6 so similar arguments as above work. Again, since we\ndisregard the repetitions of color sequences, we have unique solutions for both input colors.\nGate subpuzzles:\nThe construction of the NOT subpuzzle presented in Figure 22 is\nsimilar to the corresponding subpuzzle with three colors (see Figure 12). Tiles b and d in\nthe two-color version allow only two possible orientations of tile c, one for each input color.\nThe first one has blue at the edge joint with a and, consequently, red at the edge joint\nwith e; the second possible orientation has the same colors exchanged. Since tiles e, f, and\nx behave like a WIRE subpuzzle, the output color will “negate” the input color, i.e., the\noutput color will be blue if the input color is red, and it will be red if the input color is blue.\nTile x fixes the orientation of tiles f and e and the orientation of tile a is fixed by tile b.\nWe again obtain unique solutions, since we focus on color sequences.\nIN\nOUT\n(a) In: true\nIN\nOUT\n(b) In: false\nb\nx\nIN\na\nc\ne\nf\nOUT\nd\n(c) Scheme\nFigure 22: Two-color NOT subpuzzle\n6We here say “is akin to. . . ” because the COPY subpuzzle in Figure 21 differs from a true two-sided\nmirror version of MOVE by having a tile of type t3 at position y instead of a t8 as in position x. Why? By\nthe arguments for the MOVE subpuzzle, tile x already fixes the orientation of tiles a through k but not of l\n(if the input color is red, see Figure 21(b)). The orientation of tile l is then fixed by a t3 tile at position y,\nsince obviously a t8 would not lead to a solution. However, it is clear that an argument analogous to that\nfor the MOVE subpuzzle shows that all blue lines (except that of g in Figure 21(b)) have the same direction.\n24"},{"page":25,"text":"IN\nOUT\nIN\n(a) In: true, true\nIN\nOUT\nIN\n(b) In: true, false\nIN\nOUT\nIN\n(c) In: false, true\nIN\nOUT\nIN\n(d) In: false, false\nb\ns\nIN\na\nc\ne\nf\ng\nr\nd\nt\no\nq\nu\nv\nx\nOUT\ni\nm\np\nw\nIN\nh\nj\nl\nn\nk\nz1\nz2\nz3\n(e) Scheme\nFigure 23: Two-color AND subpuzzle\nThe AND subpuzzle is again the most complicated one. To analyze this subpuzzle, we\nsubdivide it into three disjoint parts:\n1. The first part consists of the tiles a through g, z1, and z2. Tiles a through f and z2\nform a two-color NOT subpuzzle, and tile g passes the color at the edge between tiles\nf and g on to the edge between tiles g and r. So the negated left input color will be\nat the edge between tiles g and r. Tile z1 fixes the orientation of tile g to obtain a\nunique solution for this part of the subpuzzle.\n2. The second part is formed by the tiles h through q, and z3. This part is made from a\ntwo-color NOT and a two-color MOVE subpuzzle to negate the right input and move\nit by two positions to the left, which both are slightly modified with respect to the\nNOT in Figure 22 and the MOVE in Figure 20.\nFirst, the minor differences between the move-to-the-left analog of the MOVE subpuz-\nzle from Figure 20 and this modified MOVE subpuzzle as part of the AND subpuzzle\nare the following: (a) tile z3 is positioned to the right of tiles q and u and not to their\nleft, and (b) z3 is a t3 tile, whereas the tile at position x in Figure 20 is of type t8.\n25"},{"page":26,"text":"However, it is clear that the orientation of the blue lines of tiles l through q is fixed\nby tile k, and z3 enforces u and q to have the same direction of blue lines.\nSecond, the minor difference between the NOT from Figure 22 and this modified NOT\nsubpuzzle as part of the AND subpuzzle is that tile m is not of type t8 (as is the x in\nFigure 22) but of type t3, since the modified NOT and MOVE subpuzzles have been\nmerged. These changes are needed to ensure that we get a suitable height for this\npart of the AND subpuzzle. However, it is again clear that the orientation of the blue\nlines of tiles l through q is fixed by tile k.\n3. Finally, the third part, formed by the tiles r through x, behaves like a two-color\nsubpuzzle simulating a boolean NOR gate, which is defined as ¬(α ∨β) ≡¬α ∧¬β.\nThe two inputs to the NOR subpuzzle come from the edges between g and r and\nbetween q and u.\nIf the left input color (at the edge between g and r) is red, then tiles s and z1 ensure\nthat the edge between r and t will also be red. If the left input color is blue, then the\nedge between r and t will be blue by similar arguments, and since tile t is of type t3,\nit passes this input color on to its joint edge with v in both cases. The right input\nto the upper part (at the edge between q and u) is passed on by tile u to the edge\nbetween u and v.\nNow, we have both input colors at the edges between t and v and between u and v.\nIf both of these edges are red (see Figure 23(a)), then tile w enforces that the edge\nbetween v and x will be blue. On the other hand, if one or both of v’s edges with t\nand u are blue, then v’s short blue arc must be at these edges, which enforces that the\ncolor at the edge between v and x will be red. Finally, tile x passes the color at the\nedge joint with tile v to the output. With the negated inputs of the first and second\npart, this subpuzzle behaves like an AND gate, i.e., as a whole this subpuzzle simulates\nthe computation of the boolean function AND: ¬(¬α ∨¬β) ≡¬¬α ∧¬¬β ≡α ∧β.\nAgain, since we care only about the color sequences of the tiles, we obtain unique solutions\nfor each pair of input colors.\nOUT\n(a) BOOL Out: true\nOUT\n(b) BOOL Out: false\na\nOUT\nx\n(c) BOOL Scheme\nIN\n(d) TEST-true\nIN\n(e) TEST-false\nIN\na\n(f) TEST Scheme\nFigure 24: Two-color BOOL and TEST subpuzzles\n26"},{"page":27,"text":"Input and output subpuzzles:\nThe input variables of the circuit are simulated by the\nsubpuzzle BOOL. Constructing a subpuzzle with the only possible outputs blue or red is\nquite easy, since all tiles except t7 and t8 satisfy this condition. Figures 24(a)–(c) show our\ntwo-color BOOL subpuzzle. Note that tile x ensures the uniqueness of the solutions.\nThe last step is to check if the output of the whole circuit is true. This is done by the\nsubpuzzle TEST-true shown in Figure 24(d), which sits on top of the subpuzzle simulating\nthe circuit’s output gate. Since tile t7 contains only blue lines, the solution is unique.\n(Note: The subpuzzle TEST-false in Figure 24(e) will again be needed in Section 3.3, see\nFigure 25. It has only red lines, so the input is always red and the solution is unique.) ❑\nTheorem 3.5 immediately gives the following corollary.\nCorollary 3.6 2-TRP is NP-complete.\n3.3\nComplexity of the Unique, Another-Solution, and Infinite Variants\nof 3-TRP and 2-TRP\nParsimonious reductions preserve the number of solutions and, in particular, the uniqueness\nof solutions.\nThus, Theorems 3.2 and 3.5 imply Corollary 3.7 below that also employs\nValiant and Vazirani’s results on the DP-hardness of Unique-SAT under ≤p\nran-reductions\n(which were defined in Section 2). The proof of Corollary 3.7 follows the lines of the proof\nof [BR07, Theorem 6], which states the analogous result for Unique-4-TRP in place of\nUnique-3-TRP and Unique-2-TRP.\nCorollary 3.7\n1. Unique-SAT parsimoniously reduces to the problems Unique-3-TRP\nand Unique-2-TRP.\n2. Both Unique-3-TRP and Unique-2-TRP are DP-complete under ≤p\nran-reductions.\nWe now turn to the another-solution problems for k-TRP.\nCorollary 3.8\n1. For each k ∈{2, 3, 4}, SAT ≤p\nasp k-TRP.\n2. For k ∈{2, 3, 4}, AS-k-TRP is NP-complete.\nProof.\nIn Sections 3.1 and 3.2, we showed a parsimonious reduction from Circuit∧,¬-SAT\nto 3-TRP and 2-TRP.\nTo prove the first part of this corollary, we have to show (see\nSection 2.1) that there is a polynomial-time computable function bijectively mapping the\nsolutions of any given Circuit∧,¬-SAT instance C to the solutions of the k-TRP instance\ncorresponding to C, for each k ∈{2, 3, 4}. However, note that a satisfying assignment to the\nvariables of the circuit C immediately gives the solution for the BOOL subpuzzles according\nto our reduction for k-TRP, see the proof of Theorem 3.5 (for k = 2), of Theorem 3.2 (for\nk = 3), and of the result presented for 4-TRP in [BR07] (for k = 4).\nIn each case, our circuit is constructed as a sequence of steps, so the solutions for the\nBOOL subpuzzles determine the color at the input for all subpuzzles at the next step,\nand so on. Since all subpuzzles have unique solutions we can construct a solution to our\npuzzle in polynomial time from bottom to top using the parsimonious reductions mentioned\nabove. Now, given the assignment of the variables, we just have to place the tiles of the\n27"},{"page":28,"text":"AND\nTEST−true\n(a) Empty word not accepted\nAND\nTEST−false\n(b) Empty word accepted\nFigure 25: Two choices for the ith layer of the infinite circuit for Inf-2-TRP and Inf-3-TRP\nsingle subpuzzles according to the determined solution and so specify their orientation.\nConversely, if we have a solution of a resulting k-TRP instance for k ∈{2, 3, 4}, the output\ncolors at the BOOL subpuzzles gives the corresponding satisfying assignment to the variables\nof the circuit.\nTo prove the second part of Corollary 3.8, note that AS-SAT is NP-complete [YS02], and\nsince the parsimonious reduction from SAT to Circuit∧,¬-SAT provides a bijective transfor-\nmation between these problems’ solution sets, AS-Circuit∧,¬-SAT is also NP-complete. It\nfollows immediately, that the problems AS-3-TRP and AS-2-TRP are NP-complete. Fur-\nthermore, AS-4-TRP inherits the NP-completeness result from AS-3-TRP.\n❑\nHolzer and Holzer [HH04] proved that Inf-4-TRP, the infinite TantrixTM rotation puzzle\nproblem with four colors, is undecidable, via a reduction from (the complement of) the\nempty-word problem for Turing machines. The proof of Theorem 3.9 below uses essentially\nthe same argument but is based on our modified three-color and two-color constructions.\nTheorem 3.9 Both Inf-2-TRP and Inf-3-TRP are undecidable.\nProof.\nThe empty-word problem for Turing machines asks whether the empty word, λ,\nbelongs to the language L(M) accepted by a given Turing machine M. By Rice’s Theo-\nrem [Ric53], both this problem and its complement are undecidable. To reduce the latter\nproblem to either Inf-2-TRP or Inf-3-TRP, we do the following. Let Mi denote the simu-\nlation of a Turing machine M for exactly i steps. Then, Mi accepts its input if and only if\nM accepts the input within i steps.\nWe employ another circuit construction that will be simulated by a TantrixTM rotation\npuzzle. First, two wires are initialized with the boolean value true. Then, in each step, we\nuse either the circuit shown in Figure 25(a) or the one shown in Figure 25(b). The former\ncircuit is chosen in step i if λ /∈L(Mi), and the latter one is chosen in step i if λ ∈L(Mi).\nTo transform this circuit into an Inf-k-TRP instance, where k is either two or three, we use\nthe TEST-true subpuzzle from either Figure 18(a) or Figure 24(d), rotated by 180 degrees\nand with the “IN” tile becoming an “OUT” tile, in order to initialize both wires with the\ninput true. Then we substitute the single layers of the circuit by the subpuzzles described\nabove, step by step, always choosing either the circuit from Figure 25(a) (where TEST-true\nis the subpuzzle from Figure 18(a) if k = 3, or from Figure 24(d) if k = 2), or the circuit\n28"},{"page":29,"text":"from Figure 25(b) (where TEST-false is the subpuzzle from Figure 18(b) if k = 3, or from\nFigure 24(e) if k = 2).\nSince both wires are initialized with the value true, it is obvious that the constructed\nsubpuzzle has a solution if and only if λ /∈L(M). Note that the layout of the circuit is\ncomputable, and our reduction will output the encoding of a Turing machine computing first\nthis circuit layout and then the transformation to the TantrixTM rotation puzzle as described\nabove. By this reduction, both Inf-2-TRP and Inf-3-TRP are shown to be undecidable. ❑\n4\nConclusions\nThis paper studied the three-color and two-color TantrixTM rotation puzzle problems,\n3-TRP and 2-TRP, and their unique, another-solution, and infinite variants. Our main\ncontribution is that both 3-TRP and 2-TRP are NP-complete via a parsimonious reduc-\ntion from SAT, which in particular solves a question raised by Holzer and Holzer [HH04].\nSince restricting the number of colors to three and two, respectively, drastically reduces the\nnumber of TantrixTM tiles available, our constructions as well as our correctness arguments\nsubstantially differ from those in [HH04, BR07]. Table 1 in Section 1 shows that our results\ngive a complete picture of the complexity of k-TRP, 1 ≤k ≤4. An interesting question\nstill remaining open is whether the analogs of k-TRP without holes still are NP-complete.\nAcknowledgments: We are grateful to Markus Holzer and Piotr Faliszewski for inspiring\ndiscussions on TantrixTM rotation puzzles, and we thank Thomas Baumeister for his help\nwith producing reasonably small figures. We thank the anonymous LATA 2008 referees for\nhelpful comments, and in particular the referee who let us know that he or she has also\nwritten a program for verifying the correctness of our constructions.\nReferences\n[BR]\nD. Baumeister and J. Rothe. The three-color and two-color TantrixTM rotation\npuzzle problems are NP-complete via parsimonious reductions. In Proceedings\nof the 2nd International Conference on Language and Automata Theory and\nApplications. Springer-Verlag Lecture Notes in Computer Science. To appear.\n[BR07]\nD. Baumeister and J. Rothe.\nSatisfiability parsimoniously reduces to the\nTantrixTM rotation puzzle problem. In Proceedings of the 5th Conference on\nMachines, Computations and Universality, pages 134–145. Springer-Verlag Lec-\nture Notes in Computer Science #4664, September 2007.\n[CGH+88] J. Cai, T. Gundermann, J. Hartmanis, L. Hemachandra, V. Sewelson, K. Wag-\nner, and G. Wechsung. The boolean hierarchy I: Structural properties. SIAM\nJournal on Computing, 17(6):1232–1252, 1988.\n[CGH+89] J. Cai, T. Gundermann, J. Hartmanis, L. Hemachandra, V. Sewelson, K. Wag-\nner, and G. Wechsung. The boolean hierarchy II: Applications. SIAM Journal\non Computing, 18(1):95–111, 1989.\n29"},{"page":30,"text":"[CKR95]\nR. Chang, J. Kadin, and P. Rohatgi. On unique satisfiability and the threshold\nbehavior of randomized reductions. Journal of Computer and System Sciences,\n50(3):359–373, 1995.\n[Coo71]\nS. Cook.\nThe complexity of theorem-proving procedures.\nIn Proceedings of\nthe 3rd ACM Symposium on Theory of Computing, pages 151–158. ACM Press,\n1971.\n[Dow05]\nK. Downing. Tantrix: A minute to learn, 100 (genetic algorithm) generations\nto master. Genetic Programming and Evolvable Machines, 6(4):381–406, 2005.\n[Gol77]\nL. Goldschlager. The monotone and planar circuit value problems are log space\ncomplete for P. SIGACT News, 9(2):25–29, 1977.\n[Gr ̈a90]\nE. Gr ̈adel.\nDomino games and complexity.\nSIAM Journal on Computing,\n19(5):787–804, 1990.\n[HH04]\nM. Holzer and W. Holzer. TantrixTM rotation puzzles are intractable. Discrete\nApplied Mathematics, 144(3):345–358, 2004.\n[McC81]\nW. McColl. Planar crossovers. IEEE Transactions on Computers, C-30(3):223–\n225, 1981.\n[Pap94]\nC. Papadimitriou. Computational Complexity. Addison-Wesley, 1994.\n[PY84]\nC. Papadimitriou and M. Yannakakis. The complexity of facets (and some facets\nof complexity). Journal of Computer and System Sciences, 28(2):244–259, 1984.\n[Ric53]\nH. Rice.\nClasses of recursively enumerable sets and their decision problems.\nTransactions of the American Mathematical Society, 74:358–366, 1953.\n[Rot05]\nJ. Rothe. Complexity Theory and Cryptology. An Introduction to Cryptocom-\nplexity. EATCS Texts in Theoretical Computer Science. Springer-Verlag, Berlin,\nHeidelberg, New York, 2005.\n[UN96]\nN. Ueda and T. Nagao. NP-completeness results for NONOGRAM via parsimo-\nnious reductions. Technical Report TR96-0008, Tokyo Institute of Technology,\nDepartment of Information Science, Tokyo, Japan, May 1996.\n[Val79]\nL. Valiant. The complexity of computing the permanent. Theoretical Computer\nScience, 8(2):189–201, 1979.\n[VV86]\nL. Valiant and V. Vazirani. NP is as easy as detecting unique solutions. Theo-\nretical Computer Science, 47:85–93, 1986.\n[YS02]\nT. Yato and T. Seta. Complexity and completeness of finding another solution\nand its application to puzzles. Joho Shori Gakkai Kenkyu Hokoku, 2002(103(AL-\n87)):9–16, 2002.\n30"}]},"section_tree":[],"assets":{"figures":[],"tables":[],"images":[]},"math_expressions":{"inline":[],"block":[{"equation_id":"eq1","equation_number":null,"raw_text":"Let Σ∗denote the set of strings over the alphabet Σ = {0, 1}.","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq2","equation_number":null,"raw_text":"computable function f such that for each x ∈Σ∗, #A(x) = #B(f(x)).","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq3","equation_number":null,"raw_text":"to be specific we fix the tile set T2 shown in Figure 2(a). Thus, we have ∥T1∥= 1, ∥T2∥= 8,","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq4","equation_number":null,"raw_text":"∥T3∥= 14, and ∥T4∥= 56, regardless of which colors are chosen to be in Ci, 1 ≤i ≤4.","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq5","equation_number":null,"raw_text":"distinct points x = (a, b) and y = (c, d) in Z2, x and y are neighbors if and only if (a = c","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq6","equation_number":null,"raw_text":"and |b −d| = 1) or (|a −c| = 1 and b = d) or (a −c = 1 and b −d = 1) or (a −c = −1","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq7","equation_number":null,"raw_text":"and b −d = −1). For any two points x and y in shape(A), A(x) and A(y) are said to be","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq8","equation_number":null,"raw_text":"to N such that #k-TRP(A) = ∥Solk-TRP(A)∥.","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq9","equation_number":null,"raw_text":"3. Define the unique version of k-TRP as Unique-k-TRP = {A | #k-TRP(A) = 1}.","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq10","equation_number":null,"raw_text":"AS-k-TRP = {(A, y1, . . . , yn) | y1, . . . , yn ∈Solk-TRP(A) and ∥Solk-TRP(A)∥> n}.","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq11","equation_number":null,"raw_text":"blue, red, and yellow, we have the tile set T3 = {t1, t2, . . . , t14}, where the enumeration of","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq12","equation_number":null,"raw_text":"approach here. For the ith instruction, αi, we have αi = xi if 1 ≤i ≤n, and if n+1 ≤i ≤m","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq13","equation_number":null,"raw_text":"then we have either αi = NOT(j) or αi = AND(j, k), where j ≤k < i.","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq14","equation_number":null,"raw_text":"to our reduction for k-TRP, see the proof of Theorem 3.5 (for k = 2), of Theorem 3.2 (for","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq15","equation_number":null,"raw_text":"k = 3), and of the result presented for 4-TRP in [BR07] (for k = 4).","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq16","equation_number":null,"raw_text":"is the subpuzzle from Figure 18(a) if k = 3, or from Figure 24(d) if k = 2), or the circuit","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq17","equation_number":null,"raw_text":"from Figure 25(b) (where TEST-false is the subpuzzle from Figure 18(b) if k = 3, or from","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"},{"equation_id":"eq18","equation_number":null,"raw_text":"Figure 24(e) if k = 2).","raw_latex":null,"normalized_latex":null,"display_type":"block_candidate"}],"equation_refs":[]},"symbol_table":[],"references":{"in_text_markers":[],"bibliography":[]},"claims":[],"flow_graph":{"nodes":[],"edges":[]},"quality":{"text_char_count":72521,"parse_confidence":0.5,"equation_parse_rate_proxy":0.9,"citation_resolution_rate_proxy":0.0,"structure_coverage_proxy":0.0,"asset_coverage_proxy":0.0,"accepted_for_training":true}}