Dan KALMAN AND DAN PRITIKIN
rand Meister n-celle winced at the
furious voice echoing round the Privy
Council Chamber. Queen Regent Kursci,
of House A-stir, came to the end of her
tirade, “I want them all dead, and may
the blade of Payne be rusty and dull,” she hissed, glar-
ing at each man in turn.
Ferrous, Master of Whisperers, stecled himself. “Yes,
‘Your Grace, But we must tread carefully. You cannot
simply behead 100 knights of the realm without cause.
Ask Meister
celle,
She pierced the grand meister with a serpent’s eye.
And what have you to say’?
Ferrous speaks truly, Your Grace. In such matters, it
‘were best to follow the ancient forms and customs with
the utmost diligence. Imprisoning the most. valorous
knights from all the great houses has already excited
comment, And I remind you, knights of one great house
should not be chained to those of another. It violates
ancient tradition and sacred dicta
‘v's piteh black in those dungeons, and the prisoners
wear only filthy rags,” said Kursei. “You ean’ tell one
house from another, and if you can’t differentiate, the
chain rule doesn’t apply. In any case, I know they are all,
traitors
‘But without definite proof, Your Grace,
must have a means to prove their innocence,” said
Ferrous,
he accused
‘Yes, indisputably,” intoned -celle. “Settle the fate
CNM oaO
A Tour of Knights
of each accused knight by fortune’s decree. The gods
will surely spare the innocent, But consider carefully
what method of trial would be most suitable?”
A quiet voice answered, “Perhaps the Game of Stones,
Meister
Kursoi regarded the speaker with disdain. Assistant
Meister Sumwell Tarly, newly arrived from the Citadel,
Timid as a mouse, he rarely dared
speak in her presence. “What is this Game of Stones?”
1 read of it in an ancient, scroll in Castle Black's cel-
impressed her not
lar. Each knight's name is inscribed on a disk of stone,
and likewise on a lidded coffer. The stones are randomly
ibuted, one per coffer. Bach knight must then find
a
the stone with his name, He is permitted to open half of
The coffers, and if none contains his name-stone, he has
mh
alled the trial
TK pox on your Game of Stones,” cried Kursei. “Each
knight has even odds of success. Half will go free
‘beg your pardon, Your Grace,” Sumwell said.
failed to explain fully. AUI the knights must succeed, or
all are condemned.
Ab, yes,” said x-celle
trial, now that you
believe I remember this
jumwell here has refreshed my
memory. An ancient and honored rite, indeed. How
perfectly fitted to the matter at hand.”
“Though perhaps with odds a bit too transparently
stacked against the knights,” purred Ferrous. “Each
knight has even odds of suceess, but for all 100 to suc-
coed is equivalent to tossing 100 consecutive heads with
worw.maa.org/mathhorizons
Math Horizons :: April 017.51 fair coin. They should be given at Jeast the appear-
ance of a chance for salvation. ’Twould be more politic.”
“Then let them have seven trials, in honor of the
Seven Gods,” said t-celle, “If they are innocent, surely
cone god will guide each knight to his namestone.”
“Yes,” agreed Kursei, considering. “Every day for a
‘week we will remix and redistribute the stones. On the
day that every knight has found his name-stone, they
will al go free. And if the gods permit them to fail sev-
‘en times, the knights will be proved guilty.” She smiled
crookedly. Even with seven chances to play, 100 heads
in a row would be an impossible goal. Unless the gods
tervened. “Yes,” she said again. “Let it be so. Sumwell
inform the prisoners.”
o_
“Wait, what now?” asked Ser Torus Lyrell, Knight
of Flowers, and heir to the local maximum at High
Garden,
“Has none among you the wit to follow a simple
plan?” Sumwell asked in exasperation. He had explained
the Game of Stones, but the imprisoned knights reo-
ognized neither their peril nor the hope of escape he
offered, He turned to the least knightly of all. “What say
you, Ser Davos?”
Daves C-vorthy’ had never excelled in school, con-
tent with his 2.0 GPA. But in later year, while sery-
ing Stainless Baratheon, he'd found a surprising knack
for logic. Through sheer logic, he had unified a chaos
of distinct sects into a single combined sect, earning
thereby his nickname: the Union Knight. With equal
logical thought, he now analyzed the odds for the Game
of Stones.
“Let's se,” he said, “On any given day, each knight
has probability 1/2 of finding his namo-stone. Each
night's fate is independent of every other's, so all 100
will succeed with probability (1/2)!°, Even with seven,
repetitions, the chance for escape is only seven in 2",
or about 0.000000000000000000000000000006. You can't
argue with that. It’s simple logic.”
“So it: would appear,” said Sumovel. “Yet, in an ancient
scroll I read of a strategy that defies the odds. I have
sinmulated the game many times for groupe of varying
sizes, finding remarkably consistent results. When the
knights use the strategy, they all survive one time in
three!”
‘The Union Knight considered. “With 2/3 probability
of failure each day, seven fails in a row has probability
(2/3)'. This follows the eminent probabilist, Ser Newly,
because the repeated games are independent Ser Newly
6 April 2017: : Math Horizons :: www.maa.org/mathhorizons
trials. We estimate (2/3)" using Napier’s bones, getting
0.06, And thus we have about a 94 percent chance of
escape. How is that possible?”
“I don’t know,” said Sumwell. “The scroll gave no ex-
planation, but my experiments confirm it. Following the
strategy vastly improves the odds for survival.”
“Sounds impossible, But al right, Explain the strategy
again.”
“Gladly: When you enter the room of coffers, open
the cofer marked with your name. Ifthe stone within
says Ser Davos, you have succeeded and your trial ends.
But supposed it bears a diferent name, say, Ser Torus.
Then you next open his coffer. Again, you may find
your name-stone. If not, whatever name you see, open
that one next. If i says Ser Jury (who can always get a
handle on Ser Torus) you look in Jury's coffer. If it says
Ser Cumfrince (he’s too pious by a factor of r), then you
look in his. It says Ser Jexion—
“OK, I get it, I get it,” Ser Davos said. “Each name I
find leads me to the next coffer. Clearly, if I open 50 cof-
fers and never find my name, Ihave foiled. But will this
strategy somehow lead me to my name?”
“Not necessarily,” Summell said “But T know this: If
you and all the other knights faithfully follow this strat-
egy, the odds will be about 1 in 3 of all finding their
cvn names on any given dey. By your own calculations,
with seven days of play, you will ll survive with prob-
ability roughly 94 percent.”
“Tdon't understand it said Davos. “And I'm not sure
T belive it. On the other hand, 1 know of no better
strategy. So we'll do it. By the Seven, I shall make them
learn and follow this strategy!”
a
‘And so it eame to pass. On the frst day of the Game of
Stones the frst knight was called. “Ser Amc, Champion
of Porsalyn, stand thou forward.” Pale as bone, the
night stepped up to the meister.
“Do you understand the rales ofthe trial?"
‘The knight nodded.
“Very well. Proceed.”
Ser Amie surveyed the room: 100 closed coer, ar
rayed on eight great tables. ‘There on the third table he
spied the coffer bearing his name, He opened the lid and
Jooked inside
a
Do the knights face virtual certainty of destruction, or
nearly sure survival? Before reading any further, readers
should analyze Sumwell’s strategy and work out this
puzzle for themselves. Ml
Ce neFigure 1. Ferrous
put the numbers 1 to 6
in the six numbered boxes.
umwell Tarly awoke with a start. Who
could be knocking at the door this lat
He roused himself,
opened the door to find
‘A word with you, Sumwel, if you please,”
he said, pushing into the room. “Tell me about this
secret strategy for surviving the Game of Stones.
Sumy vhy, what do you mean
My Lord?
‘Oh, come now,
drew on his robe
1 was stunned. “W
said Ferrous. “I know all about your
conversation with the Union Knight. My little birds
can fly everywhere. Even into dungeons. Alas, they do
not always understand what they hear. So, I have come
explanation, Tell me about the strategy
Sumwell’s heart sank. Would Ferrous report him to
1e queen regent? “If you know about the strategy
he began,
Ferrous cut in. “Don’t worry, I won't tell Kursei. The
‘gods have many ways to protect the innocent. Perhaps
they inspired you to suggest the Game of Stones and
to reveal the strategy to the knights. But the prospect
of a loophole intrigues me. How is it possible?”
T don't know,” Sumwell said. He repeated what he
told Ser Daves, including the experimental evidence.
‘But how do you conduct such an experiment?”
asked Ferrous. “Please show me!
‘Certainly, My Lord. For simplicity, consider six
knights, and use numbers instead of names. There will
be six numbered stones and coffers, and we will ran-
domly put one stone into each coffer. Would you like to
choose the order?
All right,” said Ferrous, reaching for parchment and
quill. “Here, I am drawing boxes for the six coffers, and
putting one number in each.” (See figure 1.)
ow,” said Sumwel, “Iet’s work out an entire day of
the Game of Stones. When knight 1 takes his turn, he
looks first in box 1. Finding a 6 sends him to box 6.
That sends him to box 3.”
“So he has failed,” Ferrous said
knights can open only three
“Yes,” Sumwvell said. “But let us continue his strat
With six boxes, the
egy regardless. From box 3 he goes to box 5. There he
finds a 1, his own number. If he continues to follow the
strategy, that would take him back to box 1, and from
there the process repeats.
“I see,” said Ferrous. “We could make a diagram
showing knight 1's tour of all the boxes, like this:
1369335315,
wore maa.org/mathhorizons
Math Horizons :: April 2017.7“Bxactly. And that doesn’t just apply to knight 1
All the other knights in this cycle must also progress
through the boxes in the same order. In fact, each of
these knights would find his om number in the fourth
box he opened, because it takes four steps for the cycle
to repeat.”
“And what about the other knights?” Ferrous asked,
“Ab. Knight 2's tour is 2 4 2—..., 90 he finds his
number in the seoond box he opens. And being in the
same cycle, knight 4 will also sueceed with the second,
opened box. Actually, a better diagram would look like
this.” (See figure 2.)
“Right,” said Sumwell, “And in that one diagram, you
have portrayed exactly how the Game of Stones will
play out. Four knights will follow the tour on the left
‘and the other two the tour on the right: Every knight
in the frst group will fail to find his number in three
attempts; the other two will each find his mmber on
the second try.”
“Yes, I see,” Ferrous said. “And clearly, no matter
hhow many knights are involved, and no matter how the
numbers are mixed up, some such diagram will govern
the game. Every knight. will follow a tour according
to whichever cyele he isin, and all that matters is
the length of the cycle. For our game, every knight
in a cycle of length 50 or less will succeed, but all
‘the knights in longer cycles will fail, assuming they
all faithfully follow the strategy. But how does that
improve their odds?”
“haven't figured that out,” Sumwell replied,
“though the strategy clearly invalidates Ser Davos's
independence assumption. Each time the game is
played, we mix up 100 stones and put them in the
boxes. Now work out the cycle diagram for that
mixing, As an ensemble, the knights succeed if every
cycle in your diagram has length 50 or less. If 100
stones are mixed at random, what is the probability
that no cycle is longer than 50? That’s the question.”
“T'm a bit rusty,” Ferrous said, “at probability theory.
But let us consider every possible way to place the
stones in the boxes. How many are there? And in how
many are the cycles all of length 60 or less? Answering,
‘these questions will tell us the probability that the
nights succeed in any particular game, if the stones
are truly mixed randomly.”
“Lcan answer the first part,” Sumwell said, There are
100 choices for the frst stone, 99 for the second stone,
and so on. In total, the stones ean be put into boxes in
this many ways: 100-99-98---2-1. This was explained
8 April 2017
‘Math Horizons :: wwwwemaa.org/mathhorizons
—— ————— ————_
in the Game of Stones scroll. The ancients wrote this
number as 1001, and there the scroll ended. The rest
had crumbled to dust.”
“But look,” said Ferrous. “There can be at most one
cycle longer than 50. Say one cycle runs through 60
different boxes. Then there will only be 40 more boxes
left over, 80 the eyeles for those boxes can’t be longer
than 50. The same applies if there is any cycle longer
than 50."
“Agreed.”
“So how many different orderings are possible if one
cycle has length 60? First off, there are
(a _ 100
on)
‘ways to select which 60 stones appear in the eyele
Once they are selected, we can choose the lowest,
among them as the first stone in the cycle, but the
remaining 59 stones can be ordered in any way at all,
0 our 60 stones can be arranged in 59! different cycles,
‘Thus, a cycle of length 60 can occur in (1%]69! dlfler-
cent ways.”
“Wait,” Sunwell seid. “You forgot the remaining 40
stones. Those ean be placed into the remaining 40
‘boxes in 40! ways. Therefore, of all the 100! ways to
put stones in boxes, a cycle of length 60 will ceur in
{i|50!401 of them. This shows that the probability of
accycle of length 60 is
_{100}591401
70 (60 J 1008
“Aha!” exclaimed Ferrous. “We get massive
cancellation:
100! 59/40! 1
60140! 100! ~ 60
Can that be right? Tt seems too simple.”
“It’s simple all right!” said Sumwell. “Simple like a
fox! But it’s right. Now let me see . ..” He closed his
eyes, mumbling to himself, then turned to Ferrous,
beaming, “Yes it is right, and it shows the general rule.
Poo
Figure 2.
Ferrous's
illustration
of the
cycles of
boxes.‘The probability of a cycle of length n is 1/1, as long as
nis more than half the number of knights,
“And that means we can compute the probability of
success. The knights lose if there is a cycle of length
51, or a cycle of length 52, or a cycle of any other
leutheweeing 60 Than et mal eco pa
siete bes olabiies ad be eomnael Tap
That's the probbity of fuze. Subtract tht fom
Beautiful” said Forum "Thow Fit Me aad Fint
“The” Sunwell "Towe Fit Peon sigue
without a debt, And hres eomethng do, That ext
Th
Si on= Setanta
‘That is a value we can look up in this handy seroll of
natural logarithms: In2 = 0.69.
“That does it,” said Ferrous. “We have demonstrated
the truth behind your experimental results. Each time
the Game of Stones is played, the probability of failure
is 0.68... which is very nearly 2/3. So each day, the
knights have only one chance in three of succeeding,
But they will fail seven times in a row with probability
roughly (In2)" = 0.0768... That gives them a 92 per
cent chance of winning at least once during the week.”
“Excellent,” Ferrous said. “Most satisfactory. And
tay I add that it has been a pleasure collaborating
with you. But tell me: Do you always carry around a
seroll of natural logarithms?
on
Epilogue
On the fourth day of the Game of Stones, every knight
found his name stone after looking in 50 or fewer boxes
In fact, the largest number of boxes any knight openesd
‘was 43, and by a curious coincidence, exactly 43 knights
had to look in that many bexes. Queen Regent Kursei
was livid, and between hurling insults and erockery at her
counselors, she demanded to know how the knights had
accomplished this feat, beating astronomical odds. She
herself had computed the probability of such an outcome
to be at most 0.000000000000000000000000000006. Grand
Meister r-celle pointed out the obvious explaation: in-
tervention by the gods. Apparently the knights really were
innocent of treason. Sumwell knew the truth: Kursei's
caleulation included a classic error, fllaciously assuming
independence of events. Wisely, Sumwell lft this thought
unspoken. i
Further Reading
This problem was first proposed by the Dan
computer scientist Peter Bro Miltersen; it appeared
in an article with Anna Gal in 2003 (“The Cell Probe
Complexity of Succinct Data Structures,” Proceedings
Sth International Colloguium on Automata,
Languages and Programming (ICALP), 332-344),
Later, several people wrote about, and modified, the
problem. Our presentation is most similar to Peter
Winkter’s in the College Mathematics Journal (‘Names
in Boxes Puzzle,” 37 no. 4 [September 2006] 260, 285,
280). Eugene Curtin and Max Warshawer proved that
the eycle tracing strategy is optimal (“The Locker
Puzzle,” Math. Intelligencer 28 no. 1 [March 2006]
28-31).
Dan Kalman teaches mathematics at American
University. He is known as the Crypto Knight for his
undecipherable handwriting and mystic green glow. His
prior Math Horizons articles include “Harvey Plotter
and the Circle of Irrationality” (with Nathan Carter).
Dan Pritikin teaches mathematics at Miami
University. He dabbles in math parody lyrics to pop
” and
songs, such as Katy Perry's “I Squished a C
Britney Spears’s “Hint Me Baby One More Time
hp:/uotorg/i0.4:69/mathherizons 24.45
wsrw.maa.org/mathhorizons:: Math Horizons :: April 2037 9