Queen Manasa’s shoes clicked on stone as she ascended the spiral stairway inside the curving wall of the northeast tower. Diffuse beams of sunlight crisscrossed the stairwell through slit windows. She had changed out of her usual royal finery, into a severe gown not unlike a funeral dress. Which was apt, considering the occasion.

Lundgren, her court wizard, led the way padding softly like a cat. There were a squad of soldiers on the landing at the top, guarding the heavy oak door. They scrambled hastily to their feet when they caught sight of the Queen, disrupting the card game in progress. Manasa made a mental note to have a stern word with the constable, regarding discipline on duty. Especially when holding a Threat to Realm. She waited patiently for Lundgren to check the integrity of security wards glowing on the door, and stepped forward once he nodded his all clear.

The circular room was lit through a single barred window. The bird’s eye view of the royal capital was marred by a rickety service elevator suspended from a cantilevered pulley block outside the window and holding a chamber pot narrow enough to pass through the bars. A table and chair bolted to the floor comprised the only furniture. A mattress rolled up on the floor implied a measure of comfort. A figure cloaked in grey prison garb slouched on the chair, staring out the window. Lundgren had already charged up a spell on his casting staff, the carved runes glowing, ready to deal out searing death.

The inmate turned to face them. A face gaunt like a death’s head, framed by scraggly white beard and bald head, smiled a ghastly grin at Manasa.

“Your Majesty,” the old man inclined his head in deference without rising. He ignored Lundgren completely, “To what do I owe this honor?”

“Koschei,” Manasa nodded slightly, suppressing the urge to preface her response with Lord. There was protocol to be followed after all. Though there had been a time, long ago, when she had addressed him as Master. When she had been barely more than a little girl at the academy, where Koschei’s lectures were required study for all royal children. It was unheard of in those days for a Wizard to teach mathematics of all things, but Koschei was no ordinary Wizard as she had come to appreciate since. It was unnerving that his face was practically unchanged these last few decades, though Manasa knew that those born with the Gift of Magic aged far slower than normal. Lundgren himself had served her father before her and her father’s father before that.

“I have decided to put you death,” Manasa continued quickly, wincing inwardly. It would not do to let Koschei see how hard the decision had been for her.

“Refreshingly direct,” Koschei chuckled ruefully, “I commend you on your… initiative. I didn’t think you had in you.”

“You gave me no choice,” Manasa retorted more sharply than she intended, “when you initiated your… insidious ritual to profit from the death of every descendant of your many beneficiaries. You took away my choice by choosing to become a monster.”

“They begged me…” Koschei lost his smile, his eyes growing distant, “the young women… grieving mothers who had buried more newborns than their hearts could bear. They begged me to lift the terrible curse of mortal disease that had afflicted the children of Ordossia since time immemorial. And I gave them what they wanted. Who is the monster now? If humans can’t see the perils of unlimited growth… is it too much to ask that I exploit that as payment for my services? ”

“I’m not here to justify my verdict, Koschei, ” Manasa shook her head grimly, “You will grow too powerful a threat for my grandchildren to deal with. And I am not so certain you are as powerless as you appear to be now, despite what the wards say. Best to end it now.”

“I cannot fault your wisdom,” Koschei nodded, “And the towns and villages that will drown when my dead man’s switch activates? Acceptable losses, I suppose.”

“The death of my subjects is never acceptable,” Manasa snapped angrily, “The river valley is being evacuated, as we speak. We will save may lives, though we’ll lose our best farmland… curse you.”

“Perhaps I can make amends before I die,” Koschei drummed his fingers on the table, looking thoughtful, “even save a few lives.”

“Amends?” Manasa seemed taken aback, “How?”

“Surely you have some pressing concern that can use my advice,” Koschei looked a trifle smug, “I have collected much lore over the years. A monarch like yourself must have many burdens. Let me ease them a little, my lady, as a token of my… goodwill.”

“And why would you offer this now?” Manasa asked suspiciously, “When I’m about to take your life?”

“For goodness sake, woman,” Koschei snarled, “I don’t wish to die right this moment. If I demonstrate useful advice, that forces you to delay my execution for a day or so.”

“If you think begging will save you…” began Manasa.

“Koschei does not beg,” there was steel now in Koschei voice, cold as an icicle, “This is an offer that might save lives. Something that you profess to care about.”

Don’t listen to him, screamed a voice at the back of her head, just order Lundgren to execute him as planned. Manasa’s weariness suddenly threatened to overwhelm her. All she wanted was to lie down and rest for just a moment. The last few weeks had been trying. Koschei’s capture and the sudden need to evacuate the Sealake Basin had been the last straw in a series of impending disasters. And her damn fool consort spent his time gambling and skirt chasing than helping her govern. And her council of ministers were inbred fools, the lot of them… why did it always fall on her to solve every problem…

“You wouldn’t know any spell to stop a blood elf, would you?” blurted Manasa.

“Blood elf?” Koschei raised an eyebrow.

“You know,” Manasa looked impatient, “the cute pointy-eared race with a taste for blood that infests the Vodniker Forest. Every so many years they come out in hordes to prey on the human villages. Their attacks cost many lives before they can be dealt with. Magic doesn’t work on them. And there are so many of them when they attack…”

“I know what a blood elf is,” said Koschei testily, “but what of it? I know of no spell that might affect them. Given enough time, I might find a way to exterminate…”

“I don’t think we have time,” Manasa shook her head, “I am having the Actuarial Guild try and predict when the blood elves will next attack… but it’s taking too long to work through. If I can send warning to my vassal lords just before a blood elf surge, many lives can be saved.”

“Predict a blood elf attack?” Koschei looked suddenly interested, “how exactly?”

Manasa began to pace within the cell, “Some years ago, a bright young apprentice in the Actuarial Guild came up with a symbolic description of how predator and prey populations rise and fall over time. The rate at which a prey population changes, for instance, can be described as scaling negatively with the predator population among other factors. Similarly, the predator population rate can be described as scaling positively with the prey population and negatively to its own numbers during starvation.”

Manasa glanced at her prisoner to see if he was following.

“Yes… yes,” Koschei nodded rapt in thought, “It is necessary to cumulatively sum up the population changes through small time steps to arrive at the correct answer. Especially if the population change is rapid.”

“Correct,” Manasa felt a twinge of relief at finally speaking with someone who didn’t give her blank looks, “but it grows even more tedious when more than two species are involved. We have compiled records of meat and fur trading along the edge of the Vodniker Forest, going back many decades. Assuming that the number of animals trapped in a given year is proportional to animal population size, one can chart the rise and fall of any species. Blood elves hunt deer, their natural prey. When blood elf numbers are low, the deer population booms. This causes the blood elf population to grow. Eventually the blood elves grow so large in number that the deer population crashes.”

“And starving blood elves attack human settlements,” completed Koschei softly.

Manasa nodded, “Blood elves aren’t the only predator hunting the deer. We need to track all the big predators, if we are to predict with any accuracy.”

“And what did you find?” Koschei leaned forward.

“Nothing so far,” frustration seeped through Manasa’s voice, “Since we don’t actually know the proportions involved in these symbols, the Actuarial Guild has had to work blindly. They assume a starting condition decades ago, and then step through the calculations to see if they can reproduce the observed trend. The idea is to repeat the steps until a match is found. But it’s taking them forever. There are so many possible solutions that I fear the Actuarial Guild won’t find the correct one before the next attack. And they have two teams to cross check answers for errors. And they make a lot of errors, believe me. And they waste a lot of paper. And dire threats only makes them go slower. I need a way to speed up the calculations.”

Koschei fell silent, his brows furrowed, while Manasa paced without speaking for sometime. Then she cleared her throat, “I must take my leave. Your time has run out, Koschei, since you don’t have anything useful to contribute…”

Koschei chuckled.

“What’s so funny?” Manasa frowned.

“Has it occurred to you, Manasa my dear,” Koschei grinned his ghastly grin, “that there is a far quicker way to sum up changing quantities rather than going through a Guild’s worth of pen and paper.”

“I know of no such method,” Manasa looked disbelieving.

“How long would it take to chart the fall of an apple from its tree,” Koschei asked, “assuming we had the symbolic description of its motion?”

“A half-day,” Manasa guessed, “a day at most.”

“And how long does it take the universe to chart the fall of an apple?” Koschei smiled.

“But…” Manasa looked confused, “are you saying…”

“An easy way to sum up any changing quantity is to collect water through a metered orifice into a measuring jar,” Koschei said softly, “The water flow is analogous to the rate at which a predator or prey population changes. The total quantity of water entering or exiting the jar is the population at a given time. One can imagine linking any number of jars to scale up with the problem.”

Manasa stared at Koschei in a daze, the stone wall cool against her skin where she had leaned for support. To use a physical phenomenon as a proxy… that wouldn’t have occurred to her in a million years. Suddenly Manasa saw herself and her royal peers as little children before Koschei’s monstrous intellect. Now she understood the threat she sensed in Koschei despite the loss of his magic. As powerful a Wizard as he had once been, it wasn’t magic that made Koschei so formidable. She suppressed an urge to order Lundgren to blast Koschei to ashes.

“If I provide the necessary glassware,” Manasa ventured, “how soon do you think you can find the correct solution?”

“A week or two perhaps,” Koschei shrugged, “I suspect I will need to feed the output of the analog calculation back into its input. I will also need assistants who can follow directions and chart the results. Hopefully ones who aren’t completely incompetent.”

“You shall have it,” Manasa nodded, “but be warned that if I even think you are stalling…”

“I wouldn’t dream of it,” Koschei grinned disarmingly.

#

As Manasa walked down the spiral stairway, she felt an emotion she hadn’t felt in ages. Cautious optimism. This time they would be ready when the blood elves attacked. It was getting easier to ignore the little voice in her head that screamed that Koschei was a predator more dangerous than any blood elf. She wasn’t actually sparing his life, Manasa reassured herself, only prolonging it. Idly she wondered if Koschei might have any new insights into optimizing warfare. Lord Garth, one of her strongest vassals, was getting a little too big for his boots… Perhaps it was her imagination, but Manasa thought she heard a ghostly chuckle echo down the stairwell of the northeast tower.

THE END

Note: This story was inspired by Analogue computing: fun with differential equations