← Library

The Number Kingdom

The Variable Village

The Variable Village

The Village With No Name

"Right. Let's see what's broken," Mira said, sliding off Zero's back as they crested the hill.

Zero, small and silver-white, rolled to a stop beside her. "The village is broken," it said quietly. "Or rather, its name is broken."

Mira looked down at the valley below. It was a perfectly lovely village—houses with blue roofs, a market square with a fountain, gardens full of flowers—but something was wrong. The archway at the village entrance was blank. Not carved blank, but problematically blank, as if the letters had been removed and replaced with strange squiggles.

"Is that—" Mira squinted. "Is that a letter on that sign?"

"Several," said Zero. "The village has a name, of course. But its name was stored as a variable. And someone has changed the variable's value."

The Count appeared beside them, staff clicking against the stones as he walked. He was entirely out of breath, which for the Count was remarkable.

"Mira," he said, "the crisis is as follows. This village is called something—we are not entirely certain what, at the moment. Its name, its population records, its founding date, its market prices, and its weather forecast are all stored as mathematical variables. The Remainder has been here."

"Of course it has," Mira sighed.

"Without knowing the village's name," the Count continued, "we cannot send messages, deliver supplies, or—" he paused, looking troubled, "—or file the proper paperwork."

Mira had learned that paperwork was very important to the Count.

"Let me look at the sign," she said, stepping forward.

The archway's sign read: Welcome to N, population P, founded in year Y.

"What are those letters doing there?" Mira asked. "Those aren't numbers."

"Correct," said the Count. "They are variables. Symbols that stand in for quantities that can change or are unknown. The village's name was stored as the variable N. Its population was stored as P. Its founding year was Y."

"So someone changed the variables?"

"Worse," said the Count. "The Remainder has hidden the values. We know what the variables are. We just don't know what they equal."

From above, a gleeful voice called down: "Ooooh, but isn't it WONDERFUL? A whole village where nothing is what it seems! The sign doesn't say the name! The records don't say the population! The market doesn't say the prices! It's all just—" The Remainder appeared, wispy and grinning, wearing a small crown made of mismatched numbers. "—a beautiful array of possibilities!"

Mira put her hands on her hips. "Right. Let's see what's broken."

Letters That Stand for Numbers

Mira walked through the village, looking carefully at everything. The market square had signs that read:

Apples: 3 × c coins per basket

Bread: b + 2 coins per loaf

"That's not very helpful," Mira said. "I don't know what c or b are."

"No one does!" said the Remainder, doing a little flip. "That's the point! It could be anything! Maybe apples cost 3 × 1 = 3 coins! Or 3 × 5 = 15 coins! Or 3 × 100 = 300 coins! Oh, the possibilities!"

Mira frowned. "But that means the merchants can't sell anything."

"Exactly!" said the Remainder. "Isn't it magnificent?"

Mira walked to the village hall, where a large board displayed information about the village. It read:

Village N was founded in year Y.

Current population: P.

The mayor's house number is 2 × H + 1.

"Everything is variables," Mira said, sitting down on a bench. "How am I supposed to fix this if I don't know what the variables are?"

Zero rolled up beside her. "Some of them, you know."

"What do you mean?"

"The village's founding year," Zero said. "I was there. It was founded in 1753."

"Then Y = 1753!" Mira said. "So we can write that down!"

She pulled out her notebook and wrote:

Y = 1753

"So when the record says 'founded in year Y,' we can change it to say 'founded in 1753.'" Mira looked at the board. "And the village's name—I know it! The Count told me this village was one of the original founding villages. It's called something special." She thought hard. "It's called..."

"Tallyville," said Zero.

"Tallyville!" Mira wrote it down. "N = Tallyville."

"So the variable N, when you know what it represents, is just the village's name." Mira nodded to herself. "That's what variables are. They're like empty boxes that can hold different things. Once you know what's inside, you can use the actual value instead of the letter."

The Expression Puzzle

But there were still problems. The mayor's house number was 2 × H + 1, and nobody knew what H was.

"Maybe H is a hidden number," Mira said. "Let me look at the house numbers on this street."

She walked down the street, counting. The houses were numbered 1, 2, 3, 4, 5, 6, 7...

"The mayor's house is here," the Remainder said brightly, pointing to a house with a blank sign. "It should have a number, but I took it away. It was stored as 2 × H + 1."

Mira looked at the houses on either side. House number 7 was on the left. House number 9 was on the right.

"If the mayor's house is between 7 and 9," Mira said slowly, "then 2 × H + 1 must equal 8."

She wrote in her notebook:

2 × H + 1 = 8

"An equation!" Mira said. "It has an equals sign, so it's saying that two things are the same."

"But you don't know what H is," said the Remainder, popping up on her shoulder. "That's the fun part!"

"It's not fun," Mira muttered. But she thought about it. "If 2 × H + 1 = 8, then 2 × H must be 7. Because 7 + 1 = 8."

She paused. "But 2 × H = 7 doesn't work with a whole number. H would have to be 3.5. And house numbers aren't fractions."

She thought harder. "Wait. Maybe the houses are numbered differently from what I'm thinking."

She walked to the other end of the street and looked at the house signs. They were numbered 2, 4, 6, 8, 10...

"These houses are numbered by twos!" Mira said. "So if the houses are 2, 4, 6, then the house between 7 and 9 would be—" She counted. "—house number 8. But in the even street, the houses are 2, 4, 6, 8, 10. So the mayor's house is between 6 and 10, which makes it 8. Wait, no, that doesn't work either."

Zero rolled up beside her. "This is the Tally Street. The houses are numbered by twos: 2, 4, 6, 8, 10. The mayor's house is the fourth house on the street."

"So H = 4!" Mira wrote:

H = 4

"Now I can evaluate the expression," she said. "To evaluate means to figure out what the expression equals when you know what the variable is. So if H = 4, then 2 × H + 1 = 2 × 4 + 1 = 8 + 1 = 9."

"Evaluation!" said Zero approvingly.

"So the house number is 9!" Mira said. She walked to the third house, which had a blank sign. But on the list she'd found, it said the mayor's house should be 2 × H + 1 with H = 4, so the number was 9. She wrote the number 9 on the sign.

When You Don't Know the Value

But there were still problems in the village. The market signs said things like:

Each basket of apples: 3 × c coins

Each loaf of bread: b + 2 coins

"Without knowing c or b, I can't fix the prices," Mira said.

"Maybe that's okay," said Zero. "Some variables are known. Some are not. When you don't know the value, you leave the expression as an expression."

Mira thought about this. "So 3 × c is a perfectly good expression? Even if I don't know what c is?"

"Yes," said Zero. "It describes a relationship. Whatever c turns out to be, the apples will cost three times that much. The expression is a way of saying how the price works."

Mira looked at the market. The merchants were arguing with customers.

"But the customers want to know prices!" Mira said.

"Ah, but I have a piece of information," said the Remainder, appearing upside down on a stall roof. "The apples cost 3 × c coins per basket, and I happen to know that c = 5. I simply refuse to tell anyone."

Mira stared at it. "You WANT me to figure out that c = 5."

"I want you to FIGURE OUT whatever you can figure out!" the Remainder cackled. "And what you CAN'T figure out, you LEAVE AS AN EXPRESSION! Isn't that neat? The village has secrets, and the secrets stay secret!"

Mira closed her eyes. "Okay. If c = 5, then 3 × c = 3 × 5 = 15. The apples cost 15 coins per basket."

She wrote on the sign: Apples: 15 coins per basket.

The bakers came forward. "What about us?" they asked. "Our bread is b + 2 coins per loaf, and we don't know what b is!"

Mira looked at the ledger book. "But the ledger says 'the baker's base price is b, and b is the same for all bakers in this village.' And the first baker's shop has a price list that wasn't changed. It says his bread costs 3 coins per loaf."

"So for the first baker, b + 2 = 3, which means b = 1," Mira said. "And since b is the same for all bakers, every baker's bread is 1 + 2 = 3 coins per loaf."

She wrote the prices on all the bread signs.

"You see?" Mira said. "When you know what a variable equals, you can evaluate the expression. When you don't know, you just leave it as an expression until you find out."

The Village Restored

For the rest of the day, Mira worked through the village. She found that the population was stored as P, and the census records had been changed—but the fountain in the center of town had the original population carved into its base: Population: 342. So P = 342, and she wrote the true population on the records.

She found that the weather forecast was stored as T = temperature in degrees, and the weather bell tower had the correct temperature displayed: 18 degrees. So T = 18.

The village's name went back up on the archway: Welcome to Tallyville, population 342, founded in 1753.

And everywhere she went, Mira explained to the villagers: "An expression is like a sentence with a blank in it. It's not an equation because there's no equals sign. It's just a way of describing something that might change or might be unknown. When you know what the variable is, you substitute—you put the value into the expression and calculate."

The Remainder watched from the roof of the village hall, swinging its legs.

"You've fixed everything," it said, sounding almost sad. "No more mystery. No more unknowns."

"Actually," Mira said, "there are still some unknowns."

The Remainder perked up. "Really? Where?!"

"The next village over," Mira said. "They had a different kind of disruption. Their variables are all mixed up with equations, and I hear they're much more complicated."

The Remainder's face lit up. "Equations! With balances and solving and—oh, I can't wait!"

And it disappeared in a puff of numbers.

Zero rolled up beside Mira. "You told it there were more problems."

"There will be," Mira said. "There always are."

"And you're not worried?"

Mira shook her head. "Expressions don't scare me. Even when I don't know the values, I can still work with them. That's what variables are for—they let you describe things before you know what they are."

Zero was quiet for a moment. Then it said, very softly: "You've learned something important today. More important than evaluating expressions."

"What's that?"

"You don't have to know everything to work with what you have." Zero paused. "That's a lesson that extends beyond mathematics."

Mira looked at the village, restored and bustling. And for a moment, she felt something she hadn't expected: gratitude for the unknowns. They were what made the solving possible.

"Yes," Zero said quietly, reading her expression. "That tends to work."