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

Tribute to Martin Gardner: Combinatorial Card Problemswebspace.ship.edu/deensley/gardner/gardner.pdf · Tribute to Martin Gardner: Combinatorial Card Problems Doug Ensley, SU Math

Apr 26, 2018

Download

Documents

trinhdat
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Tribute to Martin Gardner: Combinatorial Card Problemswebspace.ship.edu/deensley/gardner/gardner.pdf · Tribute to Martin Gardner: Combinatorial Card Problems Doug Ensley, SU Math

Tribute to Martin Gardner: Combinatorial CardProblems

Doug Ensley, SU Math Department

October 7, 2010

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

Page 2: Tribute to Martin Gardner: Combinatorial Card Problemswebspace.ship.edu/deensley/gardner/gardner.pdf · Tribute to Martin Gardner: Combinatorial Card Problems Doug Ensley, SU Math

Combinatorial Card Problems

I The column originally appeared in Scientific Americanmagazine.

I Reprinted in the book, Time Travel and Other MathematicalBewilderments, published in 1988.

I Released in the complete collection, Martin GardnersMathematical Games, by MAA on DVD.

I Applets to accompany some of the puzzles can be found athttp://webspace.ship.edu/deensley/flash/

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

Page 3: Tribute to Martin Gardner: Combinatorial Card Problemswebspace.ship.edu/deensley/gardner/gardner.pdf · Tribute to Martin Gardner: Combinatorial Card Problems Doug Ensley, SU Math

Combinatorial Card Problems

I The column originally appeared in Scientific Americanmagazine.

I Reprinted in the book, Time Travel and Other MathematicalBewilderments, published in 1988.

I Released in the complete collection, Martin GardnersMathematical Games, by MAA on DVD.

I Applets to accompany some of the puzzles can be found athttp://webspace.ship.edu/deensley/flash/

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

Page 4: Tribute to Martin Gardner: Combinatorial Card Problemswebspace.ship.edu/deensley/gardner/gardner.pdf · Tribute to Martin Gardner: Combinatorial Card Problems Doug Ensley, SU Math

Combinatorial Card Problems

I The column originally appeared in Scientific Americanmagazine.

I Reprinted in the book, Time Travel and Other MathematicalBewilderments, published in 1988.

I Released in the complete collection, Martin GardnersMathematical Games, by MAA on DVD.

I Applets to accompany some of the puzzles can be found athttp://webspace.ship.edu/deensley/flash/

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

Page 5: Tribute to Martin Gardner: Combinatorial Card Problemswebspace.ship.edu/deensley/gardner/gardner.pdf · Tribute to Martin Gardner: Combinatorial Card Problems Doug Ensley, SU Math

Combinatorial Card Problems

I The column originally appeared in Scientific Americanmagazine.

I Reprinted in the book, Time Travel and Other MathematicalBewilderments, published in 1988.

I Released in the complete collection, Martin GardnersMathematical Games, by MAA on DVD.

I Applets to accompany some of the puzzles can be found athttp://webspace.ship.edu/deensley/flash/

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

Page 6: Tribute to Martin Gardner: Combinatorial Card Problemswebspace.ship.edu/deensley/gardner/gardner.pdf · Tribute to Martin Gardner: Combinatorial Card Problems Doug Ensley, SU Math

“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 leftat each step and proceeding to the right:

I Turn over every card.

I Turn over every second card. (Cards 2, 4, 6, 8 ,10, and Q areturned face down.)

I Turn over every third card.

I Continue in this manner, turning every fourth card, every fifthcard, and so on until you turn over only the last card.”

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

Page 7: Tribute to Martin Gardner: Combinatorial Card Problemswebspace.ship.edu/deensley/gardner/gardner.pdf · Tribute to Martin Gardner: Combinatorial Card Problems Doug Ensley, SU Math

“Dramatizing an important number theorem...’

“A good classroom exercise is to prepare 100 small cards bearingnumbers 1 through 100, stand them with their backs out in serialorder on a blackboard ledge and apply the turning procedure. Sureenough, 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 asampling to be coincidental. The next step is to prove that nomatter how large the deck, only squares survive the turningprocedure.”

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

Page 8: Tribute to Martin Gardner: Combinatorial Card Problemswebspace.ship.edu/deensley/gardner/gardner.pdf · Tribute to Martin Gardner: Combinatorial Card Problems Doug Ensley, SU Math

“Dramatizing an important number theorem...’

“A simple roof introduces one of the oldest and most fundamentalof number theorems: A positive integer has an odd number ofdivisors (the divisors include 1 and the number itself), if and only ifthe number is a square. This is easy to see. Most divisors of anumber come in pairs. Consider 72. The smallest divisor, 1, goesinto the number 72 times, giving the pair 1 and 72. Thenext-larger divisor, 2, goes into the number 36 times, giving thepair 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 differentnumber is a divisor that is a square root. Consequently, allnon-squares have an even number of divisors, and all squares havean odd number of divisors.”

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

Page 9: Tribute to Martin Gardner: Combinatorial Card Problemswebspace.ship.edu/deensley/gardner/gardner.pdf · Tribute to Martin Gardner: Combinatorial Card Problems Doug Ensley, SU Math

Lehmers Motel Manager Problem

“Mr. Smith manages a motel. It consists of n rooms in a straightrow. There is no vacancy. Smith is a psychologist who plans tostudy the effects of rearranging his guests in all possible ways.Every morning he gives them a new permutation. The weather ismiserable, raining almost daily. To minimize his guests’ discomfort,each daily rearrangement is made by exchanging the occupants oftwo adjoining rooms. Is there a simple algorithm that will runthrough all possible arrangements by switching adjacent occupantsat each step?”

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

Page 10: Tribute to Martin Gardner: Combinatorial Card Problemswebspace.ship.edu/deensley/gardner/gardner.pdf · Tribute to Martin Gardner: Combinatorial Card Problems Doug Ensley, SU Math

Lehmer’s Motel Manager Problem

“Model the problem for 4 guests using cards A, 2, 3, 4 from yourpacket. Here is a list of all permutations. Try to do only adjacentswaps while checking off all of them.”

A234 2A34 3A24 4A23A243 2A43 3A42 4A32A324 23A4 32A4 42A3A342 234A 324A 423AA423 24A3 34A2 43A2A432 243A 342A 432A

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

Page 11: Tribute to Martin Gardner: Combinatorial Card Problemswebspace.ship.edu/deensley/gardner/gardner.pdf · Tribute to Martin Gardner: Combinatorial Card Problems Doug Ensley, SU Math

Lehmer’s Motel Manager Problem

“[An algorithmic solution] has important applications in computerscience. Many problems require a computer in order to runthrough all permutations of n elements, and if this can be done byexchanging adjacent pairs, there is a significant reduction incomputer time.. . . Hugo Steinhaus, a Polish mathematician, was the first todiscover [the algorithm]. It provides a solution for the abacusproblem on page 49 of his One Hundred Problems in ElementaryMathematics, first published in Poland in 1958. In the early 1960’sthe procedure was independently rediscovered at almost the sametime by H. F. Trotter and Selmer M. Johnson, each of whompublished it separately.”

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

Page 12: Tribute to Martin Gardner: Combinatorial Card Problemswebspace.ship.edu/deensley/gardner/gardner.pdf · Tribute to Martin Gardner: Combinatorial Card Problems Doug Ensley, SU Math

Lehmer’s Motel Manager Problem

Solution. Think about it recursively. First solve the problem forn = 3 cards.

A23A323A232A23A2A3

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

Page 13: Tribute to Martin Gardner: Combinatorial Card Problemswebspace.ship.edu/deensley/gardner/gardner.pdf · Tribute to Martin Gardner: Combinatorial Card Problems Doug Ensley, SU Math

Lehmer’s Motel Manager Problem

Solution. Think about it recursively. First solve the problem forn = 3 cards, and follow the 3 . . .

A23A323A232A23A2A3

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

Page 14: Tribute to Martin Gardner: Combinatorial Card Problemswebspace.ship.edu/deensley/gardner/gardner.pdf · Tribute to Martin Gardner: Combinatorial Card Problems Doug Ensley, SU Math

Lehmer’s Motel Manager Problem

Algorithm : Weave the “4” through the solution to the puzzlewhen n = 3, and you will have a solution to the puzzle when n = 4.

A234 A342 432A 243AA243 A324 342A 423AA423 3A24 324A 42A34A23 3A42 32A4 24A34A32 34A2 23A4 2A43A432 43A2 234A 2A34

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

Page 15: Tribute to Martin Gardner: Combinatorial Card Problemswebspace.ship.edu/deensley/gardner/gardner.pdf · Tribute to Martin Gardner: Combinatorial Card Problems Doug Ensley, SU Math

John Conway’s game of TopSwops

I Hold packet of 13 cards face up in your hand.

I Value of top card tells you how many to deal onto the table.

I After dealing, collect the cards from the table and replacethese on top of the packet in your hand.

I Applet: http://webspace.ship.edu/deensley/flash/

topswots/topswots.html

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

Page 16: Tribute to Martin Gardner: Combinatorial Card Problemswebspace.ship.edu/deensley/gardner/gardner.pdf · Tribute to Martin Gardner: Combinatorial Card Problems Doug Ensley, SU Math

John Conway’s game of TopSwops

I Hold packet of 13 cards face up in your hand.

I Value of top card tells you how many to deal onto the table.

I After dealing, collect the cards from the table and replacethese on top of the packet in your hand.

I Applet: http://webspace.ship.edu/deensley/flash/

topswots/topswots.html

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

Page 17: Tribute to Martin Gardner: Combinatorial Card Problemswebspace.ship.edu/deensley/gardner/gardner.pdf · Tribute to Martin Gardner: Combinatorial Card Problems Doug Ensley, SU Math

John Conway’s game of TopSwops

I Hold packet of 13 cards face up in your hand.

I Value of top card tells you how many to deal onto the table.

I After dealing, collect the cards from the table and replacethese on top of the packet in your hand.

I Applet: http://webspace.ship.edu/deensley/flash/

topswots/topswots.html

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

Page 18: Tribute to Martin Gardner: Combinatorial Card Problemswebspace.ship.edu/deensley/gardner/gardner.pdf · Tribute to Martin Gardner: Combinatorial Card Problems Doug Ensley, SU Math

John Conway’s game of TopSwops

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

Page 19: Tribute to Martin Gardner: Combinatorial Card Problemswebspace.ship.edu/deensley/gardner/gardner.pdf · Tribute to Martin Gardner: Combinatorial Card Problems Doug Ensley, SU Math

John Conway’s game of TopSwops

The process definitely gets into a loop when an Ace is on top ofthe packet. Are there longer cycles that repeat, or do we alwaysend up stuck with an Ace on top?

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

Page 20: Tribute to Martin Gardner: Combinatorial Card Problemswebspace.ship.edu/deensley/gardner/gardner.pdf · Tribute to Martin Gardner: Combinatorial Card Problems Doug Ensley, SU Math

John Conway’s game of TopSwops

Theorem (Wilf) The game of TopSwops always ends with an Aceon top.Proof. For a given arrangement of the cards c1c2 . . . c13, a card isconsidered to be in its “natural position” if card ci has value i . Forexample, in the following arrangement cards “2” and “7” are intheir natural positions:

6, 2, Q, 4, 8, T, 7, 9, 5, J, A, K, 3

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

Page 21: Tribute to Martin Gardner: Combinatorial Card Problemswebspace.ship.edu/deensley/gardner/gardner.pdf · Tribute to Martin Gardner: Combinatorial Card Problems Doug Ensley, SU Math

John Conway’s game of TopSwops

Theorem (Wilf) The game of TopSwops always ends with an Aceon top.Proof continued... Define the function F as follows:

F (c1, c2, . . . , c13) =∑

cj is natural

2j

If the top card has value K , then after one move in the game, thatcard is in its natural position. Moreover, any cards that werepreviously in natural positions have values less than K .

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

Page 22: Tribute to Martin Gardner: Combinatorial Card Problemswebspace.ship.edu/deensley/gardner/gardner.pdf · Tribute to Martin Gardner: Combinatorial Card Problems Doug Ensley, SU Math

John Conway’s game of TopSwops

Theorem (Wilf) The game of TopSwops always ends with an Aceon top.Proof continued... For example,

F (6, 2,Q, 4, 8,T , 7, 9, 5, J,A,K , 3) = 22 + 27 = 132

and after the TopSwops move, we have

F (T , 8, 4,Q, 2, 6, 7, 9, 5, J,A,K , 3) = 26 + 27 = 192

Since I gained 26 = 64 and risked losing at most21 + 22 + 23 + 24 + 25, the value of F definitely goes up with eachmove.The only exception is when A is first. Since F goes up with everyother move, the process must terminate with an A on top. �

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

Page 23: Tribute to Martin Gardner: Combinatorial Card Problemswebspace.ship.edu/deensley/gardner/gardner.pdf · Tribute to Martin Gardner: Combinatorial Card Problems Doug Ensley, SU Math

John Conway’s game of TopSwops

Wilf writes, “Since the numbers increase steadily but cannotexceed 16382, it follows that the game must halt after at most thatmany moves. A slightly more careful study shows, in fact, that fora game with n cards, no more than 2n−1 moves can take place.”This raises an interesting unsolved question: What arrangement ofthe thirteen cards provides the longest possible game ofTopSwops?’

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

Page 24: Tribute to Martin Gardner: Combinatorial Card Problemswebspace.ship.edu/deensley/gardner/gardner.pdf · Tribute to Martin Gardner: Combinatorial Card Problems Doug Ensley, SU Math

John Conway’s other games

“BotDrops (call the bottom card, count, and put the reversed seton the bottom) is more interesting. If you play it for a while,Conway writes, you might convince yourself that it always loops ina KQKQKQ . . . sequence, but that is not always the case. Onrare occasions other loops are possible. (Can you find one?)”Applet: http://webspace.ship.edu/deensley/flash/

botdrops/botdrops.html

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

Page 25: Tribute to Martin Gardner: Combinatorial Card Problemswebspace.ship.edu/deensley/gardner/gardner.pdf · Tribute to Martin Gardner: Combinatorial Card Problems Doug Ensley, SU Math

John Conway’s other games

“When the game is extended to two or more players, each with apacket, it becomes much harder to analyze. For instance, supposetwo players have packets of thirteen cards each. One has spades,the other hearts. They play two player TopSwops as follows. Eachshuffles his packet. Player A calls his top card, then B counts thatnumber off his packet and replaces the reversed cards on top of hispacket. B now calls his top card, A counts and replaces thereversed cards on top of his packet. This continues with playersalternating calls.”Applet: http://webspace.ship.edu/deensley/flash/

topswots/topswotsfor2.html

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

Page 26: Tribute to Martin Gardner: Combinatorial Card Problemswebspace.ship.edu/deensley/gardner/gardner.pdf · Tribute to Martin Gardner: Combinatorial Card Problems Doug Ensley, SU Math

John Conway’s other games

“It is a curious fact, reports Conway, that as soon as an ace iscalled, the calls go into a loop that starts with an ace, then asequence, then an ace again (either the same ace or the otherone), 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 thereverse of the sequence between the second and third ace calls. Itis an unproved conjecture (or was when I last heard from Conway)that in two-player TopSwops an ace is always called. It is notknown if the game can conclude in a loop without an ace, althoughit is known that if a loop includes an ace, it includes it just twice.”

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

Page 27: Tribute to Martin Gardner: Combinatorial Card Problemswebspace.ship.edu/deensley/gardner/gardner.pdf · Tribute to Martin Gardner: Combinatorial Card Problems Doug Ensley, SU Math

Langford Puzzle

Remove from a deck all the cards of three suits that bear values oface through 9. Try to arrange these twenty-seven cards in a singlerow to meet the following proviso. Between the first two cards ofevery value k there are exactly k cards, and between the secondand third cards of every value k there also are exactly k cards. Forinstance, between the first and second 7’s there must be just sevencards, not counting the two 7’s. Similarly, seven cards separate thesecond and third 7’s. The rule applies to each value from 1through 9.

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

Page 28: Tribute to Martin Gardner: Combinatorial Card Problemswebspace.ship.edu/deensley/gardner/gardner.pdf · Tribute to Martin Gardner: Combinatorial Card Problems Doug Ensley, SU Math

Silverman Card Puzzle

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

combinatorialcards/card_comb.html

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

Page 29: Tribute to Martin Gardner: Combinatorial Card Problemswebspace.ship.edu/deensley/gardner/gardner.pdf · Tribute to Martin Gardner: Combinatorial Card Problems Doug Ensley, SU Math

Silverman Card Puzzle

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

Page 30: Tribute to Martin Gardner: Combinatorial Card Problemswebspace.ship.edu/deensley/gardner/gardner.pdf · Tribute to Martin Gardner: Combinatorial Card Problems Doug Ensley, SU Math

Silverman Card Puzzle

I 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?

I Example solution when n = 5: (1,3), (2,2), (3,1), (4,5), (5,4)

I Card puzzle addresses n = 13.

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

Page 31: Tribute to Martin Gardner: Combinatorial Card Problemswebspace.ship.edu/deensley/gardner/gardner.pdf · Tribute to Martin Gardner: Combinatorial Card Problems Doug Ensley, SU Math

Silverman Card Puzzle

I 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?

I Example solution when n = 5: (1,3), (2,2), (3,1), (4,5), (5,4)

I Card puzzle addresses n = 13.

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

Page 32: Tribute to Martin Gardner: Combinatorial Card Problemswebspace.ship.edu/deensley/gardner/gardner.pdf · Tribute to Martin Gardner: Combinatorial Card Problems Doug Ensley, SU Math

Silverman Card Puzzle

I 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?

I Example solution when n = 5: (1,3), (2,2), (3,1), (4,5), (5,4)

I Card puzzle addresses n = 13.

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

Page 33: Tribute to Martin Gardner: Combinatorial Card Problemswebspace.ship.edu/deensley/gardner/gardner.pdf · Tribute to Martin Gardner: Combinatorial Card Problems Doug Ensley, SU Math

Silverman Card Puzzle

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

I From 14 through 31 all values of n have multiple solutions.

I They report that the number of solutions, beginning withn = 14, are 2, 4, 3, 2, 5, 15, 21, 66, 37, 51, 144, 263, 601,333, 2119, 2154, 2189, 3280, . . .

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

Page 34: Tribute to Martin Gardner: Combinatorial Card Problemswebspace.ship.edu/deensley/gardner/gardner.pdf · Tribute to Martin Gardner: Combinatorial Card Problems Doug Ensley, SU Math

Silverman Card Puzzle

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

I From 14 through 31 all values of n have multiple solutions.

I They report that the number of solutions, beginning withn = 14, are 2, 4, 3, 2, 5, 15, 21, 66, 37, 51, 144, 263, 601,333, 2119, 2154, 2189, 3280, . . .

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

Page 35: Tribute to Martin Gardner: Combinatorial Card Problemswebspace.ship.edu/deensley/gardner/gardner.pdf · Tribute to Martin Gardner: Combinatorial Card Problems Doug Ensley, SU Math

Silverman Card Puzzle

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

I From 14 through 31 all values of n have multiple solutions.

I They report that the number of solutions, beginning withn = 14, are 2, 4, 3, 2, 5, 15, 21, 66, 37, 51, 144, 263, 601,333, 2119, 2154, 2189, 3280, . . .

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