Lauren Ipsum: A Story About Computer Science and Other Improbable Things (15 page)

Read Lauren Ipsum: A Story About Computer Science and Other Improbable Things Online

Authors: Carlos Bueno

Tags: #COMPUTERS / Computer Science

BOOK: Lauren Ipsum: A Story About Computer Science and Other Improbable Things
5.86Mb size Format: txt, pdf, ePub

“Mine, too,” Xor said.

Laurie started to go left, then stopped. Then she started to go right, but had second
thoughts. They stood there for a very long and very silent minute.

“We can only take one path,” said the girl.

“Yeah,” the lizard replied.

“And there’s no going back.”

“That’s the rule.”

“You really want to find your aunt,” Laurie said.

“And you really want to go back home,” Xor sighed.

“That means we have to choose,” Laurie said. “But how?” She did want
to go home, but she also wanted Xor to find Aunt Vana. She wanted to bring Xor and Vana home with
her and how cool would that be and—

“No, Laurie,” Xor said sadly. “It means we have to split up.”

“But—”

“Only One Visitor Per Path. That’s the rule.” He jumped off her shoulder and
landed on the right-hand sign. “I guess . . . this is how you found me.” His skin turned
orange and purple.

“We can do this,” said Laurie, thinking furiously. “Once you find your Aunt
Vana, take her to the Treelighthouse. I’ll find a way to come back. Or maybe I’ll get a
telescope and a big light and—”

“We’ll see each other again,” Xor said.

“Okay,” said Laurie. “Promise?”

“Promise.”

“And I’m going to whistle, okay?”

“Okay.”

“So you can hear me.”

“Right,” said Xor.

“It’ll be fine.”

“Absolutely,” agreed Xor.

“Here I go.”

“Me too.”

Laurie did try to whistle, but it’s impossible to whistle and cry at the same time. Just
try it.

Chapter 20. Fin

The mandelbroccoli bushes got shorter and wilder until they blended in with the forest. Laurie
didn’t know where she was or where she was going. But she knew how to get there. At least, she
hoped she did. By now it was late afternoon and the shadows were getting longer.

The trees of the forest were large oaks and maple, with an occasional pine or spruce. There
were a number of saplings and bushes of various sorts. It was hard to see far because of all the
leaves, but walking was easy enough if she skirted the spruce and berry bushes.


Chirrrup!

Laurie’s heart started pounding. More Jargon? How many? Where?


Chirrrup!

No running this time. She walked toward the noise as quietly as she could. It seemed to be
behind a large tree. No, not a Jargon. It was . . . a squirrel. An ordinary squirrel. It yelled what
were probably very nasty things in Squirrel, then ran up the tree to safety. And that tree! She
recognized it. It was the big tree behind her house, at the edge of the woods . . .

Laurie was home.

* * *

Lying in her own bed after a hot bath made Laurie feel happy and tired. As far as her mother
knew, Laurie had been gone only an hour or two. To Laurie, though, it felt like at least a week
since she’d gotten lost in the woods. She was too sleepy to think about it. She hoped Xor had
gotten his wish and was learning how to blend in. She was sad that she didn’t get to see her
new friends again. She had promised to come back . . . after delivering . . . delivering that letter
. . .

Two seconds later, she was out of bed and tearing open the plain white envelope.

Hi, kiddo. If you’re reading this letter, you’ve figured
out who it was for. I wasn’t sure the Garden would actually work, and I don’t like
good-byes.

You helped us build the Network. We couldn’t have done it
without you. Fresnel says once you learn a few things and unlearn some others, you’ll make a
good Composer.

See you around,

capt. Winsome “Losesome” Trapp

She read it twice before she noticed that Winsome’s last name was Trapp. It made sense.
For all of the sour things Winsome had said about Colonel Trapp, they were a lot alike, sending
strange messages and bossing people around. It looked like Laurie wasn’t the only one who had
trouble getting along with her parents.

She lay down again and thought about tomorrow. Tomorrow was the first day of summer school. It
didn’t sound as scary as it did before. If she could navigate the Byzantine Process, beat
Ponens and Tollens, make infinite strings, and teach turtles to build towers, sitting in a classroom
didn’t sound that hard at all.

She might even learn something interesting.

The End

Chapter 21. One More Thing

It was a dark and foggy night, many months after Lauren Ipsum had gone back home to Hamilton.
A lighthouse flashed. Flashed. Flashed. Flashed.

The flashes didn’t carry any messages this night. The fog was too thick to send signals,
so the Network was down. The powerful lights were needed for their original purpose: to warn boats
away from dangerous rocks.

As it happened, only one boat was around, and it didn’t need warning. It was exactly
where it was supposed to be.

The
Jargonaut
was the boat, and Kevin Kelvin was its captain. The boat
was large and flat and plain. Near the front was a little cabin where Kelvin lived. The rest of the
deck was taken up by a crane and a winch—a machine built to wind wire in or out. A wire led
from the crane and into the water, looking like a large fishing pole. Belowdecks was mostly a hold
for tons and tons of coiled wire.

It wouldn’t be accurate to say that the
Jargonaut
was a gigantic
boat with a winch attached to it. That might give you the wrong impression. It would be better to
describe it as a gigantic
winch
with a boat attached to it. Its entire purpose
in life was to play out and wind up miles of heavy wire.

Inside the cabin, Kevin Kelvin rubbed his hands together to keep them warm. A thermometer hung
from a peg near the door. It read a chilly 273.
Brrrrr!
Now, 273 degrees might
sound pretty hot to you and me, but this thermometer didn’t measure in degrees Fahrenheit or
Celsius. It was on the Kelvin Scale, one of the captain’s many inventions. The Kelvin Scale
starts at Absolute Zero, the coldest that any cold thing can possibly get. And 273 Kelvin
isn’t much better. It’s about the temperature of an ice cube.
Brrrrr!

The thermometer said a lot about the kind of person Kevin Kelvin was. He was a Composer, and a
wickedly smart one. He never let a good idea escape without putting his name on it.

When people asked Kelvin what he was doing, he would say he was fishing. He never explained
what he was fishing
for
, in the middle of the night with a gigantic winch that
had a boat attached to it. When people made jokes about catching sea monsters, Kelvin only smiled.
No one knew what he knew. How could they?

Kevin Kelvin was fishing for teeny-tiny bits of electricity flowing up his Wire. The Wire
traveled under the ocean for miles, all the way to a little building on the shore, not far from the
lighthouse. He twiddled dials, and listened carefully to a nearby speaker connected to the Wire, and
made notes. If his ideas were right, any moment now he should hear a signal from his assistant on
the other end. It would sound like—

BEEP.

His skin tingled with excitement, but he didn’t dare make a sound.

BLOOP. BEEP.

Kelvin quickly disconnected some wires and connected some other ones. He flicked a switch on
and off.

FLIP. FLOP. FLIP.

The Wire answered back.

BLOOP.

The Wire worked! Just as Kelvin thought: he could send messages using electricity, even under
miles of seawater. If the
Jargonaut
laid down a Wire all the way between two
islands, that would form the first link in Kelvin’s very own Network. A Network that could
send messages all the time, even on a terrible night like this. A Network that, someday, could even
have
multiple Wires
.

Those fools up there in their ivory towers, flashing their little lights, will never know what
hit them!

The Field Guide to Userland

You might have wondered whether this or that part of the story is real. Can you really make a
Fair Coin out of an Unfair Coin? Can you really use ants to find shorter paths? Yes, you can do
both—and a lot more besides. In this guide, you’ll find out how some of the places,
people, and things Laurie encounters in Userland connect with our own world.

Chapter 0: Mostly Lost
Jargon

In the real world, jargon doesn’t look like a mouse-dog, or even a dog-mouse; it looks
just like an ordinary word! Computer scientists (and really, all scientists) love inventing new
words. We call these specialized words
jargon
or
argot
.
Jargon can be good, because it saves time when you’re discussing things with your colleagues.
It can also be bad, because it excludes nonexperts from the conversation.

When you’re just starting out with programming, all the jargon, argot, and weird new
words can be intimidating, but don’t let that stop you from learning. Jargon can be silly, or
powerful, or dangerous, depending on how you use it. But no matter what words you use, if you always
obfuscate instead of explicate, no one will understand you!

Wandering salesman

The
Traveling Salesman problem
is a classic computer science question.
Given a group of cities, your goal is to find the shortest
Hamiltonian path
, a
route that lets you visit each city only once. If you have a large number of cities, it would take a
very long time to calculate that path, even for a computer. So the Wandering Salesman might be on
the road for quite a while!

Instead of calculating the exact answer, the salesman looks for a path through all the towns
that’s
close enough
to being the shortest. A very interesting aspect of
the Traveling Salesman problem is that humans are pretty good at solving small examples by hand.
There is much discussion about what algorithm people use in their heads while solving it. See also
Hugh Rustic
(
Chapter 8
;
Chapter 8: More Than One Way to Do It
).

The Upper and Lower Bounds

In Userland, the Upper Bounds are a mountain range, as tall as anything can be. The Lower
Bounds are valleys as low and deep as anything can be. Nothing can be higher and nothing can be
lower than these two bounds.

In the real world, finding an upper and lower limit on a problem can simplify things a lot.
Say you have to guess a person’s age. It’s unlikely that anyone is over 150 years old,
and no one can be younger than 0 years old. So, 150 is the
upper limit
and 0 is
the
lower limit
. You can narrow down the bounds even more with simple
questions. Is the person still in school? If so, then he is probably younger than 30. Can the person
drive a car? If so, then he is probably older than 15.

Mile Zero

You sometimes see signs that mark a point on a highway, like “Mile 14.” Now, if
there is a Mile 14, then there must be a Mile 13, and a Mile 12, and so on. Everything has to start
somewhere, and Zero is where it starts. Possibly the most famous Mile Zero is in Key West, Florida.
It’s at the beginning of US Route 1, which goes all the way to Canada. If you look carefully
and are very lucky, you might find a Mile Zero near where you live.

Chapter 1: A Hidden Ally
Xor

When you say “A or B,” you mean that you want one of those two things, or maybe
both! If you say “A xor B,” then you mean you want
one and only one
of those two things, not both. That’s why Xor keeps turning rainbow colors: Xor and the thing
he’s currently resting on can’t be blue at the same time. If he’s sitting on a
blue sign, then he must turn any color that
isn’t
blue! Not a great form
of camouflage, is it?

Steganosaurus

Steganography
is the art of hiding information inside other information,
and it’s used in both the digital and the physical world. For example, you might hide a secret
message by writing it with invisible ink on a piece of paper. With a computer program, you could
even hide words inside sounds and pictures. A Steganosaurus is, therefore, a dinosaur that can hide
itself anywhere.

Chapter 2: Sense and Sensibleness
Composing

Eponymous Bach is a composer, but she works with ideas instead of music.
Composing
is the act of combining small ideas into bigger ones to solve a
problem in steps. Almost every idea is composed of smaller ideas. For example, multiplying whole
numbers isn’t anything special. You can think of it as adding a number to itself and
repeating:

2 × 3 = 6

2 + 2 + 2 = 6 (Add up three twos.)

See also
Decomposing
(
Chapter 17
;
Chapter 17: Chasing Elegants
) and
Relating
(
Chapter 17
;
Relating
). Composing, decomposing, and relating are
problem-solving methods that lie at the root of all math, logic, and computer science.

Bach’s First Law of Eponymy

Don’t let any new idea escape without putting a name on it. A name is like a handle that
makes the idea easier to use.

Bach’s second Law of Eponymy

It’s better to put a name on Ideas than on Things, because Ideas last longer.

Bach’s Third Law of Eponymy

As an idea becomes more useful and famous, its name becomes shorter and lowercase. This law
eventually affected Eponymous’s friend, Andy Ampère, and his discovery about
electricity.

Ampère

André-Marie Ampère discovered that when electricity flows through parallel wires,
the wires will either attract or repel each other, causing the wires to bend. By measuring how much
they bend, you can measure how much electricity is flowing. Ampère used this idea to lay the
foundation for nearly everything we know about electricity, and we measure electrical current in
amperes
(or
amps
) in his honor. (See
Bach’s Third Law of Eponymy
for Eponymous’s theory on why we
don’t call the unit an
Ampère
nearly as often.)

Sense vs. Sensibleness

Programmers and mathematicians sometimes use a pair of ideas, called the
solution
space
and the
problem space
, to describe finding an answer to a
problem.

Say you need to move a heavy box so you can unpack it; anything related to moving the box is
in your problem space. Try to imagine every single thing you could possibly do to try to move that
box. You could walk forward, walk backward, stick out your tongue, sing a song, write an equation,
use a lever, call for help, look for a forklift, or do literally anything else you can think of.
Write down as many of these possibilities as you can fit on a piece of paper.

Out of that huge space of possibilities, imagine only the ones that have a good chance of
moving the box. Circle those with a red pen. The circled ones are in the solution space. They
make sense
because they would accomplish your goal, and the rest don’t
make sense. Now, look again at all of the circled possibilities and think about which one is best
(fastest, cheapest, easiest, most reliable, and so on). Underline that one in green. That’s
the most
sensible
answer out of all the ones that make sense.

The point of this exercise is to avoid a very human, very common error: we tend to grasp at
the first solution we think of and forget to consider other possibilities. This is what Eponymous
means when she tells Laurie that the Wandering Salesman’s solution isn’t sensible. See
also
Hugh Rustic
(
Chapter 8
;
Chapter 8: More Than One Way to Do It
) and
Five Whys
(
Chapter 14
;
Chapter 14: In the Abstract
).

Chapter 3: Rounding Error
Round Robin Algorithm

The Robins aren’t really evil—they’re just hungry. They cooperate in
everything they do, taking turns and making sure the work is balanced among them. Sharing work is a
great way to get things done faster, and computers can share work, too!

You can find the Round Robin method almost anywhere. Imagine a bus route that takes an hour to
complete. If you put two buses on that route, a bus will arrive at each stop every 30 minutes. With
three buses, you’d see a bus every 20 minutes, and four means you’d see one every 15
minutes. With five buses, you’d see one every 12 minutes, and so on. Just divide 60 (the
number of minutes in an hour) by the number of buses to see how often a bus should come.

But you have to be careful to make sure the buses arrive at each stop at evenly spaced times.
Five buses reaching one stop all at once wouldn’t be balanced. Also, if one bus breaks down
and gets delayed, this could cause all the other buses to back up!

Chapter 4: What the Tortoise Said to Laurie
Recursion

Recursion
is a way to repeat the same process over and over until you
find the answer you’re looking for. When you use recursion, you run though the process, and if
the answer is the one you want, you stop. If it’s not, you take the answer you found, plug it
into the same process, and run it again.

Let’s look at an example of recursion in action right here in Userland. Recall from
Chapter 10
that Jane Hecate has a single, gigantic book of names. The
name
Lauren
starts with
L
, so Jane should find it in the
L
section of her book, but that could take a while with so many pages. If Jane
wants a faster way to look for
Lauren
, she can divide the book into two equal
halves and see if
L
is in the first half or the second half.

First half: {A, B, C, D, E, F, G, H, I, J, K, L, M}

Second half: {N, O, P, Q, R, S, T, U, V, W, X, Y, Z}

Since
L
is in the first half, Jane can then divide the first half of the
book in half, giving her two quarters of the book to search.

First quarter: {A, B, C, D, E, F, G}

Second quarter: {H, I, J, K, L, M}

Lauren
should be in the second quarter, so Jane can divide that quarter
in half, giving her two eighths of the alphabet:

First eighth: {H, I, J}

Second eighth: {K, L, M}

Jane can continue dividing the letter groups containing
L
in half until
eventually she ends up with just the
L
section. (How many more times would Jane
have to divide a set of letters in half to find
L
?) This way of searching for a
particular piece of information is called a
binary search
.

See also
The Garden of Forking Paths
(
Chapter 19
;
Chapter 19: Branching Out
) and
Chasing Your Tail
(
Achilles and the Tortoise
).

Achilles and the Tortoise

These two characters were used by a philosopher named Zeno of Elea almost 2,500 years ago to
talk about infinity. From Aristotle to Lewis Carroll to Marvin Minsky to Douglas Hofstadter,
mathematics is full of stories about their adventures. It’s Tortoises all the way down.

Chasing Your Tail

Chasing your own tail is not always a waste of time! In computer science, there’s a type
of recursion that sounds a bit like running around in circles, and it’s quite useful. In
tail recursion
, you perform a process, then perform the process again on the
result, and repeat until you reach the final answer. For example, Jane Hecate’s binary search
for the
L
section of her book might look something like this:

  • Check the section of the book of names we have right now.

  • Do we only have the
    L
    section?

  • If so, then we’re done!

  • If not, then divide the book in half.

  • Look at the half of the list containing the
    L
    section, and repeat.

See also
Recursion
(
Chapter 4: What the Tortoise Said to Laurie
).

Infinity

When people say there’s an
infinite
amount of something, they mean
there’s no limit to how much of that thing exists. When Tortoise demonstrates how an infinite
string can be less than two inches long, he shows that you can split that string into an infinite
number of smaller pieces.

Infinity is
big
, bigger than you can imagine. But you can hold infinity
in your mind simply by saying a few words. There are infinite odd numbers: 1, 3, 5, 7, and so on, up
to forever. There are infinite even numbers, too: 0, 2, 4, 6, 8, and so on. No matter how hard you
look, you will never find an odd number in the list of even numbers or an even number among the odd
ones. That means there are at least two kinds of infinity: the even numbers and the odd
numbers.

There are also
infinite kinds of infinity
. Think about all the numbers
divisible by 3 and all the numbers
not
divisible by 3 (or 4, or 5). Now imagine
all the numbers that no one else has thought of before. That’s another kind of
infinity!

Infinite Regress

If you think about how you think, you might then start thinking about how you think about how
you think, and then about how you think about how you think about how you think, and so on. This is
a form of argument called
infinite regress
, and it can have no end. The first
time you fall into this mental trap, it can be confusing or even scary. The trick is not to take it
too seriously.

If you think this sounds related to recursion, you’re correct! It would be quite
troubling to get stuck in a recursive process forever. In real computers, infinite recursion never
actually happens because no computer can hold an infinite amount of information. When the computer
runs out of room while working on something recursive, you never know what might happen. Laurie and
Xor experienced this firsthand at Recursion Junction. See also
Chasing Your
Tail
(
Achilles and the Tortoise
).

Other books

The Empty Frame by Ann Pilling
Song of the Gargoyle by Zilpha Keatley Snyder
Rabid by T K Kenyon
The Blue Hawk by Peter Dickinson
Mystery Man by Bateman, Colin
Shades of Earl Grey by Laura Childs
His Little Courtesan by Breanna Hayse
Creatus (Creatus Series) by Carmen DeSousa
Vendetta Stone by Tom Wood
The Devil's Footprint by Victor O'Reilly