Two Parity Puzzles Related to Generalized Space-Filling Peano Curve Constructions and Some Beautiful Silk Scarves

Similar documents
Which Rectangular Chessboards Have a Bishop s Tour?

Odd king tours on even chessboards

Pennies vs Paperclips

BMT 2018 Combinatorics Test Solutions March 18, 2018

I.M.O. Winter Training Camp 2008: Invariants and Monovariants

LESSON 2: THE INCLUSION-EXCLUSION PRINCIPLE

MATHEMATICS ON THE CHESSBOARD

CSE548, AMS542: Analysis of Algorithms, Fall 2016 Date: Sep 25. Homework #1. ( Due: Oct 10 ) Figure 1: The laser game.

The patterns considered here are black and white and represented by a rectangular grid of cells. Here is a typical pattern: [Redundant]

Mind Ninja The Game of Boundless Forms

37 Game Theory. Bebe b1 b2 b3. a Abe a a A Two-Person Zero-Sum Game

arxiv: v1 [cs.cc] 21 Jun 2017

Lecture 1, CS 2050, Intro Discrete Math for Computer Science

A GRAPH THEORETICAL APPROACH TO SOLVING SCRAMBLE SQUARES PUZZLES. 1. Introduction

MAS336 Computational Problem Solving. Problem 3: Eight Queens

LUNDA DESIGNS by Ljiljana Radovic

!! Figure 1: Smith tile and colored pattern. Multi-Scale Truchet Patterns. Christopher Carlson. Abstract. Multi-Scale Smith Tiles

Sequential Dynamical System Game of Life

Aesthetically Pleasing Azulejo Patterns

Grade 7/8 Math Circles Game Theory October 27/28, 2015

Positive Triangle Game

Canadian Mathematics Competition An activity of The Centre for Education in Mathematics and Computing, University of Waterloo, Waterloo, Ontario

arxiv: v2 [cs.cc] 20 Nov 2018

arxiv: v1 [math.co] 24 Oct 2018

Lecture 20: Combinatorial Search (1997) Steven Skiena. skiena

SUDOKU Colorings of the Hexagonal Bipyramid Fractal

PRIMES STEP Plays Games

Games and the Mathematical Process, Week 2

GEOGRAPHY PLAYED ON AN N-CYCLE TIMES A 4-CYCLE

A few chessboards pieces: 2 for each student, to play the role of knights.

Jamie Mulholland, Simon Fraser University

Background. Game Theory and Nim. The Game of Nim. Game is Finite 1/27/2011

Grade 6 Math Circles Combinatorial Games November 3/4, 2015

The mathematics of Septoku

Spring 06 Assignment 2: Constraint Satisfaction Problems

A year ago I investigated a mathematical problem relating to Latin squares. Most people, whether knowing it or not, have actually seen a Latin square

arxiv:cs/ v2 [cs.cc] 27 Jul 2001

Conway s Soldiers. Jasper Taylor

New Toads and Frogs Results

The Archbishop's Odyssey

A Grid of Liars. Ryan Morrill University of Alberta

14th Bay Area Mathematical Olympiad. BAMO Exam. February 28, Problems with Solutions

Reflections on the N + k Queens Problem

Chess Handbook: Course One

Twenty-fourth Annual UNC Math Contest Final Round Solutions Jan 2016 [(3!)!] 4

Liberty Pines Academy Russell Sampson Rd. Saint Johns, Fl 32259

ENGR170 Assignment Problem Solving with Recursion Dr Michael M. Marefat

SMT 2014 Advanced Topics Test Solutions February 15, 2014

Crossing Game Strategies

Modeling a Rubik s Cube in 3D

Grade 6 Math Circles Combinatorial Games - Solutions November 3/4, 2015

Tilings with T and Skew Tetrominoes

Problem ID: coolestskiroute

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

Fractals. SFU-CMS Math Camp 2008 Randall Pyke;


Chessboard coloring. Thomas Huxley

Lu 1. The Game Theory of Reversi

Tangent: Boromean Rings. The Beer Can Game. Plan. A Take-Away Game. Mathematical Games I. Introduction to Impartial Combinatorial Games

An Amazing Mathematical Card Trick

MAGIC SQUARES KATIE HAYMAKER

N-Queens Problem. Latin Squares Duncan Prince, Tamara Gomez February

JUSTIN. 2. Go play the following game with Justin. This is a two player game with piles of coins. On her turn, a player does one of the following:

Binary Games. Keep this tetrahedron handy, we will use it when we play the game of Nim.

The game of Paco Ŝako

Senior Math Circles February 10, 2010 Game Theory II

Problem 4.R1: Best Range

Advances in Ordered Greed

28,800 Extremely Magic 5 5 Squares Arthur Holshouser. Harold Reiter.

STRATEGY AND COMPLEXITY OF THE GAME OF SQUARES

Ivan Guo. Broken bridges There are thirteen bridges connecting the banks of River Pluvia and its six piers, as shown in the diagram below:

Latin Squares for Elementary and Middle Grades

a b c d e f g h i j k l m n

Grade 6 Math Circles March 7/8, Magic and Latin Squares

Three of these grids share a property that the other three do not. Can you find such a property? + mod

Plan. Related courses. A Take-Away Game. Mathematical Games , (21-801) - Mathematical Games Look for it in Spring 11

Lecture 19 November 6, 2014

arxiv: v1 [math.co] 12 Jan 2017

Recovery and Characterization of Non-Planar Resistor Networks

Figure 1. Mathematical knots.

arxiv: v2 [math.ho] 23 Aug 2018

Square Roots and the Pythagorean Theorem

Measurement of perimeter and area is a topic traditionally

Olympiad Combinatorics. Pranav A. Sriram

The Unreasonably Beautiful World of Numbers

Asymptotic Results for the Queen Packing Problem

Problem Set 8 Solutions R Y G R R G

Counting Things. Tom Davis March 17, 2006

Equilateral k-isotoxal Tiles

Lecture 6: Latin Squares and the n-queens Problem

8. You Won t Want To Play Sudoku Again

Analyzing Games: Solutions

UNIVERSITY of PENNSYLVANIA CIS 391/521: Fundamentals of AI Midterm 1, Spring 2010

ON 4-DIMENSIONAL CUBE AND SUDOKU

Problem of the Month What s Your Angle?

Backtracking. Chapter Introduction

Lower Bounds for the Number of Bends in Three-Dimensional Orthogonal Graph Drawings

Tile Number and Space-Efficient Knot Mosaics

PARITY, SYMMETRY, AND FUN PROBLEMS 1. April 16, 2017

Closed Almost Knight s Tours on 2D and 3D Chessboards

Transcription:

Two Parity Puzzles Related to Generalized Space-Filling Peano Curve Constructions and Some Beautiful Silk Scarves http://www.dmck.us Here is a simple puzzle, related not just to the dawn of modern mathematics or to the building of fractal space-filling curves, but, remarkably enough, to creating some really beautiful silk scarves. PUZZLE: Imagine a new chess piece that can move only up, down, right, or left, one square at a time. In other words, its only moves are those that would be legal for both a rook and a king to make from a given position. Hence, we will call this hybrid piece a rooking. In particular, a rooking can never move diagonally its next position is always an edge-adjacent square on the board. Place a rooking on a chessboard s lower left corner, and consider analogous to a knight s tour an open-ended rooking tour that visits every square on the board exactly once, with the constraint that the tour must end on the diagonally opposite, upper right corner of the board. Figure 1 shows the start of a rooking tour. How many such diagonally anchored rooking tours are there on a chessboard? Figure 1: A potential rooking tour on an 8 8 chessboard, starting from the lower left square and desiring to end at the upper right.

ANSWER: This is a trick question, because as much as it seems that there should be lots of diagonally-anchored rooking tours, on an 8 8 chessboard none is possible. A little experimentation shows, however, that there are plenty of such open-ended rooking tours on a 7 7 or a 9 9 board. Figure 2 shows two sample solutions for 7 7. Further trial and error shows that no tour can be found on 4 4 or 6 6 boards. So it seems there is some kind of parity-dependent condition based on whether n is even or odd. Figure 2: Two different rooking tours on a 7 7 non-chessboard. A rooking tour here is equivalent to what s called a Hamiltonian path that visits every vertex exactly once in a special graph called a grid-graph. Each vertex corresponds to a board square, and each arc connecting vertices represents one of the possible moves to an edge-adjacent neighboring square (vertex). But we can understand the situation without resorting to abstract graphs. As so often happens with parity puzzles, a simple coloring argument helps explain what s going on. Generalize from an 8 8 chessboard to an n n board, and apply the usual black and white chess/checkerboard coloring so that no two edge-adjacent squares have the same color. 1 Arbitrarily assign black to the lower left square on the board. Notice that, as is true in both Figures 1 and 2, regardless of whether n is even or odd, the color of the upper right square will always be the same color as the lower left square, i.e., black. Each time a rooking moves, the color of the square it lands on flips. So no matter which way the piece travels (right, left, up, down), if (and only if) the number of moves made so far is even, it must have landed on a black square. And if (and only if) the number of moves is odd, the rooking must be on a white square. But for a rooking tour to visit every square exactly once, it must in the general case make n 2 1 moves (i.e., 63 moves for an n = 8 chessboard). This is because initially placing the rooking on the lower left black square is not a move. So the number of squares left to visit is always one less than the number of squares. When n is even, the maximum tour length n 2 1 is odd, whereas when n is odd, the maximum length is even. But for a rooking tour to end on the upper right square which is always the same 1 This is equivalent to using the parity of the sum of a square s row and column coordinates i.e., a taxicab distance from the lower left as the color. 2

color as the lower left starting square the tour s length must be even. Hence, n can only be odd for any solutions to exist. On a chessboard n = 8 is even, so there are no solutions. Q.E.D. DISCUSSION: It turns out that some but not all rooking tours from lower left to upper right on an odd n n subdivision of the square, can be used as recursively repeatable motifs for constructing generalized Peano, or space-filling, curves. To explain, let s start with a little math history. Modern mathematics is said 2 to have begun in the late 1800s when Cantor proved that there is more than one kind of infinity. Counterintuitively, he also showed that there are exactly the same infinite number of points in a unit line segment as there are in a unit square. The mathemetician Peano then went one step further. He was the first to show how to map each point 0 t 1 in the unit line segment (the domain) to a point P (t) = (x, y) in the unit square (the range) so that no point in the unit square would be missed 3. Remarkably, though, this mapping is also continuous. In other words, taken as a function of t varying continuously from 0 to 1, this mapping P (t) forms a connected curve, albeit one that is never smooth. This is now known as a space-filling curve, because even though curves are usually thought of as one-dimensional, this infinitely long curve actually reaches every point in (i.e., it fills) a two-dimensional square area. A space-filling curve is infinitely detailed and always makes instantaneous infinitesimal turns, no matter how closely you look at it with a microscope. Indeed, this newfangled type of curve was so revolutionary that it required the centuries-old idea of a curve to be redefined. These days, it s considered a type of fractal. Figure 3: Only two rooking tours on a 3 3 non-chessboard, each the diagonal mirror of the other. Peano s discovery was described entirely symbolically using a base 3 number system and a mirroring operator, because he was interested in proving certain gnarly analytic details related to continuity. But in essence, his construction relied on the simplest non-trivial rooking tour solutions on a 3 3 subdivision of the square. Depending on whether the first move is right or up, there are exactly two such tours; as Figure 3 shows, each is the mirror image across the diagonal of the other. Peano knew his analytic technique was generalizable to any odd n, but it worked for only a particular kind of rooking tour, such as the one on the left of Figure 2. There are, however, a whole lot of other solutions, and the number of them increases in a combinatorial explosion as odd n gets larger. For example, there are 18 solutions, not counting mirror images, for n = 5; there are 3364 2 See, e.g., Freeman Dyson, Characterizing irregularity", Science 200, No. 4342 (May 12, 1978), pp. 677 678. 3 Technically, some points are hit more than once. The formal word describing this is surjective. 3

(again not counting mirror images) on the 7 7 subdivision of the square; and for n = 9, there are over 6 million distinct solutions. And these are only those rooking tours that work as motifs for space-filling curves. To build a space-filling curve from any given rooking tour T, place n 2 copies of T, each reduced in size by 1/n into each square that T visits, in the same order as the moves of T specify, but oriented as necessary to ensure that adjacent tours can be connected by one extra rooking move. If one wants to be a Peano purist, one can alternate between T and its mirror image each time one makes a copy, as Figure 4 shows. Regardless of whether one uses mirrored copies or not, the result is equivalent to a new rooking tour that passes through every sub-square on an n 2 n 2 board. And we can iterate this process as many times as we want. Each resulting rooking tour more closely approximates the eventual space-filling curve, which only exists as the infinite limit of this process. Figure 4: The first, second, and third Peano Curve approximation, built from copies of a 3 3 rooking tour and its mirror image. Mirroring occurs in alternate squares. ANOTHER PUZZLE: So the next puzzle is, what characterizes those rooking tours that work as space-filling curve motifs, as opposed to those that don t? For instance, the rooking tours in Figure 3 both work, but the one below in Figure 5 doesn t. What s the difference? Figure 5: A 7 7 rooking tour that cannot be used as a recursive space-filling curve motif. Why? 4

Again, we can use the coloring of squares on the board to show what s going on. Simply place a diagonal line in each square. If the square is black, the diagonal line travels from the square s lower left to upper right; if white, from lower right to upper left. The pattern should now be much easier to see, as Figure 6 illustrates. Figure 6: The rooking tour on the left won t work as a motif, but the one on the right will. The rooking tour on the right works as a space-filling curve motif because whenever the path makes a turn, it never crosses a diagonal line. This condition, in turn (so to speak), is what allows the reduced copies the motif placed in each square to be connected with a single (reduced, shown in blue) rooking move to create the next recursive approximation path, as shown in Figure 7. Figure 8 shows the third approximation, which is a self-avoiding rooking tour with 7 6 1 = 117 648 rooking moves in it. You can magnify the illustration in your PDF reader to see the details. The path starts at the lower left, and ends at the upper right of the Figure. Figure 7: Second approximation to space-filling curve using motif on right of Figure 6, from lower left to upper right. 5

Figure 8: Third approximation to space-filling curve using motif on right of Figure 6 from lower left to upper right. The self-avoiding path comprises 7 6 1 = 117 648 rooking moves. If you are viewing the above resolution-independent figure in a PDF file, zoom in to see the self-avoiding path from lower left to upper right. 6

THE SCARF CONNECTION: Doug McKenna is an award-winning software designer, a mathematical artist, and most recently a fabric designer who has studied and played with space-filling curve construction motifs since the mid-1970s, when he began drawing them on early computer graphics equipment at Yale University. He soon found himself one of several programmer/illustrators who worked at IBM Research with the father of fractals, the late Benoît Mandelbrot, illustrating spacefilling curves and other geometric fractal constructions in Mandelbrot s The Fractal Geometry of Nature, 4. This seminal treatise has been named 5 one of the most scientifically influential books of the 20th century, not the least because of its persuasive, mathematically accurate illustrations. McKenna has discovered a variety of fundamental space-filling curve constructions, and has long been using their motif patterns in mathematical art. He writes custom software to construct motif patterns for various kinds of space-filling curves, composes them into space-filling curve approximations, and then graphically plays with the resulting paths. He is fascinated with examining constrained but not too constrained combinatorial spaces in search of æsthetically interesting patterns. And rooking tours are one such playground he has been exploring. Most tours, including the original Peano curve s motif, are not æsthetically interesting enough to warrant using in fabric design. But when odd n is sufficiently large, a combinatorial world of choice opens up. By using special motifs found via computer search methods, combined with judicious use of mirror imaging, post-processing using smoothing algorithms, and coloring connected areas to one side of the path, McKenna can create marvelous patterns where, for instance, one cannot tell the difference between foreground and background. This Escher-esque quality plays with the eye and the brain s visual system. Figure 9 shows one of McKenna s designs, which he calls Synaptica. Figure 9: Synaptica approximates a Peano curve using a recursive 9 9 rooking tour. It turns out these make both great tile designs as well as great fabric designs: McKenna is now manufacturing and selling mathematical silk scarves based on his own favorite space-filling curve approximation patterns (see http://www.dmck.us). If you are in New York City, you can pick one up at the new Museum of Mathematics on East 26th Street. 4 See page 444 for partial credits. 5 American Scientist, 1999. 7

Figure 10: Five scarves patterned using McKenna s space-filling curve approximations. The leftmost four of them are based on rooking tour motifs, see http://www.dmck.us. Their placement on a piano is a pun on the name Peano. Figure 11: Two scarf patterns. Blue Thirteenski on the left, lavendar Honeydipper on the right. 8

Most of his current collection of scarves are patterned using generalized Peano curve approximations as described above, where only odd n subdivisions of the square work. One pattern is based on the 7 7 subdivision, several on the 9 9, and one on the 11 11. (One other is based on a completely different construction, related to a Sierpinski carpet, that McKenna discovered a few years ago.) Once a few recursive levels have been iterated, the paths are smoothed and connected so as to fill the entire length of a five-foot long scarf. The underlying rooking tour on each scarf can literally be several orders of magnitude longer, from one diagonal corner of the scarf to the opposite diagonal corner. Mathematically minded people have a different, more platonic, conception of what s beautiful, says McKenna. I m interested in using both the underlying math and my own choices inside a combinatorial space to create something that the average person considers beautiful and elegant, even if she or he doesn t understand what is going on under the hood. The math, algorithms and puzzle solutions are certainly beautiful or elegant in their own abstract way. But when it all works together, and the eye is pleased, it s a much more satisfying artistic experience. Doug McKenna DMCK Designs G4G11 March, 2014 9