Tribute to Martin Gardner: Combinatorial Card Problems

Similar documents
March 5, What is the area (in square units) of the region in the first quadrant defined by 18 x + y 20?

Dealing with some maths

Table of Contents. Table of Contents 1

Math 1111 Math Exam Study Guide

Math 1111 Math Exam Study Guide

Counting integral solutions

Think Of A Number. Page 1 of 10

Gough, John , Doing it with dominoes, Australian primary mathematics classroom, vol. 7, no. 3, pp

Lecture 18 - Counting

NOTES ON SEPT 13-18, 2012

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

Teaching the TERNARY BASE

An Optimal Algorithm for a Strategy Game

SMT 2014 Advanced Topics Test Solutions February 15, 2014

Counting integral solutions

Chapter 4 Number Theory

6) A) both; happy B) neither; not happy C) one; happy D) one; not happy

CALCULATING SQUARE ROOTS BY HAND By James D. Nickel

ECS 20 (Spring 2013) Phillip Rogaway Lecture 1

FreeCell Puzzle Protocol Document


A complete set of dominoes containing the numbers 0, 1, 2, 3, 4, 5 and 6, part of which is shown, has a total of 28 dominoes.

Chapter 1. Probability

EXPLAINING THE SHAPE OF RSK

Staircase Rook Polynomials and Cayley s Game of Mousetrap

POKER (AN INTRODUCTION TO COUNTING)

Free Cell Solver. Copyright 2001 Kevin Atkinson Shari Holstege December 11, 2001

You ve seen them played in coffee shops, on planes, and

Latin Squares for Elementary and Middle Grades

Analyzing Games: Solutions

Poker Hands. Christopher Hayes

COUNTING AND PROBABILITY

Elementary Combinatorics

PRIMES STEP Plays Games

5.8 Problems (last update 30 May 2018)

Launchpad Maths. Arithmetic II

Maths Is Fun! Activity Pack Year 4

European Journal of Combinatorics. Staircase rook polynomials and Cayley s game of Mousetrap

Probability. The MEnTe Program Math Enrichment through Technology. Title V East Los Angeles College

THE NUMBER WAR GAMES

Game, Set, and Match Carl W. Lee September 2016

Three Pile Nim with Move Blocking. Arthur Holshouser. Harold Reiter.

Chapter 5: Probability: What are the Chances? Section 5.2 Probability Rules

Poker Rules Friday Night Poker Club

STRATEGY AND COMPLEXITY OF THE GAME OF SQUARES

Twenty-sixth Annual UNC Math Contest First Round Fall, 2017

Counting in Algorithms

The mathematics of the flip and horseshoe shuffles

CSE 1400 Applied Discrete Mathematics Permutations

Taking Sudoku Seriously

Puzzles to Play With

Sorting Squares. (Martin Gardner)

{ a, b }, { a, c }, { b, c }

UK JUNIOR MATHEMATICAL CHALLENGE. April 26th 2012

Activity 6: Playing Elevens

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

Acing Math (One Deck At A Time!): A Collection of Math Games. Table of Contents

HOMEWORK ASSIGNMENT 5

CSE 312: Foundations of Computing II Quiz Section #2: Inclusion-Exclusion, Pigeonhole, Introduction to Probability

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

Math 166: Topics in Contemporary Mathematics II

Puzzling Math, Part 2: The Tower of Hanoi & the End of the World!

2-1 Inductive Reasoning and Conjecture

Principle of Inclusion-Exclusion Notes

Gale s Vingt-et-en. Ng P.T. 1 and Tay T.S. 2. Department of Mathematics, National University of Singapore 2, Science Drive 2, Singapore (117543)

PROBLEM SET 2 Due: Friday, September 28. Reading: CLRS Chapter 5 & Appendix C; CLR Sections 6.1, 6.2, 6.3, & 6.6;

The mathematics of the flip and horseshoe shuffles

Impartial Combinatorial Games Berkeley Math Circle Intermediate II Ted Alper Evans Hall, room 740 Sept 1, 2015

1. An office building contains 27 floors and has 37 offices on each floor. How many offices are in the building?

Block 1 - Sets and Basic Combinatorics. Main Topics in Block 1:

THE ASSOCIATION OF MATHEMATICS TEACHERS OF NEW JERSEY 2018 ANNUAL WINTER CONFERENCE FOSTERING GROWTH MINDSETS IN EVERY MATH CLASSROOM

CS 3233 Discrete Mathematical Structure Midterm 2 Exam Solution Tuesday, April 17, :30 1:45 pm. Last Name: First Name: Student ID:

MATH 351 Fall 2009 Homework 1 Due: Wednesday, September 30

LESSON 2. Objectives. General Concepts. General Introduction. Group Activities. Sample Deals

Multiple Choice Questions for Review

CS 202, section 2 Final Exam 13 December Pledge: Signature:

Honors Precalculus Chapter 9 Summary Basic Combinatorics

On Variants of Nim and Chomp

Frustration solitaire

Chapter 2 Integers. Math 20 Activity Packet Page 1

Grades 7 & 8, Math Circles 27/28 February, 1 March, Mathematical Magic

Solutions to the European Kangaroo Pink Paper

Name: Checked: jack queen king ace

Kenken For Teachers. Tom Davis January 8, Abstract

Discrete Finite Probability Probability 1

Final Exam, Math 6105

Math 3338: Probability (Fall 2006)

How to Become a Mathemagician: Mental Calculations and Math Magic

The Pigeonhole Principle

New Sliding Puzzle with Neighbors Swap Motion

2009 Philippine Elementary Mathematics International Contest Page 1

CSE 312: Foundations of Computing II Quiz Section #2: Inclusion-Exclusion, Pigeonhole, Introduction to Probability (solutions)

Lecture 2.3: Symmetric and alternating groups

Problem 2A Consider 101 natural numbers not exceeding 200. Prove that at least one of them is divisible by another one.

Problem Set 8 Solutions R Y G R R G

The mathematics of Septoku

Live Casino game rules. 1. Live Baccarat. 2. Live Blackjack. 3. Casino Hold'em. 4. Generic Rulette. 5. Three card Poker

MATH 215 DISCRETE MATHEMATICS INSTRUCTOR: P. WENG

Jong C. Park Computer Science Division, KAIST

Fundamentals of Probability

Transcription:

Tribute to Martin Gardner: Combinatorial Card Problems Doug Ensley, SU Math Department October 7, 2010

Combinatorial Card Problems The column originally appeared in Scientific American magazine.

Combinatorial Card Problems The column originally appeared in Scientific American magazine. Reprinted in the book, Time Travel and Other Mathematical Bewilderments, published in 1988.

Combinatorial Card Problems The column originally appeared in Scientific American magazine. Reprinted in the book, Time Travel and Other Mathematical Bewilderments, published in 1988. Released in the complete collection, Martin Gardners Mathematical Games, by MAA on DVD.

Combinatorial Card Problems The column originally appeared in Scientific American magazine. Reprinted in the book, Time Travel and Other Mathematical Bewilderments, published in 1988. Released in the complete collection, Martin Gardners Mathematical Games, by MAA on DVD. Applets to accompany some of the puzzles can be found at http://webspace.ship.edu/deensley/flash/

Dramatizing an important number theorem... [Place your cards] face down in a row with the ace at the left. The following turning procedure is now applied, starting at the left at each step and proceeding to the right: Turn over every card. Turn over every second card. (Cards 2, 4, 6, 8,10, and Q are turned face down.) Turn over every third card. Continue in this manner, turning every fourth card, every fifth card, and so on until you turn over only the last card.

Dramatizing an important number theorem... A good classroom exercise is to prepare 100 small cards bearing numbers 1 through 100, stand them with their backs out in serial order on a blackboard ledge and apply the turning procedure. Sure enough, at the finish the only visible numbers will be the squares: 1, 4, 9, 16, 25, 36, 49, 64, 81, and 100. That is too large a sampling to be coincidental. The next step is to prove that no matter how large the deck, only squares survive the turning procedure.

Dramatizing an important number theorem... A simple roof introduces one of the oldest and most fundamental of number theorems: A positive integer has an odd number of divisors (the divisors include 1 and the number itself), if and only if the number is a square. This is easy to see. Most divisors of a number come in pairs. Consider 72. The smallest divisor, 1, goes into the number 72 times, giving the pair 1 and 72. The next-larger divisor, 2, goes into the number 36 times, giving the pair 2 and 36. Similarly, 72 = 3 24 = 4 18 = 6 12 = 8 9. The only divisor of a number that is not paired with a different number is a divisor that is a square root. Consequently, all non-squares have an even number of divisors, and all squares have an odd number of divisors.

Lehmers Motel Manager Problem Mr. Smith manages a motel. It consists of n rooms in a straight row. There is no vacancy. Smith is a psychologist who plans to study the effects of rearranging his guests in all possible ways. Every morning he gives them a new permutation. The weather is miserable, raining almost daily. To minimize his guests discomfort, each daily rearrangement is made by exchanging the occupants of two adjoining rooms. Is there a simple algorithm that will run through all possible arrangements by switching adjacent occupants at each step?

Lehmer s Motel Manager Problem Model the problem for 4 guests using cards A, 2, 3, 4 from your packet. Here is a list of all permutations. Try to do only adjacent swaps while checking off all of them. A234 2A34 3A24 4A23 A243 2A43 3A42 4A32 A324 23A4 32A4 42A3 A342 234A 324A 423A A423 24A3 34A2 43A2 A432 243A 342A 432A

Lehmer s Motel Manager Problem [An algorithmic solution] has important applications in computer science. Many problems require a computer in order to run through all permutations of n elements, and if this can be done by exchanging adjacent pairs, there is a significant reduction in computer time.... Hugo Steinhaus, a Polish mathematician, was the first to discover [the algorithm]. It provides a solution for the abacus problem on page 49 of his One Hundred Problems in Elementary Mathematics, first published in Poland in 1958. In the early 1960 s the procedure was independently rediscovered at almost the same time by H. F. Trotter and Selmer M. Johnson, each of whom published it separately.

Lehmer s Motel Manager Problem Solution. Think about it recursively. First solve the problem for n = 3 cards. A23 A32 3A2 32A 23A 2A3

Lehmer s Motel Manager Problem Solution. Think about it recursively. First solve the problem for n = 3 cards, and follow the 3... A23 A32 3A2 32A 23A 2A3

Lehmer s Motel Manager Problem Algorithm : Weave the 4 through the solution to the puzzle when n = 3, and you will have a solution to the puzzle when n = 4. A234 A342 432A 243A A243 A324 342A 423A A423 3A24 324A 42A3 4A23 3A42 32A4 24A3 4A32 34A2 23A4 2A43 A432 43A2 234A 2A34

John Conway s game of TopSwops Hold packet of 13 cards face up in your hand. Value of top card tells you how many to deal onto the table.

John Conway s game of TopSwops Hold packet of 13 cards face up in your hand. Value of top card tells you how many to deal onto the table. After dealing, collect the cards from the table and replace these on top of the packet in your hand.

John Conway s game of TopSwops Hold packet of 13 cards face up in your hand. Value of top card tells you how many to deal onto the table. After dealing, collect the cards from the table and replace these on top of the packet in your hand. Applet: http://webspace.ship.edu/deensley/flash/ topswots/topswots.html

John Conway s game of TopSwops

John Conway s game of TopSwops The process definitely gets into a loop when an Ace is on top of the packet. Are there longer cycles that repeat, or do we always end up stuck with an Ace on top?

John Conway s game of TopSwops Theorem (Wilf) The game of TopSwops always ends with an Ace on top. Proof. For a given arrangement of the cards c 1 c 2... c 13, a card is considered to be in its natural position if card c i has value i. For example, in the following arrangement cards 2 and 7 are in their natural positions: 6, 2, Q, 4, 8, T, 7, 9, 5, J, A, K, 3

John Conway s game of TopSwops Theorem (Wilf) The game of TopSwops always ends with an Ace on top. Proof continued... Define the function F as follows: F (c 1, c 2,..., c 13 ) = 2 j c j is natural If the top card has value K, then after one move in the game, that card is in its natural position. Moreover, any cards that were previously in natural positions have values less than K.

John Conway s game of TopSwops Theorem (Wilf) The game of TopSwops always ends with an Ace on top. Proof continued... For example, F (6, 2, Q, 4, 8, T, 7, 9, 5, J, A, K, 3) = 2 2 + 2 7 = 132 and after the TopSwops move, we have F (T, 8, 4, Q, 2, 6, 7, 9, 5, J, A, K, 3) = 2 6 + 2 7 = 192 Since I gained 2 6 = 64 and risked losing at most 2 1 + 2 2 + 2 3 + 2 4 + 2 5, the value of F definitely goes up with each move. The only exception is when A is first. Since F goes up with every other move, the process must terminate with an A on top.

John Conway s game of TopSwops Wilf writes, Since the numbers increase steadily but cannot exceed 16382, it follows that the game must halt after at most that many moves. A slightly more careful study shows, in fact, that for a game with n cards, no more than 2 n 1 moves can take place. This raises an interesting unsolved question: What arrangement of the thirteen cards provides the longest possible game of TopSwops?

John Conway s other games BotDrops (call the bottom card, count, and put the reversed set on the bottom) is more interesting. If you play it for a while, Conway writes, you might convince yourself that it always loops in a KQKQKQ... sequence, but that is not always the case. On rare occasions other loops are possible. (Can you find one?) Applet: http://webspace.ship.edu/deensley/flash/ botdrops/botdrops.html

John Conway s other games When the game is extended to two or more players, each with a packet, it becomes much harder to analyze. For instance, suppose two players have packets of thirteen cards each. One has spades, the other hearts. They play two player TopSwops as follows. Each shuffles his packet. Player A calls his top card, then B counts that number off his packet and replaces the reversed cards on top of his packet. B now calls his top card, A counts and replaces the reversed cards on top of his packet. This continues with players alternating calls. Applet: http://webspace.ship.edu/deensley/flash/ topswots/topswotsfor2.html

John Conway s other games It is a curious fact, reports Conway, that as soon as an ace is called, the calls go into a loop that starts with an ace, then a sequence, then an ace again (either the same ace or the other one), then the same sequence is repeated in reverse. For example, the first called ace might generate the following loop: 1-3-2-6-4-1-4-6-2-3-1. Note that the sequence between the first two ace calls is the reverse of the sequence between the second and third ace calls. It is an unproved conjecture (or was when I last heard from Conway) that in two-player TopSwops an ace is always called. It is not known if the game can conclude in a loop without an ace, although it is known that if a loop includes an ace, it includes it just twice.

Langford Puzzle Remove from a deck all the cards of three suits that bear values of ace through 9. Try to arrange these twenty-seven cards in a single row to meet the following proviso. Between the first two cards of every value k there are exactly k cards, and between the second and third cards of every value k there also are exactly k cards. For instance, between the first and second 7 s there must be just seven cards, not counting the two 7 s. Similarly, seven cards separate the second and third 7 s. The rule applies to each value from 1 through 9.

Silverman Card Puzzle Use two complete suits, say spades and diamonds, and match cards in pairs so that the sum of each pair is a perfect square. Ace = 1, Jack = 11, Queen = 12, King = 13 Applet: http://webspace.ship.edu/deensley/flash/ combinatorialcards/card_comb.html

Silverman Card Puzzle

Silverman Card Puzzle General question: For what values of n can the numbers in {1, 2, 3,..., n} be paired with the numbers in {1, 2, 3,..., n} so that the pairs each sum to perfect a square?

Silverman Card Puzzle General question: For what values of n can the numbers in {1, 2, 3,..., n} be paired with the numbers in {1, 2, 3,..., n} so that the pairs each sum to perfect a square? Example solution when n = 5: (1,3), (2,2), (3,1), (4,5), (5,4)

Silverman Card Puzzle General question: For what values of n can the numbers in {1, 2, 3,..., n} be paired with the numbers in {1, 2, 3,..., n} so that the pairs each sum to perfect a square? Example solution when n = 5: (1,3), (2,2), (3,1), (4,5), (5,4) Card puzzle addresses n = 13.

Silverman Card Puzzle Alan Hadsell and Stoddard Vandersteel together used a computer to generalize Silverman s problem. When you use a packet of cards from a single suit, solutions exist only for n = 3, 5, 8, 9, 10, 12, and 13, and each solution is unique.

Silverman Card Puzzle Alan Hadsell and Stoddard Vandersteel together used a computer to generalize Silverman s problem. When you use a packet of cards from a single suit, solutions exist only for n = 3, 5, 8, 9, 10, 12, and 13, and each solution is unique. From 14 through 31 all values of n have multiple solutions.

Silverman Card Puzzle Alan Hadsell and Stoddard Vandersteel together used a computer to generalize Silverman s problem. When you use a packet of cards from a single suit, solutions exist only for n = 3, 5, 8, 9, 10, 12, and 13, and each solution is unique. From 14 through 31 all values of n have multiple solutions. They report that the number of solutions, beginning with n = 14, are 2, 4, 3, 2, 5, 15, 21, 66, 37, 51, 144, 263, 601, 333, 2119, 2154, 2189, 3280,...