The first rule of recursion is that you are allowed to believe the smaller problem is already solved.
I taught it that way in the Hearth the morning after the cell, with ten volunteers and a drum. Crane had picked eight of them and Ruth two. They stood in a half circle in the dining hall under the crooked banner while I drew three pedestals on the floor with chalk. Dolores was among them. She hadn't been asked. She'd walked up and stood at the end of the line and looked at the floor.
"Eight discs is too big to think about," I said. "So don't. Think about one disc. How do you move one disc from the left pedestal to the right?"
"You pick it up and put it down," said a man named Orrin.
"Right. That's the whole answer. It's called the base case, the smallest version of the problem, the one you can do without thinking. Everything else is built on top of it. Now two discs."
I drew two. They worked it out themselves. Small disc to the middle, big disc to the right, small disc on top. Three moves.
"Now three." I stopped. "Don't solve it from the beginning. Say what you *wish* you had."
A thin woman named Marit said slowly, "I wish the top two were somewhere else already."
"Where?"
"The middle one. Out of the way. Then the big one goes straight across." She looked up. "And then I put the two back on top."
"That's the algorithm." I wrote it on the wall.
**To move n discs from A to C, using B:** **1. Move the top n minus 1 discs from A to B.** **2. Move disc n from A to C.** **3. Move the n minus 1 discs from B to C.**
"Step one and step three are the same problem as the one we started with, just one disc smaller. You don't know how to move seven discs? Use the rule on seven. It says move six. And so on, down to one, which you can do. You trust that the smaller version works, and you build on that trust. That's all recursion is. A problem that calls itself on a smaller version, with a floor you can stand on."
"It sounds like cheating," said Orrin.
"It's the opposite of cheating. Every step is real work. You just don't have to see all of it at once."
I counted how often each disc moved, because it mattered to the plan. The smallest disc, every other move: a hundred and twenty-eight times. The next, sixty-four. Then thirty-two, sixteen, eight, four, two. The biggest, once. A hundred and twenty-eight plus sixty-four plus thirty-two plus sixteen plus eight plus four plus two plus one. Two hundred and fifty-five.
"One volunteer per disc," I said. "Eight people, each in charge of one size. The ninth, Ruth, calls the move number. The tenth is Garrick. Drum."
"A *drum*," said Garrick, hefting an iron-banded barrel that had last held pickles.
"A drum, because you can't trust your head at move one hundred and sixty. You can trust a beat."
The Mirror Hall was a cathedral of glass.
Three pedestals stood in a row down the center of a long, narrow chamber, and on every wall hung mirrors from floor to ceiling, so that the pedestals repeated away in all directions until the repetition became a shimmer. Eight stone discs sat on the left pedestal, each a different color, each the size of a dinner table at the bottom and a dinner plate at the top. A countdown glowed over the door.
**90:00.**
Crane stood at the entrance with Lena and four hundred and twelve Wakers lined up in the corridor behind him, hardly breathing. He didn't give a speech. He nodded to me, and I nodded to Garrick, and the drum spoke.
*Boom.*
"Move one," called Ruth. "Disc one, left to right."
"Wait," I said. "Left to *middle.* With an even number of discs, the smallest goes to the middle first."
I'd worked it out at three in the morning, in the cell, on the back of a napkin. With an odd number of discs the smallest travels left, right, middle, around. With eight, it goes left, middle, right. Always the same direction. Every second move, forever.
*Boom.* The first volunteer lifted the smallest disc and set it on the middle pedestal. The mirrors shimmered and settled.
"Move two. Something that isn't disc one. There's only one legal option."
*Boom.* The second volunteer lifted disc two across to the right. I felt my pulse go.
"Move three. Disc one, middle to right."
That was the trick I'd come to love most. Half the moves were the smallest disc, going around in its circle. The other half were *forced*. If you'd just moved the smallest, then the only other legal move was one particular move, and there wasn't a choice at all. A person didn't have to think. A person only had to follow the drum.
For the first twenty minutes, nothing happened. Everything just worked. The volunteers developed a rhythm, and the smallest-disc volunteer, a wiry old man named Pavel, moved with a kind of weary dignity from pedestal to pedestal to pedestal. Ruth's voice never wavered. "Move twelve. Disc three." "Move thirteen. Disc one." I found myself watching the mirrors rather than the discs, and every reflection of every move arrived exactly in step.
I kept a second ledger in my head, a way to check Ruth. The disc that moves on move *k* is determined by the number *k* written in binary: count the trailing zeros, add one. Move twelve is 1100 in binary. Two trailing zeros, so disc three moves. Move sixteen is 10000. Four trailing zeros, disc five. Move 128, the middle of the whole thing, is a one followed by seven zeros. Seven trailing zeros, plus one. Disc eight. The biggest. The only move of its kind.
I couldn't explain why this worked without an hour of whiteboard. I knew it worked, because it was the same algorithm, seen from the side, and the call stack of the recursion was sitting in the beat of a drum.
At minute forty-two, the drum reached 127.
"Move one hundred and twenty-eight," Ruth called, very quietly. "Disc eight. Left to right."
Dolores stepped forward. She'd asked for it, afterward, though not in words. She put her hands on the rim of the biggest disc. It took four of us to start it moving, and when it slid onto the right pedestal, the sound was like a bell the size of a house.
The mirrors blazed. The countdown flickered. For a moment I thought something had gone wrong, and then the light settled, and I understood it was only the hall saying *halfway.*
**47:20.**
"Five minutes of slack," Ruth said, behind me, very low.
"We're on pace."
"Mm," said Ruth. And then, because she was Ruth, "Don't say *on pace* out loud."
It happened at move 197.
I'll never know whether it was fatigue or fear. Marit, who held disc four, was two hours into the longest day of her life, and her hand shook. Ruth called the move. "Move one hundred and ninety-seven. Disc one, middle to right." Pavel lifted the smallest. Fine. The next beat was forced: only one other move was legal. It was disc two's.
Marit moved.
She'd lifted disc four. The big, green one. She was carrying it across the gap toward the pedestal where disc two had *just* come to rest, and I could see, with perfect horrible clarity, what was about to happen. A disc four, larger than disc two, placed *on* disc two. A rule broken. A flash of glass. A death.
"*STOP!*" I shouted. "The drum! Stop the drum!"
Garrick's mallet froze. Marit froze with the disc in her arms, six inches above the other, trembling.
"That's the wrong pedestal," I said. "Ruth. What move are we on?"
"One ninety-seven."
"Binary." I closed my eyes. "One ninety-seven is 11000101. No trailing zeros. That's an odd move. It's disc one. It's disc one, Marit. You're holding the wrong disc."
"But Pavel already..." She looked down at the pedestal. Disc one sat there. Disc two sat next to it. She had *counted* wrong, and she looked at the disc in her hands as though it were a stranger's, and her face crumpled.
"It's okay," I said. "Put it back. Gently. Where you picked it up."
She did. The disc came down on its stack with a soft grinding sound, and the mirrors flickered, and nothing happened. I had been holding my breath so long that my lungs hurt.
"Ruth. Time?"
"Sixty-six minutes. Forty-four seconds of the clock gone on that stop." She did the math with the grim composure of a freight dispatcher. "We have four minutes and sixteen seconds of slack. Left."
"Good." It wasn't. "Everyone. Eyes on Garrick. We continue from one ninety-seven. Disc *one.*"
*Boom.*
They went on. I will remember that stretch longer than any other. No one spoke except Ruth. No one moved except the discs. The drum, the voice, the slow turning of stone. I watched Marit's hands, which were shaking, and then I watched them stop shaking, and then I watched them carry out move after move after move with a kind of stubborn, ruined grace. Hands slow down after two hours, and the drum slowed with them; at move 230 Ruth said, "Two minutes of slack. Everyone, faster," and the volunteers found something in themselves I had no right to ask for. At 240 I began to count aloud with Garrick, in my head, under the drum. At 250, the whole line of volunteers was breathing in time.
"Two fifty-five," said Ruth.
*Boom.*
The smallest disc settled onto the stack on the rightmost pedestal. Eight discs, in order, from the biggest to the smallest, on a pillar of stone. The mirrors went white.
**00:48.**
For a second the whole hall was silent. Then every mirror in the chamber rang at once, like a thousand wine glasses, and a voice came down out of the light.
"Floor Four, cleared. Two hundred and fifty-five moves. Margin: forty-eight seconds." A small pause. "Well done. That one I was proud of."
I looked at the ceiling. Something in the Herald's voice had slipped. It sounded, very briefly, like a man trying not to cry.
Crane found me afterward in the stairwell with my head on my knees. He didn't say anything for a while. He stood with his back to the wall, hands behind him.
"Four hundred and twelve people on those stairs," he said at last, "and none of them will be dead in nine days."
"They would've been fine."
"They would have *starved*, Mr. Navarro. You have a tendency to be modest about arithmetic." He cleared his throat. "I will not call you an ally. I do not use the word. I do not trust it. I will call you *necessary.*"
"That'll do."
"Floor Five." He said it as if tasting something. "The Herald says the Clocktower. Do you know what that is?"
I thought of the Herald's voice, the crack in it, the line about pride.
"No," I said. "But I think I'm going to find out it's very good."