Algorithmic Combinatorial Game Theory

Total Page:16

File Type:pdf, Size:1020Kb

Algorithmic Combinatorial Game Theory Playing Games with Algorithms: Algorithmic Combinatorial Game Theory∗ Erik D. Demaine† Robert A. Hearn‡ Abstract Combinatorial games lead to several interesting, clean problems in algorithms and complexity theory, many of which remain open. The purpose of this paper is to provide an overview of the area to encourage further research. In particular, we begin with general background in Combinatorial Game Theory, which analyzes ideal play in perfect-information games, and Constraint Logic, which provides a framework for showing hardness. Then we survey results about the complexity of determining ideal play in these games, and the related problems of solving puzzles, in terms of both polynomial-time algorithms and computational intractability results. Our review of background and survey of algorithmic results are by no means complete, but should serve as a useful primer. 1 Introduction Many classic games are known to be computationally intractable (assuming P = NP): one-player 6 puzzles are often NP-complete (as in Minesweeper) or PSPACE-complete (as in Rush Hour), and two-player games are often PSPACE-complete (as in Othello) or EXPTIME-complete (as in Check- ers, Chess, and Go). Surprisingly, many seemingly simple puzzles and games are also hard. Other results are positive, proving that some games can be played optimally in polynomial time. In some cases, particularly with one-player puzzles, the computationally tractable games are still interesting for humans to play. We begin by reviewing some basics of Combinatorial Game Theory in Section 2, which gives tools for designing algorithms, followed by reviewing the relatively new theory of Constraint Logic in Section 3, which gives tools for proving hardness. In the bulk of this paper, Sections 4–6 survey many arXiv:cs/0106019v2 [cs.CC] 22 Apr 2008 of the algorithmic and hardness results for combinatorial games and puzzles. Section 7 concludes with a small sample of difficult open problems in algorithmic Combinatorial Game Theory. Combinatorial Game Theory is to be distinguished from other forms of game theory arising in the context of economics. Economic game theory has many applications in computer science as well, for example, in the context of auctions [dVV03] and analyzing behavior on the Internet [Pap01]. ∗A preliminary version of this paper appears in the Proceedings of the 26th International Symposium on Mathe- matical Foundations of Computer Science, Lecture Notes in Computer Science 2136, Czech Republic, August 2001, pages 18–32. The latest version can be found at http://arXiv.org/abs/cs.CC/0106019. †MIT Computer Science and Artificial Intelligence Laboratory, 32 Vassar St., Cambridge, MA 02139, USA, [email protected] ‡Neukom Institute for Computational Sciece, Dartmouth College, Sudikoff Hall, HB 6255, Hanover, NH 03755, USA, [email protected] 1 2 Combinatorial Game Theory A combinatorial game typically involves two players, often called Left and Right, alternating play in well-defined moves. However, in the interesting case of a combinatorial puzzle, there is only one player, and for cellular automata such as Conway’s Game of Life, there are no players. In all cases, no randomness or hidden information is permitted: all players know all information about gameplay (perfect information). The problem is thus purely strategic: how to best play the game against an ideal opponent. It is useful to distinguish several types of two-player perfect-information games [BCG04, pp. 14– 15]. A common assumption is that the game terminates after a finite number of moves (the game is finite or short), and the result is a unique winner. Of course, there are exceptions: some games (such as Life and Chess) can be drawn out forever, and some games (such as tic-tac-toe and Chess) define ties in certain cases. However, in the combinatorial-game setting, it is useful to define the winner as the last player who is able to move; this is called normal play. If, on the other hand, the winner is the first player who cannot move, this is called mis`ere play. (We will normally assume normal play.) A game is loopy if it is possible to return to previously seen positions (as in Chess, for example). Finally, a game is called impartial if the two players (Left and Right) are treated identically, that is, each player has the same moves available from the same game position; otherwise the game is called partizan. A particular two-player perfect-information game without ties or draws can have one of four outcomes as the result of ideal play: player Left wins, player Right wins, the first player to move wins (whether it is Left or Right), or the second player to move wins. One goal in analyzing two- player games is to determine the outcome as one of these four categories, and to find a strategy for the winning player to win. Another goal is to compute a deeper structure to games described in the remainder of this section, called the value of the game. A beautiful mathematical theory has been developed for analyzing two-player combinatorial games. A new introductory book on the topic is Lessons in Play by Albert, Nowakowski, and Wolfe [ANW07]; the most comprehensive reference is the book Winning Ways by Berlekamp, Conway, and Guy [BCG04]; and a more mathematical presentation is the book On Numbers and Games by Conway [Con01]. See also [Con77, Fra96] for overviews and [Fra07] for a bibliography. The basic idea behind the theory is simple: a two-player game can be described by a rooted tree, where each node has zero or more left branches corresponding to options for player Left to move and zero or more right branches corresponding to options for player Right to move; leaves correspond to finished games, with the winner determined by either normal or mis`ere play. The interesting parts of Combinatorial Game Theory are the several methods for manipulating and analyzing such games/trees. We give a brief summary of some of these methods in this section. 2.1 Conway’s Surreal Numbers A richly structured special class of two-player games are John H. Conway’s surreal numbers1 [Con01, Knu74, Gon86, All87], a vast generalization of the real and ordinal number systems. Basically, a surreal number L R is the “simplest” number larger than all Left options (in L) and smaller { | } than all Right options (in R); for this to constitute a number, all Left and Right options must be numbers, defining a total order, and each Left option must be less than each Right option. See [Con01] for more formal definitions. For example, the simplest number without any larger-than or smaller-than constraints, denoted 1The name “surreal numbers” is actually due to Knuth [Knu74]; see [Con01]. 2 , is 0; the simplest number larger than 0 and without smaller-than constraints, denoted 0 , {|} { |} is 1; and the simplest number larger than 0 and 1 (or just 1), denoted 0, 1 , is 2. This method { |} can be used to generate all natural numbers and indeed all ordinals. On the other hand, the simplest number less than 0, denoted 0 , is 1; similarly, all negative integers can be generated. {| } − Another example is the simplest number larger than 0 and smaller than 1, denoted 0 1 , which 1 { | } is 2 ; similarly, all dyadic rationals can be generated. After a countably infinite number of such construction steps, all real numbers can be generated; after many more steps, the surreals are all numbers that can be generated in this way. Surreal numbers form a field, so in particular they are totally ordered, and support the opera- tions of addition, subtraction, multiplication, division, roots, powers, and even integration in many situations. (For those familiar with ordinals, contrast with surreals which define ω 1, 1/ω, √ω, − etc.) As such, surreal numbers are useful in their own right for cleaner forms of analysis; see, e.g., [All87]. What is interesting about the surreals from the perspective of combinatorial game theory is that they are a subclass of all two-player perfect-information games, and some of the surreal structure, such as addition and subtraction, carries over to general games. Furthermore, while games are not totally ordered, they can still be compared to some surreal numbers and, amazingly, how a game compares to the surreal number 0 determines exactly the outcome of the game. This connection is detailed in the next few paragraphs. First we define some algebraic structure of games that carries over from surreal numbers; see Table 1 for formal definitions. Two-player combinatorial games, or trees, can simply be represented as L R where, in contrast to surreal numbers, no constraints are placed on L and R. The { | } negation of a game is the result of reversing the roles of the players Left and Right throughout the game. The (disjunctive) sum of two (sub)games is the game in which, at each player’s turn, the player has a binary choice of which subgame to play, and makes a move in precisely that subgame. A partial order is defined on games recursively: a game x is less than or equal to a game y if every Left option of x is less than y and every Right option of y is more than x. (Numeric) equality is defined by being both less than or equal to and more than or equal to. Strictly inequalities, as used in the definition of less than or equal to, are defined in the obvious manner. Note that while 1 1 =0= in terms of numbers, 1 1 and denote different {− | } {|} {− | } {|} games (lasting 1 move and 0 moves, respectively), and in this sense are equal in value but not identical symbolically or game-theoretically.
Recommended publications
  • Generating Single and Multiple Cooperative Heuristics for the One Dimensional Bin Packing Problem Using a Single Node Genetic Programming Island Model
    Generating Single and Multiple Cooperative Heuristics for the One Dimensional Bin Packing Problem Using a Single Node Genetic Programming Island Model Kevin Sim Emma Hart Institute for Informatics and Digital Innovation Institute for Informatics and Digital Innovation Edinburgh Napier University Edinburgh Napier University Edinburgh, Scotland, UK Edinburgh, Scotland, UK [email protected] [email protected] ABSTRACT exhibit superior performance than similar human designed Novel deterministic heuristics are generated using Single Node heuristics and can be used to produce collections of heuris- Genetic Programming for application to the One Dimen- tics that collectively maximise the potential of selective HH. sional Bin Packing Problem. First a single deterministic The papers contribution is two fold. Single heuristics ca- heuristic was evolved that minimised the total number of pable of outperforming a range of well researched deter- bins used when applied to a set of 685 training instances. ministic heuristics are generated by combining features ex- Following this, a set of heuristics were evolved using a form tracted from those heuristics. Secondly an island model[19] of cooperative co-evolution that collectively minimise the is adapted to use multiple SNGP implementations to gener- number of bins used across the same set of problems. Re- ate diverse sets of heuristics which collectively outperform sults on an unseen test set comprising a further 685 prob- any of the single heuristics when used in isolation. Both ap- lem instances show that the single evolved heuristic out- proaches are trained and evaluated using equal divisions of a performs existing deterministic heuristics described in the large set of 1370 benchmark problem instances sourced from literature.
    [Show full text]
  • 13. Mathematics University of Central Oklahoma
    Southwestern Oklahoma State University SWOSU Digital Commons Oklahoma Research Day Abstracts 2013 Oklahoma Research Day Jan 10th, 12:00 AM 13. Mathematics University of Central Oklahoma Follow this and additional works at: https://dc.swosu.edu/ordabstracts Part of the Animal Sciences Commons, Biology Commons, Chemistry Commons, Computer Sciences Commons, Environmental Sciences Commons, Mathematics Commons, and the Physics Commons University of Central Oklahoma, "13. Mathematics" (2013). Oklahoma Research Day Abstracts. 12. https://dc.swosu.edu/ordabstracts/2013oklahomaresearchday/mathematicsandscience/12 This Event is brought to you for free and open access by the Oklahoma Research Day at SWOSU Digital Commons. It has been accepted for inclusion in Oklahoma Research Day Abstracts by an authorized administrator of SWOSU Digital Commons. An ADA compliant document is available upon request. For more information, please contact [email protected]. Abstracts from the 2013 Oklahoma Research Day Held at the University of Central Oklahoma 05. Mathematics and Science 13. Mathematics 05.13.01 A simplified proof of the Kantorovich theorem for solving equations using scalar telescopic series Ioannis Argyros, Cameron University The Kantorovich theorem is an important tool in Mathematical Analysis for solving nonlinear equations in abstract spaces by approximating a locally unique solution using the popular Newton-Kantorovich method.Many proofs have been given for this theorem using techniques such as the contraction mapping principle,majorizing sequences, recurrent functions and other techniques.These methods are rather long,complicated and not very easy to understand in general by undergraduate students.In the present paper we present a proof using simple telescopic series studied first in a Calculus II class.
    [Show full text]
  • Three-Dimensional Bin-Packing Approaches, Issues, and Solutions
    Three Dimensional Bin-Packing Issues and Solutions Seth Sweep University of Minnesota, Morris [email protected] Abstract This paper reviews the three-dimensional version of the classic NP-hard bin-packing, optimization problem along with its theoretical relevance and practical importance. Also, new approximation solutions are introduced based on prior research. The three-dimensional bin-packing optimization problem concerns placing box-shaped objects of arbitrary size and number into a box-shaped, three-dimensional space efficiently. Approximation algorithms become a guide that attempts to place objects in the least amount of space and time. As a NP-hard problem, three-dimensional bin- packing holds much academic interest to computer scientists. However, this problem also has relevance in industrial settings such as shipping cargo and efficiently designing machinery with replaceable parts, such as automobiles. Industry relies on algorithms to provide good solutions to versions of this problem. This research project adapted common approaches to one-dimensional bin-packing, such as next fit and best fit, to three dimensions. Adaptation of these algorithms is possible by dividing the space of a bin. Then, by paying attention strictly to the width of each object, the one-dimensional approaches attempt to efficiently pack into the divided compartments of the original bin. Through focusing entirely on width, these divisions effectively become multiple one-dimensional bins. However, entirely disregarding the volume of the bin by ignoring height and depth may generate inefficient packings. As this paper details in more depth, generally cubical objects may pack well but exceptionally high or long objects leave large gaps of empty space unpacked.
    [Show full text]
  • Algorithmic Combinatorial Game Theory∗
    Playing Games with Algorithms: Algorithmic Combinatorial Game Theory∗ Erik D. Demaine† Robert A. Hearn‡ Abstract Combinatorial games lead to several interesting, clean problems in algorithms and complexity theory, many of which remain open. The purpose of this paper is to provide an overview of the area to encourage further research. In particular, we begin with general background in Combinatorial Game Theory, which analyzes ideal play in perfect-information games, and Constraint Logic, which provides a framework for showing hardness. Then we survey results about the complexity of determining ideal play in these games, and the related problems of solving puzzles, in terms of both polynomial-time algorithms and computational intractability results. Our review of background and survey of algorithmic results are by no means complete, but should serve as a useful primer. 1 Introduction Many classic games are known to be computationally intractable (assuming P 6= NP): one-player puzzles are often NP-complete (as in Minesweeper) or PSPACE-complete (as in Rush Hour), and two-player games are often PSPACE-complete (as in Othello) or EXPTIME-complete (as in Check- ers, Chess, and Go). Surprisingly, many seemingly simple puzzles and games are also hard. Other results are positive, proving that some games can be played optimally in polynomial time. In some cases, particularly with one-player puzzles, the computationally tractable games are still interesting for humans to play. We begin by reviewing some basics of Combinatorial Game Theory in Section 2, which gives tools for designing algorithms, followed by reviewing the relatively new theory of Constraint Logic in Section 3, which gives tools for proving hardness.
    [Show full text]
  • Exactly Solving Packing Problems with Fragmentation
    Exactly solving packing problems with fragmentation M. Casazza, A. Ceselli, Università degli Studi di Milano, Dipartimento di Informatica, OptLab – Via Bramante 65, 26013 – Crema (CR) – Italy {marco.casazza, alberto.ceselli}@unimi.it April 13, 2015 In packing problems with fragmentation a set of items of known weight is given, together with a set of bins of limited capacity; the task is to find an assignment of items to bins such that the sum of items assigned to the same bin does not exceed its capacity. As a distinctive feature, items can be split at a price, and fractionally assigned to different bins. Arising in diverse application fields, packing with fragmentation has been investigated in the literature from both theoretical, modeling, approximation and exact optimization points of view. We improve the theoretical understanding of the problem, and we introduce new models by exploiting only its combinatorial nature. We design new exact solution algorithms and heuristics based on these models. We consider also variants from the literature arising while including different objective functions and the option of handling weight overhead after splitting. We present experimental results on both datasets from the literature and new, more challenging, ones. These show that our algorithms are both flexible and effective, outperforming by orders of magnitude previous approaches from the literature for all the variants considered. By using our algorithms we could also assess the impact of explicitly handling split overhead, in terms of both solutions quality and computing effort. Keywords: Bin Packing, Item Fragmentation, Mathematical Programming, Branch&Price 1 1 Introduction Logistics has always been a benchmark for combinatorial optimization methodologies, as practitioners are traditionally familiar with the competitive advantage granted by optimized systems.
    [Show full text]
  • Solving Packing Problems with Few Small Items Using Rainbow Matchings
    Solving Packing Problems with Few Small Items Using Rainbow Matchings Max Bannach Institute for Theoretical Computer Science, Universität zu Lübeck, Lübeck, Germany [email protected] Sebastian Berndt Institute for IT Security, Universität zu Lübeck, Lübeck, Germany [email protected] Marten Maack Department of Computer Science, Universität Kiel, Kiel, Germany [email protected] Matthias Mnich Institut für Algorithmen und Komplexität, TU Hamburg, Hamburg, Germany [email protected] Alexandra Lassota Department of Computer Science, Universität Kiel, Kiel, Germany [email protected] Malin Rau Univ. Grenoble Alpes, CNRS, Inria, Grenoble INP, LIG, 38000 Grenoble, France [email protected] Malte Skambath Department of Computer Science, Universität Kiel, Kiel, Germany [email protected] Abstract An important area of combinatorial optimization is the study of packing and covering problems, such as Bin Packing, Multiple Knapsack, and Bin Covering. Those problems have been studied extensively from the viewpoint of approximation algorithms, but their parameterized complexity has only been investigated barely. For problem instances containing no “small” items, classical matching algorithms yield optimal solutions in polynomial time. In this paper we approach them by their distance from triviality, measuring the problem complexity by the number k of small items. Our main results are fixed-parameter algorithms for vector versions of Bin Packing, Multiple Knapsack, and Bin Covering parameterized by k. The algorithms are randomized with one-sided error and run in time 4k · k! · nO(1). To achieve this, we introduce a colored matching problem to which we reduce all these packing problems. The colored matching problem is natural in itself and we expect it to be useful for other applications.
    [Show full text]
  • Jigsaw Puzzles, Edge Matching, and Polyomino Packing: Connections and Complexity∗
    Jigsaw Puzzles, Edge Matching, and Polyomino Packing: Connections and Complexity∗ Erik D. Demaine, Martin L. Demaine MIT Computer Science and Artificial Intelligence Laboratory, 32 Vassar St., Cambridge, MA 02139, USA, {edemaine,mdemaine}@mit.edu Dedicated to Jin Akiyama in honor of his 60th birthday. Abstract. We show that jigsaw puzzles, edge-matching puzzles, and polyomino packing puzzles are all NP-complete. Furthermore, we show direct equivalences between these three types of puzzles: any puzzle of one type can be converted into an equivalent puzzle of any other type. 1. Introduction Jigsaw puzzles [37,38] are perhaps the most popular form of puzzle. The original jigsaw puzzles of the 1760s were cut from wood sheets using a hand woodworking tool called a jig saw, which is where the puzzles get their name. The images on the puzzles were European maps, and the jigsaw puzzles were used as educational toys, an idea still used in some schools today. Handmade wooden jigsaw puzzles for adults took off around 1900. Today, jigsaw puzzles are usually cut from cardboard with a die, a technology that became practical in the 1930s. Nonetheless, true addicts can still find craftsmen who hand-make wooden jigsaw puzzles. Most jigsaw puzzles have a guiding image and each side of a piece has only one “mate”, although a few harder variations have blank pieces and/or pieces with ambiguous mates. Edge-matching puzzles [21] are another popular puzzle with a similar spirit to jigsaw puzzles, first appearing in the 1890s. In an edge-matching puzzle, the goal is to arrange a given collection of several identically shaped but differently patterned tiles (typically squares) so that the patterns match up along the edges of adjacent tiles.
    [Show full text]
  • NP-Hard Triangle Packing Problems
    NP-Hard Triangle Packing Problems Amy Chou January 20, 2016 Abstract In computational geometry, packing problems ask whether a set of rigid pieces can be placed inside a target region such that no two pieces overlap. The triangle packing problem is a packing problem that involves triangular pieces, and it is crucial for algorithm design in many areas, including origami design, cutting industries, and warehousing. Previous works in packing algorithms have conjectured that triangle packing is NP-hard. In this paper, we mathematically prove this conjecture. We prove the NP-hardness of three distinct triangle packing problems: (i) packing right triangles into a rectangle, (ii) packing right triangles into a right triangle, and (iii) packing equilateral triangles into an equilateral triangle. We construct novel reductions from the known NP-complete problems 3-partition and 4-partition. Furthermore, we generalize that packing arbitrary triangles into an arbitrary target region is strongly NP-hard. Because triangle packing is NP-hard, triangle packing must be determined by approximation or heuristic algorithms rather than exact algorithms. 1 1 Introduction In a packing problem, we wish to determine whether a set of objects can be placed into a container such that no two objects overlap. These problems have been studied extensively and are motivated by a number of applications, including warehousing, origami design, newspaper paging, and cutting industries. In wood, glass, or steel industries, for example, packing is involved when determining how to cut pieces from large sheets of material. Complexity theory involves the classification of decision problems | problems where the answer is either yes or no | by computational hardness.
    [Show full text]
  • Packing in Two and Three Dimensions
    View metadata, citation and similar papers at core.ac.uk brought to you by CORE provided by Calhoun, Institutional Archive of the Naval Postgraduate School Calhoun: The NPS Institutional Archive Theses and Dissertations Thesis Collection 2003-06 Packing in two and three dimensions Martins, Gustavo H. A. http://hdl.handle.net/10945/9859 NAVAL POSTGRADUATE SCHOOL Monterey, California DISSERTATION PACKING IN TWO AND THREE DIMENSIONS by Gustavo H. A. Martins June 2003 Dissertation Supervisor: Robert F. Dell Approved for public release; distribution is unlimited THIS PAGE INTENTIONALLY LEFT BLANK REPORT DOCUMENTATION PAGE Form Approved OMB No. 0704-0188 Public reporting burden for this collection of information is estimated to average 1 hour per response, including the time for reviewing instruction, searching existing data sources, gathering and maintaining the data needed, and completing and reviewing the collection of information. Send comments regarding this burden estimate or any other aspect of this collection of information, including suggestions for reducing this burden, to Washington headquarters Services, Directorate for Information Operations and Reports, 1215 Jefferson Davis Highway, Suite 1204, Arlington, VA 22202-4302, and to the Office of Management and Budget, Paperwork Reduction Project (0704-0188) Washington DC 20503. 1. AGENCY USE ONLY (Leave blank) 2. REPORT DATE 3. REPORT TYPE AND DATES COVERED June 2003 Dissertation 4. TITLE AND SUBTITLE: Title (Mix case letters) 5. FUNDING NUMBERS Packing in Two and Three Dimensions 6. AUTHOR(S) Martins, Gustavo H. A. 7. PERFORMING ORGANIZATION NAME(S) AND ADDRESS(ES) 8. PERFORMING Naval Postgraduate School ORGANIZATION REPORT Monterey, CA 93943-5000 NUMBER 9. SPONSORING / MONITORING AGENCY NAME(S) AND ADDRESS(ES) 10.
    [Show full text]
  • Bin Packing with Directed Stackability Conflicts
    Acta Univ. Sapientiae, Informatica 7, 1 (2015) 31–57 DOI: 10.1515/ausi-2015-0011 Bin packing with directed stackability conflicts Attila BODIS´ University of Szeged email: [email protected] Abstract. The Bin Packing problem is a well-known and highly investi- gated problem in the computer science: we have n items given with their sizes, and we want to assign them to unit capacity bins such, that we use the minimum number of bins. In this paper, some generalizations of this problem are considered, where there are some additional stackability constraints defining that certain items can or cannot be packed on each other. The correspond- ing model in the literature is the Bin Packing Problem with Conflicts (BPPC), where this additional constraint is defined by an undirected conflict graph having edges between items that cannot be assigned to the same bin. However, we show some practical cases, where this conflict is directed, meaning that the items can be assigned to the same bin, but only in a certain order. Two new models are introduced for this problem: Bin Packing Problem with Hanoi Conflicts (BPPHC) and Bin Packing Problem with Directed Conflicts (BPPDC). In this work, the connection of the three conflict models is examined in detail. We have investigated the complexity of the new models, mainly the BPPHC model, in the special case where each item have the same size. We also considered two cases depending on whether re-ordering the items is allowed or not. We show that for the online version of the BPPHC model with unit 3 size items, every Any-Fit algorithm gives not better than 2 -competitive, Computing Classification System 1998: F.2.2 Mathematics Subject Classification 2010: 68R05 Key words and phrases: Bin Packing Problem, conflicts, directed conflicts, Hanoi conflicts, unit size items, dynamic programming 31 32 A.
    [Show full text]
  • Packing Trominoes Is NP-Complete, #P-Complete and ASP-Complete
    CCCG 2012, Charlottetown, P.E.I., August 8{10, 2012 Packing Trominoes is NP-Complete, #P-Complete and ASP-Complete Takashi Horiyama∗ Takehiro Itoy Keita Nakatsukaz Akira Suzukiy Ryuhei Ueharax Abstract PSPACE-complete even if all blocks are of size 1×2. On the other hand, sliding-block puzzles are polynomial- We study the computational complexity of packing puz- time solvable if all blocks are of size 1 × 1 (see [7] for zles of identical polyominoes. Packing dominoes (i.e., further details). Thus, in this sense, we have no gap for 1 × 2 rectangles) into grid polygons can be solved in sliding-block puzzles. polynomial time by reducing to a bipartite matching In this paper, we consider packing puzzles, and we × problem. On the other hand, packing 2 2 squares is aim to fill this kind of gap. We consider the problem known to be NP-complete. In this paper, we fill the of so-called identical packing into the two dimensional × gap between dominoes and 2 2 squares, that is, we plane: Given k identical polyominoes and a polygon P , consider the packing puzzles of trominoes. Note that determine whether the k polyominoes can be placed in there exist only two shapes of trominoes: L-shape and P without overlap or not. We note that P may contain I-shape. We show that their packing problems are both holes. Packing dominoes (i.e., 1 × 2 rectangles) into a NP-complete. Our reductions are carefully designed polyomino P (i.e., a polygon made by connecting unit so that we can also prove #P-completeness and ASP- squares) can be solved in polynomial time by reducing completeness of the counting and the another-solution- to a bipartite matching problem.
    [Show full text]
  • Permutation Puzzles: a Mathematical Perspective Lecture Notes
    Permutation Puzzles: A Mathematical Perspective 15 Puzzle, Oval Track, Rubik’s Cube and Other Mathematical Toys Lecture Notes Jamie Mulholland Department of Mathematics Simon Fraser University c Draft date May 7, 2012 Contents Contents i Preface ix Greek Alphabet xi 1 Permutation Puzzles 1 1.1 Introduction . .1 1.2 A Collection of Puzzles . .2 1.2.1 A basic game, let’s call it Swap ................................2 1.2.2 The 15-Puzzle . .4 1.2.3 The Oval Track Puzzle (or TopSpinTM)............................5 1.2.4 Hungarian Rings . .7 1.2.5 Rubik’s Cube . .8 1.3 Which brings us to the Definition of a Permutation Puzzle . 12 1.4 Exercises . 12 2 A Bit of Set Theory 15 2.1 Introduction . 15 2.2 Sets and Subsets . 15 2.3 Laws of Set Theory . 16 2.4 Examples Using Sage . 17 2.5 Exercises . 19 3 Permutations 21 3.1 Permutation: Preliminary Definition . 21 3.2 Permutation: Mathematical Definition . 23 3.2.1 Functions . 23 3.2.2 Permutations . 24 3.3 Composing Permutations . 26 i ii CONTENTS 3.4 Associativity of Permutation Composition . 28 3.5 Inverses of Permutations . 29 3.5.1 Inverse of a Product . 31 3.5.2 Cancellation Property . 32 3.6 The Symmetric Group Sn ........................................ 33 3.7 Rules for Exponents . 33 3.8 Order of a Permutation . 34 3.9 Exercises . 35 4 Permutations: Cycle Notation 37 4.1 Permutations: Cycle Notation . 37 4.2 Products of Permutations: Revisited . 39 4.3 Properties of Cycle Form . 40 4.4 Order of a Permutation: Revisited .
    [Show full text]